ladybird/Tests/LibJS/Bytecode/expected/if-else-register-lifetime.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

76 lines
2.1 KiB
Text

$c02559ef if-else-register-lifetime.js:11:1
Registers: 8
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] GetGlobal dst:reg6, `test`
[ 18] NewPrimitiveArray dst:reg7, elements:[1]
[ 30] Call dst:reg5, callee:reg6, this_value:Undefined, test, arguments:[reg7]
[ 58] End value:reg5
test$5f5e45da if-else-register-lifetime.js:2:5
Registers: 13
Blocks: 12
Locals: a~0, i~1, j~2
Constants:
[0] = Undefined
[1] = Int32(1)
[2] = Int32(0)
[3] = Int32(10)
[4] = Int32(5)
[5] = Int32(3)
block0:
[ 0] Mov3 dst1:a~0, src1:Undefined, dst2:i~1, src2:Undefined, dst3:j~2, src3:Undefined
[ 20] Mov2 dst1:a~0, src1:Int32(1), dst2:i~1, src2:Int32(0)
[ 38] Jump target:block3
block1:
[ 40] Mov dst:j~2, src:Int32(0)
[ 50] Jump target:block7
block2:
[ 58] PostfixIncrement dst:reg5, src:i~1
block3:
[ 68] JumpLessThan lhs:i~1, rhs:Int32(10), true_target:block1, false_target:block4
block4:
[ 80] GetGlobal dst:reg7, `parseInt`
[ 98] Mov dst:reg10, src:a~0
[ a8] Call dst:reg5, callee:reg7, this_value:Undefined, parseInt, arguments:[reg10]
[ d0] Return value:reg5
block5:
[ d8] JumpLessThan lhs:j~2, rhs:Int32(5), true_target:block9, false_target:block10
block6:
[ f0] PostfixIncrement dst:reg5, src:j~2
block7:
[ 100] JumpLessThan lhs:j~2, rhs:Int32(10), true_target:block5, false_target:block8
block8:
[ 118] Jump target:block2
block9:
[ 120] Mov3 dst1:reg6, src1:arg0, dst2:reg7, src2:j~2, dst3:reg8, src3:arg0
[ 140] Add dst:reg9, lhs:i~1, rhs:j~2
[ 150] GetByValue dst:reg10, base:reg8, property:reg9 (x[reg9])
[ 168] PutByValue base:reg6, property:reg7, src:reg10, kind:Normal (x[reg7])
[ 180] Jump target:block11
block10:
[ 188] Mov2 dst1:reg10, src1:arg0, dst2:reg6, src2:j~2
[ 1a0] GetGlobal dst:reg8, `parseInt`
[ 1b8] Mov dst:reg9, src:arg0
[ 1c8] Sub dst:reg11, lhs:j~2, rhs:Int32(3)
[ 1d8] GetByValue dst:reg12, base:reg9, property:reg11 (x[reg11])
[ 1f0] Call dst:reg7, callee:reg8, this_value:Undefined, parseInt, arguments:[reg12, Int32(1)]
[ 218] PutByValue base:reg10, property:reg6, src:reg7, kind:Normal (x[reg6])
block11:
[ 230] Jump target:block6