mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 01:22:43 +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.
277 lines
6.4 KiB
Plaintext
277 lines
6.4 KiB
Plaintext
$4a68760f condition-dead-code-elim.js:141:1
|
|
Registers: 8
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Bool(true)
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `ternary_true`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, ternary_true
|
|
[ 38] GetGlobal dst:reg7, `ternary_truthy`
|
|
[ 50] Call dst:reg6, callee:reg7, this_value:Undefined, ternary_truthy
|
|
[ 70] GetGlobal dst:reg7, `ternary_false`
|
|
[ 88] Call dst:reg5, callee:reg7, this_value:Undefined, ternary_false
|
|
[ a8] GetGlobal dst:reg7, `ternary_falsey`
|
|
[ c0] Call dst:reg6, callee:reg7, this_value:Undefined, ternary_falsey
|
|
[ e0] GetGlobal dst:reg7, `while_falsey`
|
|
[ f8] Call dst:reg5, callee:reg7, this_value:Undefined, while_falsey
|
|
[ 118] GetGlobal dst:reg7, `do_while_falsey`
|
|
[ 130] Call dst:reg6, callee:reg7, this_value:Undefined, do_while_falsey
|
|
[ 150] GetGlobal dst:reg7, `if_falsely`
|
|
[ 168] Call dst:reg5, callee:reg7, this_value:Undefined, if_falsely
|
|
[ 188] GetGlobal dst:reg7, `if_truthy`
|
|
[ 1a0] Call dst:reg6, callee:reg7, this_value:Undefined, if_truthy
|
|
[ 1c0] GetGlobal dst:reg7, `if_exhausted`
|
|
[ 1d8] Call dst:reg5, callee:reg7, this_value:Undefined, if_exhausted
|
|
[ 1f8] GetGlobal dst:reg7, `for_false`
|
|
[ 210] Call dst:reg6, callee:reg7, this_value:Undefined, for_false
|
|
[ 230] GetGlobal dst:reg7, `for_true`
|
|
[ 248] Call dst:reg5, callee:reg7, this_value:Undefined, for_true, arguments:[Bool(true)]
|
|
[ 270] End value:reg5
|
|
|
|
|
|
ternary_true$adbcc261 condition-dead-code-elim.js:9:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Bool(true)
|
|
[1] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Return value:Int32(1)
|
|
|
|
|
|
ternary_truthy$8671fdc6 condition-dead-code-elim.js:12:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Return value:Int32(1)
|
|
|
|
|
|
ternary_false$1fde34b2 condition-dead-code-elim.js:15:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Return value:Int32(1)
|
|
|
|
|
|
ternary_falsey$1c25e5ad condition-dead-code-elim.js:18:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Return value:Int32(1)
|
|
|
|
|
|
while_falsey$5d6360eb condition-dead-code-elim.js:33:5
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Null
|
|
[2] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `alive`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 38] End value:Undefined
|
|
|
|
|
|
alive$57b46309 condition-dead-code-elim.js:2:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = String("alive")
|
|
|
|
block0:
|
|
[ 0] Return value:String("alive")
|
|
|
|
|
|
do_while_falsey$799dde23 condition-dead-code-elim.js:37:9
|
|
Registers: 7
|
|
Blocks: 4
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Undefined
|
|
[2] = Null
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `alive`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
|
|
block1:
|
|
[ 38] GetGlobal dst:reg6, `alive`
|
|
[ 50] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
|
|
block2:
|
|
[ 70] GetGlobal dst:reg6, `alive`
|
|
[ 88] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
|
|
block3:
|
|
[ a8] GetGlobal dst:reg6, `alive`
|
|
[ c0] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ e0] End value:Undefined
|
|
|
|
|
|
if_falsely$5d6360eb condition-dead-code-elim.js:62:5
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Null
|
|
[2] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `alive`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 38] End value:Undefined
|
|
|
|
|
|
if_truthy$ac929a95 condition-dead-code-elim.js:66:9
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Bool(true)
|
|
[1] = Undefined
|
|
[2] = String("abc")
|
|
[3] = Int32(123)
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `alive`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 38] GetGlobal dst:reg6, `alive`
|
|
[ 50] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 70] GetGlobal dst:reg6, `alive`
|
|
[ 88] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ a8] GetGlobal dst:reg6, `alive`
|
|
[ c0] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ e0] End value:Undefined
|
|
|
|
|
|
if_exhausted$80f20e23 condition-dead-code-elim.js:90:9
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Undefined
|
|
[2] = Bool(true)
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `alive`
|
|
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 38] GetGlobal dst:reg6, `alive`
|
|
[ 50] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 70] GetGlobal dst:reg6, `alive`
|
|
[ 88] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ a8] End value:Undefined
|
|
|
|
|
|
for_false$2883f85d condition-dead-code-elim.js:109:5
|
|
Registers: 7
|
|
Blocks: 9
|
|
Locals: x~0
|
|
Constants:
|
|
[0] = Bool(false)
|
|
[1] = Null
|
|
[2] = Undefined
|
|
|
|
block0:
|
|
[ 0] Jump target:block2
|
|
|
|
block1:
|
|
[ 8] End value:Undefined
|
|
|
|
block2:
|
|
[ 10] Jump target:block4
|
|
|
|
block3:
|
|
[ 18] End value:Undefined
|
|
|
|
block4:
|
|
[ 20] Jump target:block6
|
|
|
|
block5:
|
|
[ 28] End value:Undefined
|
|
|
|
block6:
|
|
[ 30] GetGlobal dst:reg5, `call_this`
|
|
[ 48] Call dst:x~0, callee:reg5, this_value:Undefined, call_this
|
|
[ 68] Jump target:block8
|
|
|
|
block7:
|
|
[ 70] End value:Undefined
|
|
|
|
block8:
|
|
[ 78] GetGlobal dst:reg6, `alive`
|
|
[ 90] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ b0] End value:Undefined
|
|
|
|
|
|
call_this$77eb3a07 condition-dead-code-elim.js:105:5
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Return value:Int32(1)
|
|
|
|
|
|
for_true$81dd51ad condition-dead-code-elim.js:128:5
|
|
Registers: 7
|
|
Blocks: 11
|
|
Constants:
|
|
[0] = Bool(true)
|
|
[1] = Undefined
|
|
[2] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] Jump target:block2
|
|
|
|
block1:
|
|
[ 8] GetGlobal dst:reg6, `alive`
|
|
[ 20] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ 40] JumpIf condition:arg0, true_target:block4, false_target:block5
|
|
|
|
block2:
|
|
[ 50] Jump target:block1
|
|
|
|
block3:
|
|
[ 58] Jump target:block7
|
|
|
|
block4:
|
|
[ 60] Jump target:block3
|
|
|
|
block5:
|
|
[ 68] Jump target:block2
|
|
|
|
block6:
|
|
[ 70] GetGlobal dst:reg6, `alive`
|
|
[ 88] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ a8] JumpIf condition:arg0, true_target:block9, false_target:block10
|
|
|
|
block7:
|
|
[ b8] Jump target:block6
|
|
|
|
block8:
|
|
[ c0] GetGlobal dst:reg6, `alive`
|
|
[ d8] Call dst:reg5, callee:reg6, this_value:Undefined, alive
|
|
[ f8] End value:Undefined
|
|
|
|
block9:
|
|
[ 100] Jump target:block8
|
|
|
|
block10:
|
|
[ 108] Jump target:block7
|