ladybird/Tests/LibJS/Bytecode/expected/condition-dead-code-elim.txt
Andreas Kling 21cbfb3cb1 LibJS: Drop source ranges from bytecode source maps
Store source map locations as bytecode offset, line, and column.
Runtime consumers only emit the start line and column, so source end
positions and source text offsets do not need to be carried through
Executable source maps, bytecode cache serialization, or the Rust FFI.

Keep SourceCode's internal position cache able to track source text
offsets so callers can still translate source offsets to line and
column pairs when needed. Hash dump-bytecode IDs from the name, first
source position, and bytecode size instead of source slices that need
end offsets.

Bump the bytecode cache format version for the slimmer serialized
source map entry shape.
2026-05-14 09:41:03 +02:00

276 lines
6.4 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: 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$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