ladybird/Tests/LibJS/Bytecode/expected/condition-dead-code-elim.txt
Andreas Kling a31c2c388b LibJS: Stop persisting basic_block_start_offsets on Executable
Keep basic block offsets as construction-only metadata rather than
storing them on every Executable. The validator now receives the offsets
through a transient Rust FFI span, and the bytecode dump rebuilds block
starts by scanning labels, terminators, and exception handler metadata.

Drop the table from the bytecode cache format and bump the format
version so old caches are rebuilt. This removes a field that was only
used by validation and bytecode dump paths.
2026-05-14 12:08:12 +02:00

270 lines
6.3 KiB
Text

$ec8fc79b 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$cd62d477 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$8c4636c2 condition-dead-code-elim.js:12:5
Registers: 5
Blocks: 1
Constants:
[0] = Int32(1)
block0:
[ 0] Return value:Int32(1)
ternary_false$0ff09522 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$47046b1e 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$17590e95 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$dfea904d condition-dead-code-elim.js:2:5
Registers: 5
Blocks: 1
Constants:
[0] = String("alive")
block0:
[ 0] Return value:String("alive")
do_while_falsey$2b22dba1 condition-dead-code-elim.js:37:9
Registers: 7
Blocks: 1
Constants:
[0] = Bool(false)
[1] = Undefined
[2] = Null
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_falsely$537336d6 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$a6783770 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$9d4f2301 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$23671fdc 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$7cdf005a condition-dead-code-elim.js:105:5
Registers: 5
Blocks: 1
Constants:
[0] = Int32(1)
block0:
[ 0] Return value:Int32(1)
for_true$e3e30115 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