Track bytecode-created declarative bindings while generating code so most environment-coordinate operands can be emitted eagerly. Dynamic lookup instructions remain for scopes where eval or object environments can change resolution at runtime. This lets the static coordinate bytecode variants run without cached- vs-uncached branches or eval poison checks, and rebaselines bytecode output for the newly eager coordinate operands.
84 lines
2.6 KiB
Text
84 lines
2.6 KiB
Text
$b5fc1514 for-loop-scoping.js:8:1
|
|
Registers: 10
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `console`
|
|
[ 10] GetById dst:reg7, base:reg6, `log` (console.log)
|
|
[ 28] GetGlobal dst:reg9, `forLetClosure`
|
|
[ 38] Call dst:reg8, callee:reg9, this_value:Undefined, forLetClosure
|
|
[ 58] Call dst:reg5, callee:reg7, this_value:reg6, console.log, arguments:[reg8]
|
|
[ 80] End value:reg5
|
|
|
|
|
|
forLetClosure$1bcc2cf5 for-loop-scoping.js:2:15
|
|
Registers: 10
|
|
Blocks: 4
|
|
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, is_catch_environment:false
|
|
[ 30] CreateVariable `i`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 40] InitializeLexicalBinding `i`, src:Int32(0)
|
|
[ 58] GetBinding dst:reg6, `i`
|
|
[ 70] SetLexicalEnvironment environment:reg4
|
|
[ 78] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0, is_catch_environment:false
|
|
[ 90] CreateVariable `i`, is_immutable:false, is_global:false, is_strict:false
|
|
[ a0] InitializeLexicalBinding `i`, src:reg6
|
|
[ b8] Jump target:block2
|
|
|
|
block1:
|
|
[ c0] GetById dst:reg7, base:fns~0, `push` (fns.push)
|
|
[ d8] Mov dst:reg8, src:fns~0
|
|
[ e8] NewFunction dst:reg9, shared_function_data_index:0
|
|
[ 100] Call dst:reg6, callee:reg7, this_value:reg8, fns.push, arguments:[reg9]
|
|
[ 128] GetBinding dst:reg6, `i`
|
|
[ 140] SetLexicalEnvironment environment:reg4
|
|
[ 148] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0, is_catch_environment:false
|
|
[ 160] CreateVariable `i`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 170] InitializeLexicalBinding `i`, src:reg6
|
|
[ 188] GetBinding dst:reg7, `i`
|
|
[ 1a0] PostfixIncrement dst:reg6, src:reg7
|
|
[ 1b0] SetLexicalBinding `i`, src:reg7
|
|
|
|
block2:
|
|
[ 1c8] GetBinding dst:reg6, `i`
|
|
[ 1e0] JumpLessThan lhs:reg6, rhs:Int32(3), true_target:block1, false_target:block3
|
|
|
|
block3:
|
|
[ 1f8] SetLexicalEnvironment environment:reg4
|
|
[ 200] GetById dst:reg6, base:fns~0, `map` (fns.map)
|
|
[ 218] Mov dst:reg7, src:fns~0
|
|
[ 228] NewFunction dst:reg8, shared_function_data_index:1
|
|
[ 240] Call dst:reg5, callee:reg6, this_value:reg7, fns.map, arguments:[reg8]
|
|
[ 268] 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
|
|
|
|
|
|
$f755759b for-loop-scoping.js:4:18
|
|
Registers: 6
|
|
Blocks: 1
|
|
|
|
block0:
|
|
[ 0] DynamicGetBinding dst:reg5, `i`
|
|
[ 10] Return value:reg5
|
|
|
|
|
|
[ 0, 1, 2 ]
|