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.
38 lines
1 KiB
Text
38 lines
1 KiB
Text
$546ebce0 captured-variables.js:12:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `outer`
|
|
[ 10] Call dst:reg5, callee:reg6, this_value:Undefined, outer
|
|
[ 30] End value:reg5
|
|
|
|
|
|
outer$65f64384 captured-variables.js:5:5
|
|
Registers: 7
|
|
Blocks: 1
|
|
Locals: inner~0
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(1)
|
|
|
|
block0:
|
|
[ 0] GetLexicalEnvironment dst:reg4
|
|
[ 8] Mov dst:inner~0, src:Undefined
|
|
[ 18] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:1, is_catch_environment:false
|
|
[ 30] CreateVariable `captured`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 40] NewFunction dst:inner~0, shared_function_data_index:0
|
|
[ 58] InitializeLexicalBinding `captured`, src:Int32(1)
|
|
[ 70] Call dst:reg6, callee:inner~0, this_value:Undefined, inner
|
|
[ 90] Return value:reg6
|
|
|
|
|
|
inner$6897e27d captured-variables.js:7:9
|
|
Registers: 6
|
|
Blocks: 1
|
|
|
|
block0:
|
|
[ 0] DynamicGetBinding dst:reg5, `captured`
|
|
[ 10] Return value:reg5
|