Files
ladybird/Tests/LibJS/Bytecode/expected/destructuring-no-base-identifier.txt
Andreas Kling 3a08f7b95f LibJS: Drop dead entry GetLexicalEnvironment loads
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.
2026-04-13 18:29:43 +02:00

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