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.
53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
$3230d765 local-variables.js:20:1
|
|
Registers: 8
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `simple_let`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, simple_let
|
|
[ 38] GetGlobal dst:reg7, `simple_const`
|
|
[ 50] Call dst:reg6, callee:reg7, this_value:Undefined, simple_const
|
|
[ 70] GetGlobal dst:reg7, `multiple_locals`
|
|
[ 88] Call dst:reg5, callee:reg7, this_value:Undefined, multiple_locals
|
|
[ a8] End value:reg5
|
|
|
|
|
|
simple_let$92bdb436 local-variables.js:5:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Locals: x~0
|
|
Constants:
|
|
[0] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Mov dst:x~0, src:Int32(1)
|
|
[ 10] Return value:x~0
|
|
|
|
|
|
simple_const$0a9e10fd local-variables.js:10:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Locals: y~0
|
|
Constants:
|
|
[0] = Int32(2)
|
|
|
|
block0:
|
|
[ 0] Mov dst:y~0, src:Int32(2)
|
|
[ 10] Return value:y~0
|
|
|
|
|
|
multiple_locals$37fee39e local-variables.js:15:5
|
|
Registers: 6
|
|
Blocks: 1
|
|
Locals: a~0, b~1
|
|
Constants:
|
|
[0] = Int32(1)
|
|
[1] = Int32(2)
|
|
|
|
block0:
|
|
[ 0] Mov2 dst1:a~0, src1:Int32(1), dst2:b~1, src2:Int32(2)
|
|
[ 18] Add dst:reg5, lhs:a~0, rhs:b~1
|
|
[ 28] Return value:reg5
|