ladybird/Tests/LibJS/Bytecode/expected/const-fold-template-literals.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

106 lines
3 KiB
Text

$5034494e const-fold-template-literals.js:20:1
Registers: 7
Blocks: 1
Constants:
[0] = String("abc")
[1] = String("xyz")
[2] = String("abcxyz")
[3] = String("")
[4] = Undefined
[5] = Int32(1)
[6] = Int32(2)
[7] = Int32(3)
block0:
[ 0] InitializeLexicalBinding `a`, src:String("abcxyz")
[ 18] InitializeLexicalBinding `b`, src:String("abcxyz")
[ 30] InitializeLexicalBinding `c`, src:String("abcxyz")
[ 48] InitializeLexicalBinding `d`, src:String("abcxyz")
[ 60] InitializeLexicalBinding `e`, src:String("abcxyz")
[ 78] InitializeLexicalBinding `f`, src:String("abcxyz")
[ 90] Mov dst:reg5, src:String("abc")
[ a0] ConcatString dst:reg5, src:String("xyz")
[ b0] InitializeLexicalBinding `g`, src:reg5
[ c8] GetGlobal dst:reg6, `prefix`
[ e0] Call dst:reg5, callee:reg6, this_value:Undefined, prefix, arguments:[String("abc")]
[ 108] InitializeLexicalBinding `_prefix`, src:reg5
[ 120] GetGlobal dst:reg6, `suffix`
[ 138] Call dst:reg5, callee:reg6, this_value:Undefined, suffix, arguments:[String("abc")]
[ 160] InitializeLexicalBinding `_suffix`, src:reg5
[ 178] GetGlobal dst:reg6, `tostring`
[ 190] Call dst:reg5, callee:reg6, this_value:Undefined, tostring, arguments:[String("abc")]
[ 1b8] InitializeLexicalBinding `_tostring`, src:reg5
[ 1d0] GetGlobal dst:reg6, `multi`
[ 1e8] Call dst:reg5, callee:reg6, this_value:Undefined, multi, arguments:[Int32(1), Int32(2), Int32(3)]
[ 218] InitializeLexicalBinding `_multi`, src:reg5
[ 230] GetGlobal dst:reg6, `literal`
[ 248] Call dst:reg5, callee:reg6, this_value:Undefined, literal
[ 268] InitializeLexicalBinding `_literal`, src:reg5
[ 280] GetGlobal dst:reg6, `empty`
[ 298] Call dst:reg5, callee:reg6, this_value:Undefined, empty
[ 2b8] InitializeLexicalBinding `_empty`, src:reg5
[ 2d0] End value:Undefined
prefix$722bd91a const-fold-template-literals.js:2:5
Registers: 6
Blocks: 1
Constants:
[0] = String("prefix-")
block0:
[ 0] Mov dst:reg5, src:String("prefix-")
[ 10] ConcatString dst:reg5, src:arg0
[ 20] Return value:reg5
suffix$a92a9be2 const-fold-template-literals.js:5:5
Registers: 6
Blocks: 1
Constants:
[0] = String("-suffix")
block0:
[ 0] ToString dst:reg5, value:arg0
[ 10] ConcatString dst:reg5, src:String("-suffix")
[ 20] Return value:reg5
tostring$ba142bc6 const-fold-template-literals.js:8:5
Registers: 6
Blocks: 1
block0:
[ 0] ToString dst:reg5, value:arg0
[ 10] Return value:reg5
multi$05431102 const-fold-template-literals.js:11:5
Registers: 6
Blocks: 1
block0:
[ 0] ToString dst:reg5, value:arg0
[ 10] ConcatString dst:reg5, src:arg1
[ 20] ConcatString dst:reg5, src:arg2
[ 30] Return value:reg5
literal$12c5c655 const-fold-template-literals.js:14:5
Registers: 6
Blocks: 1
Constants:
[0] = String("hello world")
block0:
[ 0] Return value:String("hello world")
empty$4890c274 const-fold-template-literals.js:17:5
Registers: 5
Blocks: 1
Constants:
[0] = String("")
block0:
[ 0] Return value:String("")