Files
ladybird/Tests/LibJS/Bytecode/expected/async-await-in-try-catch.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

57 lines
1.3 KiB
Plaintext

$0b8784bc async-await-in-try-catch.js:9:1
Registers: 8
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] GetGlobal dst:reg6, `f`
[ 18] NewObject dst:reg7
[ 28] Call dst:reg5, callee:reg6, this_value:Undefined, f, arguments:[reg7]
[ 50] End value:reg5
f$9cd82caf async-await-in-try-catch.js:2:5
Registers: 10
Blocks: 8
Locals: e~0
Constants:
[0] = Undefined
[1] = Int32(1)
block0:
[ 0] Yield continuation_label:block1, value:Undefined
block1:
[ 10] GetLexicalEnvironment dst:reg4
[ 18] Jump target:block4
block2:
[ 20] Catch dst:reg5
[ 28] SetLexicalEnvironment environment:reg4
[ 30] Mov dst:e~0, src:reg5
block3:
[ 40] Yield value:Undefined
block4:
[ 50] EnterObjectEnvironment dst:reg5, object:arg0
[ 60] Mov dst:reg6, src:reg0
[ 70] Await continuation_label:block5, argument:Int32(1)
block5:
[ 80] Mov dst:reg6, src:reg0
[ 90] GetCompletionFields type_dst:reg7, value_dst:reg8, completion:reg6
[ a0] JumpStrictlyEquals lhs:reg7, rhs:Int32(1), true_target:block6, false_target:block7
block6:
[ b8] SetLexicalEnvironment environment:reg4
[ c0] Jump target:block3
block7:
[ c8] SetLexicalEnvironment environment:reg4
[ d0] Throw src:reg8
Exception handlers:
[ 50 .. d8] => handler block2