Store compact cache indexes in bytecode instructions instead of raw pointers to the executable cache vectors. This keeps the instruction stream independent from heap addresses and removes pointer fixups when materializing cached bytecode. Resolve the mutable cache pointers at execution time from the current Executable. Bytecode test expectations are updated for the smaller cache operands and resulting instruction offsets.
98 lines
2.8 KiB
Text
98 lines
2.8 KiB
Text
$48d208fa 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`
|
|
[ 10] GetById dst:reg7, base:reg6, `log` (console.log)
|
|
[ 28] GetGlobal dst:reg9, `eval`
|
|
[ 38] CallDirectEval dst:reg8, callee:reg9, this_value:Undefined, eval, arguments:[String("switch(1) { case 1: 'hello'; let x = 1; }")]
|
|
[ 60] Call dst:reg5, callee:reg7, this_value:reg6, console.log, arguments:[reg8]
|
|
[ 88] GetGlobal dst:reg6, `console`
|
|
[ 98] GetById dst:reg8, base:reg6, `log` (console.log)
|
|
[ b0] GetGlobal dst:reg10, `eval`
|
|
[ c0] CallDirectEval dst:reg9, callee:reg10, this_value:Undefined, eval, arguments:[String("switch(1) { case 1: 'first'; 'second'; }")]
|
|
[ e8] Call dst:reg7, callee:reg8, this_value:reg6, console.log, arguments:[reg9]
|
|
[ 110] GetGlobal dst:reg8, `console`
|
|
[ 120] GetById dst:reg6, base:reg8, `log` (console.log)
|
|
[ 138] GetGlobal dst:reg10, `eval`
|
|
[ 148] CallDirectEval dst:reg9, callee:reg10, this_value:Undefined, eval, arguments:[String("switch(1) { case 1: 'matched'; break; default: 'default'; }")]
|
|
[ 170] Call dst:reg5, callee:reg6, this_value:reg8, console.log, arguments:[reg9]
|
|
[ 198] 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"
|