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.
98 lines
2.8 KiB
Text
98 lines
2.8 KiB
Text
$bf243d42 switch-completion-value.js:1:1
|
|
Registers: 11
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = String("switch(1) { case 1: 'hello'; let x = 1; }")
|
|
[2] = String("switch(1) { case 1: 'first'; 'second'; }")
|
|
[3] = String("switch(1) { case 1: 'matched'; break; default: 'default'; }")
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `console`
|
|
[ 18] GetById dst:reg7, base:reg6, `log` (console.log)
|
|
[ 38] GetGlobal dst:reg9, `eval`
|
|
[ 50] CallDirectEval dst:reg8, callee:reg9, this_value:Undefined, eval, arguments:[String("switch(1) { case 1: 'hello'; let x = 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, `eval`
|
|
[ f0] CallDirectEval dst:reg9, callee:reg10, this_value:Undefined, eval, arguments:[String("switch(1) { case 1: 'first'; 'second'; }")]
|
|
[ 118] Call dst:reg7, callee:reg8, this_value:reg6, console.log, arguments:[reg9]
|
|
[ 140] GetGlobal dst:reg8, `console`
|
|
[ 158] GetById dst:reg6, base:reg8, `log` (console.log)
|
|
[ 178] GetGlobal dst:reg10, `eval`
|
|
[ 190] CallDirectEval dst:reg9, callee:reg10, this_value:Undefined, eval, arguments:[String("switch(1) { case 1: 'matched'; break; default: 'default'; }")]
|
|
[ 1b8] Call dst:reg5, callee:reg6, this_value:reg8, console.log, arguments:[reg9]
|
|
[ 1e0] End value:reg5
|
|
|
|
|
|
eval$6559f0fb line 1, column 1
|
|
Registers: 7
|
|
Blocks: 3
|
|
Locals: x~0
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
[2] = String("hello")
|
|
|
|
block0:
|
|
[ 0] Mov dst:reg5, src:Undefined
|
|
[ 10] JumpStrictlyEquals lhs:Int32(1), rhs:Int32(1), true_target:block2, false_target:block1
|
|
|
|
block1:
|
|
[ 28] End value:reg5
|
|
|
|
block2:
|
|
[ 30] Mov2 dst1:reg5, src1:String("hello"), dst2:x~0, src2:Int32(1)
|
|
[ 48] End value:reg5
|
|
|
|
|
|
eval$6559f0fb line 1, column 1
|
|
Registers: 7
|
|
Blocks: 3
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
[2] = String("first")
|
|
[3] = String("second")
|
|
|
|
block0:
|
|
[ 0] Mov dst:reg5, src:Undefined
|
|
[ 10] JumpStrictlyEquals lhs:Int32(1), rhs:Int32(1), true_target:block2, false_target:block1
|
|
|
|
block1:
|
|
[ 28] End value:reg5
|
|
|
|
block2:
|
|
[ 30] Mov2 dst1:reg5, src1:String("first"), dst2:reg5, src2:String("second")
|
|
[ 48] End value:reg5
|
|
|
|
|
|
eval$6da5c42b line 1, column 1
|
|
Registers: 7
|
|
Blocks: 4
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
[2] = String("matched")
|
|
[3] = String("default")
|
|
|
|
block0:
|
|
[ 0] Mov dst:reg5, src:Undefined
|
|
[ 10] JumpStrictlyEquals lhs:Int32(1), rhs:Int32(1), true_target:block2, false_target:block1
|
|
|
|
block1:
|
|
[ 28] Jump target:block3
|
|
|
|
block2:
|
|
[ 30] Mov dst:reg5, src:String("matched")
|
|
[ 40] End value:reg5
|
|
|
|
block3:
|
|
[ 48] Mov dst:reg5, src:String("default")
|
|
[ 58] End value:reg5
|
|
|
|
|
|
"hello"
|
|
"second"
|
|
"matched"
|