mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 01:22:43 +02:00
Teach the Rust bytecode generator to treat the synthetic entry GetLexicalEnvironment as a removable prologue load. We still model reg4 as the saved entry lexical environment during codegen, but assemble() now deletes that load when no emitted instruction refers to the saved environment register. This keeps the semantics of unwinding and environment restoration intact while letting empty functions and other simple bodies start at their first real instruction.
35 lines
771 B
Plaintext
35 lines
771 B
Plaintext
$e6445d4a resolve-this-caching.js:4:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `foo`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, foo
|
|
[ 38] End value:reg5
|
|
|
|
|
|
foo$2256967e resolve-this-caching.js:2:5
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] NewFunction dst:reg6, shared_function_data_index:0
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined
|
|
[ 38] Return value:reg5
|
|
|
|
|
|
$c9429add resolve-this-caching.js:2:13
|
|
Registers: 8
|
|
Blocks: 1
|
|
|
|
block0:
|
|
[ 0] ResolveThisBinding
|
|
[ 8] GetById dst:reg5, base:this, `x` (this.x)
|
|
[ 28] GetById dst:reg6, base:this, `y` (this.y)
|
|
[ 48] Add dst:reg7, lhs:reg5, rhs:reg6
|
|
[ 58] Return value:reg7
|