mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 01:46:46 +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.
32 lines
954 B
Plaintext
32 lines
954 B
Plaintext
$5b93d13b optional-chain-base-identifier.js:1:1
|
|
Registers: 9
|
|
Blocks: 4
|
|
Constants:
|
|
[0] = Int32(44)
|
|
[1] = Undefined
|
|
|
|
block0:
|
|
[ 0] NewObject dst:reg5
|
|
[ 10] NewObject dst:reg6
|
|
[ 20] InitObjectLiteralProperty object:reg6, `b`, src:Int32(44), shape_cache_index:1, property_slot:0
|
|
[ 38] CacheObjectShape object:reg6
|
|
[ 48] InitObjectLiteralProperty object:reg5, `a`, src:reg6, shape_cache_index:0, property_slot:0
|
|
[ 60] CacheObjectShape object:reg5
|
|
[ 70] SetGlobal `obj`, src:reg5
|
|
[ 88] Mov dst:reg5, src:Undefined
|
|
[ 98] GetGlobal dst:reg7, `obj`
|
|
[ b0] GetById dst:reg8, base:reg7, `a` (obj.a)
|
|
[ d0] Mov2 dst1:reg5, src1:reg7, dst2:reg6, src2:reg8
|
|
[ e8] JumpNullish condition:reg6, true_target:block1, false_target:block3
|
|
|
|
block1:
|
|
[ f8] Mov dst:reg6, src:Undefined
|
|
|
|
block2:
|
|
[ 108] End value:reg6
|
|
|
|
block3:
|
|
[ 110] Mov dst:reg5, src:reg6
|
|
[ 120] GetById dst:reg6, base:reg6, `b`
|
|
[ 140] End value:reg6
|