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.
86 lines
2.5 KiB
Text
86 lines
2.5 KiB
Text
$3ce5efbc for-loop-scoping.js:8:1
|
|
Registers: 10
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `console`
|
|
[ 18] GetById dst:reg7, base:reg6, `log` (console.log)
|
|
[ 38] GetGlobal dst:reg9, `forLetClosure`
|
|
[ 50] Call dst:reg8, callee:reg9, this_value:Undefined, forLetClosure
|
|
[ 70] Call dst:reg5, callee:reg7, this_value:reg6, console.log, arguments:[reg8]
|
|
[ 98] End value:reg5
|
|
|
|
|
|
forLetClosure$9d2e257d for-loop-scoping.js:2:15
|
|
Registers: 10
|
|
Blocks: 5
|
|
Locals: fns~0
|
|
Constants:
|
|
[0] = Int32(0)
|
|
[1] = Int32(3)
|
|
|
|
block0:
|
|
[ 0] GetLexicalEnvironment dst:reg4
|
|
[ 8] NewArray dst:fns~0
|
|
[ 18] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0
|
|
[ 28] CreateVariable `i`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 38] InitializeLexicalBinding `i`, src:Int32(0)
|
|
[ 50] GetBinding dst:reg6, `i`
|
|
[ 68] SetLexicalEnvironment environment:reg4
|
|
[ 70] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0
|
|
[ 80] CreateVariable `i`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 90] InitializeLexicalBinding `i`, src:reg6
|
|
[ a8] Jump target:block3
|
|
|
|
block1:
|
|
[ b0] GetById dst:reg7, base:fns~0, `push` (fns.push)
|
|
[ d0] Mov dst:reg8, src:fns~0
|
|
[ e0] NewFunction dst:reg9, shared_function_data_index:0
|
|
[ f8] Call dst:reg6, callee:reg7, this_value:reg8, fns.push, arguments:[reg9]
|
|
[ 120] GetBinding dst:reg6, `i`
|
|
[ 138] SetLexicalEnvironment environment:reg4
|
|
[ 140] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0
|
|
[ 150] CreateVariable `i`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 160] InitializeLexicalBinding `i`, src:reg6
|
|
|
|
block2:
|
|
[ 178] GetBinding dst:reg7, `i`
|
|
[ 190] PostfixIncrement dst:reg6, src:reg7
|
|
[ 1a0] SetLexicalBinding `i`, src:reg7
|
|
|
|
block3:
|
|
[ 1b8] GetBinding dst:reg6, `i`
|
|
[ 1d0] JumpLessThan lhs:reg6, rhs:Int32(3), true_target:block1, false_target:block4
|
|
|
|
block4:
|
|
[ 1e8] SetLexicalEnvironment environment:reg4
|
|
[ 1f0] GetById dst:reg6, base:fns~0, `map` (fns.map)
|
|
[ 210] Mov dst:reg7, src:fns~0
|
|
[ 220] NewFunction dst:reg8, shared_function_data_index:1
|
|
[ 238] Call dst:reg5, callee:reg6, this_value:reg7, fns.map, arguments:[reg8]
|
|
[ 260] Return value:reg5
|
|
|
|
|
|
$617ce76f for-loop-scoping.js:6:20
|
|
Registers: 6
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] Call dst:reg5, callee:arg0, this_value:Undefined, f
|
|
[ 20] Return value:reg5
|
|
|
|
|
|
$732f8c03 for-loop-scoping.js:4:18
|
|
Registers: 6
|
|
Blocks: 1
|
|
|
|
block0:
|
|
[ 0] GetBinding dst:reg5, `i`
|
|
[ 18] Return value:reg5
|
|
|
|
|
|
[ 0, 1, 2 ]
|