mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +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.
32 lines
977 B
Plaintext
32 lines
977 B
Plaintext
$7861a666 destructuring-no-base-identifier.js:1:1
|
|
Registers: 12
|
|
Blocks: 5
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Undefined
|
|
|
|
block0:
|
|
[ 0] NewObject dst:reg5
|
|
[ 10] SetGlobal `x`, src:reg5
|
|
[ 28] NewPrimitiveArray dst:reg5, elements:[42]
|
|
[ 40] Mov dst:reg6, src:Bool(false)
|
|
[ 50] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5
|
|
[ 68] GetGlobal dst:reg10, `x`
|
|
[ 80] IteratorNextUnpack dst_value:reg11, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
|
|
[ 98] JumpFalse condition:reg6, target:block2
|
|
|
|
block1:
|
|
[ a8] Mov dst:reg11, src:Undefined
|
|
[ b8] Jump target:block2
|
|
|
|
block2:
|
|
[ c0] PutById base:reg10, `y`, src:reg11, kind:Normal
|
|
[ e8] JumpFalse condition:reg6, target:block4
|
|
|
|
block3:
|
|
[ f8] End value:reg5
|
|
|
|
block4:
|
|
[ 100] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
|
|
[ 118] End value:reg5
|