ladybird/Tests/LibJS/Bytecode/expected/local-variables.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

52 lines
1.1 KiB
Text

$568ccc50 local-variables.js:20:1
Registers: 8
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] GetGlobal dst:reg6, `simple_let`
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, simple_let
[ 38] GetGlobal dst:reg7, `simple_const`
[ 50] Call dst:reg6, callee:reg7, this_value:Undefined, simple_const
[ 70] GetGlobal dst:reg7, `multiple_locals`
[ 88] Call dst:reg5, callee:reg7, this_value:Undefined, multiple_locals
[ a8] End value:reg5
simple_let$40478631 local-variables.js:5:5
Registers: 5
Blocks: 1
Locals: x~0
Constants:
[0] = Int32(1)
block0:
[ 0] Mov dst:x~0, src:Int32(1)
[ 10] Return value:x~0
simple_const$80d5d79e local-variables.js:10:5
Registers: 5
Blocks: 1
Locals: y~0
Constants:
[0] = Int32(2)
block0:
[ 0] Mov dst:y~0, src:Int32(2)
[ 10] Return value:y~0
multiple_locals$77559ec6 local-variables.js:15:5
Registers: 6
Blocks: 1
Locals: a~0, b~1
Constants:
[0] = Int32(1)
[1] = Int32(2)
block0:
[ 0] Mov2 dst1:a~0, src1:Int32(1), dst2:b~1, src2:Int32(2)
[ 18] Add dst:reg5, lhs:a~0, rhs:b~1
[ 28] Return value:reg5