mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +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.
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
$69cce752 destructure-array-rest.js:9:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `f`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, f
|
|
[ 38] End value:reg5
|
|
|
|
|
|
f$e318a32c destructure-array-rest.js:6:5
|
|
Registers: 12
|
|
Blocks: 6
|
|
Locals: a~0, b~1
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Undefined
|
|
|
|
block0:
|
|
[ 0] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
|
|
[ 28] Mov dst:reg6, src:Bool(false)
|
|
[ 38] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5
|
|
[ 50] IteratorNextUnpack dst_value:reg10, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
|
|
[ 68] JumpFalse condition:reg6, target:block2
|
|
|
|
block1:
|
|
[ 78] Mov dst:reg10, src:Undefined
|
|
[ 88] Jump target:block2
|
|
|
|
block2:
|
|
[ 90] Mov dst:a~0, src:reg10
|
|
[ a0] JumpFalse condition:reg6, target:block4
|
|
|
|
block3:
|
|
[ b0] NewArray dst:reg11
|
|
[ c0] Jump target:block5
|
|
|
|
block4:
|
|
[ c8] IteratorToArray dst:reg11, iterator_object:reg7, iterator_next_method:reg8, iterator_done_property:reg9
|
|
|
|
block5:
|
|
[ e0] Mov dst:b~1, src:reg11
|
|
[ f0] ThrowIfTDZ src:b~1
|
|
[ f8] Return value:b~1
|