Add separate bytecode instructions for environment lookups that must stay dynamic, such as eval- and with-sensitive scopes. Keep the coordinate variants for eagerly resolved declarative environments so their operands can be treated as immutable at runtime. This removes cached-coordinate mutation from the interpreter paths and updates the bytecode expectations for the new dynamic lookup opcodes.
39 lines
979 B
Text
39 lines
979 B
Text
$49b95e06 eval-same-function.js:10:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `foo`
|
|
[ 10] Call dst:reg5, callee:reg6, this_value:Undefined, foo
|
|
[ 30] End value:reg5
|
|
|
|
|
|
foo$bf97ec0c eval-same-function.js:6:9
|
|
Registers: 8
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = String("var x = 1")
|
|
[1] = Undefined
|
|
[2] = Int32(42)
|
|
|
|
block0:
|
|
[ 0] CreateArguments is_immutable:false
|
|
[ 10] DynamicGetCalleeAndThisFromEnvironment callee:reg6, this_value:reg7, `eval`
|
|
[ 20] CallDirectEval dst:reg5, callee:reg6, this_value:reg7, eval, arguments:[String("var x = 1")]
|
|
[ 48] DynamicGetBinding dst:reg6, `Number`
|
|
[ 58] CallConstruct dst:reg5, callee:reg6, Number, arguments:[Int32(42)]
|
|
[ 78] Return value:reg5
|
|
|
|
|
|
eval$d8e83433 line 1, column 1
|
|
Registers: 5
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Int32(1)
|
|
[1] = Undefined
|
|
|
|
block0:
|
|
[ 0] DynamicSetLexicalBinding `x`, src:Int32(1)
|
|
[ 10] End value:Undefined
|