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.
35 lines
975 B
Text
35 lines
975 B
Text
$491e5adb with-statement.js:7:1
|
|
Registers: 7
|
|
Blocks: 1
|
|
Constants:
|
|
[0] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetGlobal dst:reg6, `withBlock`
|
|
[ 10] Call dst:reg5, callee:reg6, this_value:Undefined, withBlock
|
|
[ 30] End value:reg5
|
|
|
|
|
|
withBlock$1119afe3 with-statement.js:2:15
|
|
Registers: 10
|
|
Blocks: 1
|
|
Locals: obj~0
|
|
Constants:
|
|
[0] = Int32(42)
|
|
[1] = Undefined
|
|
|
|
block0:
|
|
[ 0] GetLexicalEnvironment dst:reg4
|
|
[ 8] NewObject dst:obj~0
|
|
[ 18] InitObjectLiteralProperty object:obj~0, `x`, src:Int32(42), shape_cache_index:0, property_slot:0
|
|
[ 30] CacheObjectShape object:obj~0
|
|
[ 40] EnterObjectEnvironment dst:reg5, object:obj~0
|
|
[ 50] DynamicGetBinding dst:reg7, `console`
|
|
[ 60] GetById dst:reg8, base:reg7, `log` (console.log)
|
|
[ 78] DynamicGetBinding dst:reg9, `x`
|
|
[ 88] Call dst:reg6, callee:reg8, this_value:reg7, console.log, arguments:[reg9]
|
|
[ b0] SetLexicalEnvironment environment:reg4
|
|
[ b8] End value:Undefined
|
|
|
|
|
|
42
|