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.
27 lines
771 B
Text
27 lines
771 B
Text
$546ebce0 eval-scope-optimization.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$ae1b8240 eval-scope-optimization.js:9:5
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
[1] = Int32(42)
|
|
|
|
block0:
|
|
[ 0] CreateVariable `inner`, is_immutable:false, is_global:false, is_strict:false
|
|
[ 10] InitializeVariableBinding `inner`, src:Undefined
|
|
[ 28] NewFunction dst:reg5, shared_function_data_index:0
|
|
[ 40] SetVariableBinding `inner`, src:reg5
|
|
[ 58] GetGlobal dst:reg6, `Number`
|
|
[ 68] CallConstruct dst:reg5, callee:reg6, Number, arguments:[Int32(42)]
|
|
[ 88] Return value:reg5
|