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.
79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
$bfb1383b async-generator-yield.js:7:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `f`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, f, arguments:[Int32(1)]
|
|
[ 40] End value:reg5
|
|
|
|
|
|
f$a4f936a8 async-generator-yield.js:5:5
|
|
Registers: 10
|
|
Blocks: 16
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
[2] = Int32(4)
|
|
[3] = Int32(5)
|
|
|
|
block0:
|
|
[ 0] Yield continuation_label:block1, value:Undefined
|
|
|
|
block1:
|
|
[ 10] Await continuation_label:block3, argument:arg0
|
|
|
|
block2:
|
|
[ 20] Mov dst:reg5, src:reg0
|
|
[ 30] GetCompletionFields type_dst:reg6, value_dst:reg7, completion:reg5
|
|
[ 40] JumpStrictlyEquals lhs:reg6, rhs:Int32(1), true_target:block12, false_target:block13
|
|
|
|
block3:
|
|
[ 58] Mov dst:reg5, src:reg0
|
|
[ 68] GetCompletionFields type_dst:reg6, value_dst:reg7, completion:reg5
|
|
[ 78] JumpStrictlyEquals lhs:reg6, rhs:Int32(1), true_target:block4, false_target:block5
|
|
|
|
block4:
|
|
[ 90] Yield continuation_label:block6, value:reg7
|
|
|
|
block5:
|
|
[ a0] Throw src:reg7
|
|
|
|
block6:
|
|
[ a8] Mov dst:reg5, src:reg0
|
|
[ b8] GetCompletionFields type_dst:reg6, value_dst:reg7, completion:reg5
|
|
[ c8] JumpStrictlyInequals lhs:reg6, rhs:Int32(4), true_target:block2, false_target:block7
|
|
|
|
block7:
|
|
[ e0] Await continuation_label:block8, argument:reg7
|
|
|
|
block8:
|
|
[ f0] Mov dst:reg5, src:reg0
|
|
[ 100] GetCompletionFields type_dst:reg6, value_dst:reg7, completion:reg5
|
|
[ 110] JumpStrictlyEquals lhs:reg6, rhs:Int32(1), true_target:block9, false_target:block10
|
|
|
|
block9:
|
|
[ 128] JumpStrictlyEquals lhs:reg6, rhs:Int32(5), true_target:block2, false_target:block11
|
|
|
|
block10:
|
|
[ 140] Throw src:reg7
|
|
|
|
block11:
|
|
[ 148] SetCompletionType completion:reg5
|
|
[ 158] Jump target:block2
|
|
|
|
block12:
|
|
[ 160] Yield value:Undefined
|
|
|
|
block13:
|
|
[ 170] JumpStrictlyEquals lhs:reg6, rhs:Int32(5), true_target:block14, false_target:block15
|
|
|
|
block14:
|
|
[ 188] Throw src:reg7
|
|
|
|
block15:
|
|
[ 190] Yield value:reg7
|