Files
ladybird/Tests/LibJS/Bytecode/expected/const-assignment-no-extra-tdz.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

44 lines
949 B
Plaintext

$5904f18d const-assignment-no-extra-tdz.js:1:1
Registers: 9
Blocks: 4
Locals: e~0
Constants:
[0] = Undefined
block0:
[ 0] GetLexicalEnvironment dst:reg4
[ 8] Jump target:block3
block1:
[ 10] Catch dst:reg5
[ 18] SetLexicalEnvironment environment:reg4
[ 20] Mov3 dst1:e~0, src1:reg5, dst2:reg6, src2:Undefined, dst3:reg7, src3:reg6
block2:
[ 40] End value:reg6
block3:
[ 48] Mov dst:reg5, src:Undefined
[ 58] GetGlobal dst:reg8, `f`
[ 70] Call dst:reg6, callee:reg8, this_value:Undefined, f
[ 90] Mov2 dst1:reg5, src1:reg6, dst2:reg6, src2:reg5
[ a8] End value:reg6
Exception handlers:
[ 48 .. b0] => handler block1
f$22fe0a32 const-assignment-no-extra-tdz.js:2:5
Registers: 5
Blocks: 1
Locals: x~0
Constants:
[0] = Int32(1)
[1] = Int32(2)
[2] = Undefined
block0:
[ 0] Mov dst:x~0, src:Int32(1)
[ 10] ThrowConstAssignment
[ 18] End value:Undefined