ladybird/Tests/LibJS/Bytecode/expected/switch-scoping.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

84 lines
2.4 KiB
Text

$ac230b38 switch-scoping.js:15:1
Registers: 11
Blocks: 1
Constants:
[0] = Undefined
[1] = Int32(1)
[2] = Int32(2)
block0:
[ 0] GetGlobal dst:reg6, `console`
[ 18] GetById dst:reg7, base:reg6, `log` (console.log)
[ 38] GetGlobal dst:reg9, `switchWithBlockDecl`
[ 50] Call dst:reg8, callee:reg9, this_value:Undefined, switchWithBlockDecl, arguments:[Int32(1)]
[ 78] Call dst:reg5, callee:reg7, this_value:reg6, console.log, arguments:[reg8]
[ a0] GetGlobal dst:reg6, `console`
[ b8] GetById dst:reg8, base:reg6, `log` (console.log)
[ d8] GetGlobal dst:reg10, `switchWithBlockDecl`
[ f0] Call dst:reg9, callee:reg10, this_value:Undefined, switchWithBlockDecl, arguments:[Int32(2)]
[ 118] Call dst:reg7, callee:reg8, this_value:reg6, console.log, arguments:[reg9]
[ 140] End value:reg7
switchWithBlockDecl$4f465f02 switch-scoping.js:2:5
Registers: 7
Blocks: 6
Locals: result~0
Constants:
[0] = Undefined
[1] = Int32(1)
[2] = Int32(2)
[3] = String("one")
[4] = String("two")
block0:
[ 0] GetLexicalEnvironment dst:reg4
[ 8] Mov dst:result~0, src:Undefined
[ 18] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0
[ 28] CreateMutableBinding environment:reg5, `a`, can_be_deleted:false
[ 38] CreateMutableBinding environment:reg5, `b`, can_be_deleted:false
[ 48] JumpStrictlyEquals lhs:Int32(1), rhs:arg0, true_target:block3, false_target:block1
block1:
[ 60] JumpStrictlyEquals lhs:Int32(2), rhs:arg0, true_target:block4, false_target:block2
block2:
[ 78] Jump target:block5
block3:
[ 80] InitializeLexicalBinding `a`, src:String("one")
[ 98] NewFunction dst:reg6, shared_function_data_index:0 (result)
[ b0] Mov dst:result~0, src:reg6
[ c0] Jump target:block5
block4:
[ c8] InitializeLexicalBinding `b`, src:String("two")
[ e0] NewFunction dst:reg6, shared_function_data_index:1 (result)
[ f8] Mov dst:result~0, src:reg6
block5:
[ 108] SetLexicalEnvironment environment:reg4
[ 110] Call dst:reg5, callee:result~0, this_value:Undefined, result
[ 130] Return value:reg5
result$38b0d48c switch-scoping.js:6:22
Registers: 6
Blocks: 1
block0:
[ 0] GetBinding dst:reg5, `a`
[ 18] Return value:reg5
result$ff741ac0 switch-scoping.js:10:22
Registers: 6
Blocks: 1
block0:
[ 0] GetBinding dst:reg5, `b`
[ 18] Return value:reg5
"one"
"two"