From d2caa302a7bc8cd54dbfaf4e4cfbb3fb81ada378 Mon Sep 17 00:00:00 2001 From: leszeks Date: Fri, 28 Oct 2016 03:10:32 -0700 Subject: [PATCH] [ignition] Add bytecodes for loads/stores in the current context The majority of context slot accesses are to the local context (current context register and depth 0), so this adds bytecodes to optimise for that case. This cuts down bytecode size by roughly 1% (measured on Octane and Top25). Review-Url: https://codereview.chromium.org/2459513002 Cr-Commit-Position: refs/heads/master@{#40641} --- src/compiler/bytecode-graph-builder.cc | 28 + src/compiler/bytecode-graph-builder.h | 1 + src/interpreter/bytecode-array-builder.cc | 12 +- src/interpreter/bytecodes.h | 4 + src/interpreter/interpreter.cc | 38 ++ src/interpreter/interpreter.h | 3 + src/interpreter/mkpeephole.cc | 3 + .../bytecode_expectations/BasicLoops.golden | 18 +- .../BreakableBlocks.golden | 24 +- .../CallLookupSlot.golden | 8 +- .../ClassDeclarations.golden | 14 +- .../CompoundExpressions.golden | 8 +- .../ConstVariableContextSlot.golden | 28 +- .../ContextParameters.golden | 20 +- .../ContextVariables.golden | 536 +++++++++--------- .../CountOperators.golden | 16 +- .../CreateArguments.golden | 12 +- .../bytecode_expectations/Delete.golden | 6 +- .../bytecode_expectations/Eval.golden | 8 +- .../bytecode_expectations/ForOf.golden | 44 +- .../bytecode_expectations/Generators.golden | 89 +-- .../bytecode_expectations/GlobalDelete.golden | 8 +- .../LetVariableContextSlot.golden | 32 +- .../bytecode_expectations/LookupSlot.golden | 40 +- .../bytecode_expectations/Modules.golden | 140 ++--- .../OuterContextVariables.golden | 8 +- .../bytecode-array-builder-unittest.cc | 7 + 27 files changed, 624 insertions(+), 531 deletions(-) diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc index 865de43e4b..6f7b374a75 100644 --- a/src/compiler/bytecode-graph-builder.cc +++ b/src/compiler/bytecode-graph-builder.cc @@ -809,16 +809,36 @@ Node* BytecodeGraphBuilder::BuildLoadContextSlot() { return NewNode(op, context); } +Node* BytecodeGraphBuilder::BuildLoadCurrentContextSlot() { + // TODO(mythria): immutable flag is also set to false. This information is not + // available in bytecode array. update this code when the implementation + // changes. + const Operator* op = javascript()->LoadContext( + 0, bytecode_iterator().GetIndexOperand(0), false); + Node* context = environment()->Context(); + return NewNode(op, context); +} + void BytecodeGraphBuilder::VisitLdaContextSlot() { Node* node = BuildLoadContextSlot(); environment()->BindAccumulator(node); } +void BytecodeGraphBuilder::VisitLdaCurrentContextSlot() { + Node* node = BuildLoadCurrentContextSlot(); + environment()->BindAccumulator(node); +} + void BytecodeGraphBuilder::VisitLdrContextSlot() { Node* node = BuildLoadContextSlot(); environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3), node); } +void BytecodeGraphBuilder::VisitLdrCurrentContextSlot() { + Node* node = BuildLoadCurrentContextSlot(); + environment()->BindRegister(bytecode_iterator().GetRegisterOperand(1), node); +} + void BytecodeGraphBuilder::VisitStaContextSlot() { const Operator* op = javascript()->StoreContext( bytecode_iterator().GetUnsignedImmediateOperand(2), @@ -829,6 +849,14 @@ void BytecodeGraphBuilder::VisitStaContextSlot() { NewNode(op, context, value); } +void BytecodeGraphBuilder::VisitStaCurrentContextSlot() { + const Operator* op = + javascript()->StoreContext(0, bytecode_iterator().GetIndexOperand(0)); + Node* context = environment()->Context(); + Node* value = environment()->LookupAccumulator(); + NewNode(op, context, value); +} + void BytecodeGraphBuilder::BuildLdaLookupSlot(TypeofMode typeof_mode) { PrepareEagerCheckpoint(); Node* name = diff --git a/src/compiler/bytecode-graph-builder.h b/src/compiler/bytecode-graph-builder.h index 75d971e2d2..65e5042d9d 100644 --- a/src/compiler/bytecode-graph-builder.h +++ b/src/compiler/bytecode-graph-builder.h @@ -135,6 +135,7 @@ class BytecodeGraphBuilder { void BuildCreateArguments(CreateArgumentsType type); Node* BuildLoadContextSlot(); + Node* BuildLoadCurrentContextSlot(); Node* BuildLoadGlobal(uint32_t feedback_slot_index, TypeofMode typeof_mode); void BuildStoreGlobal(LanguageMode language_mode); Node* BuildNamedLoad(); diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc index 77b3d7e93c..13899b1e15 100644 --- a/src/interpreter/bytecode-array-builder.cc +++ b/src/interpreter/bytecode-array-builder.cc @@ -461,14 +461,22 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal( BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(Register context, int slot_index, int depth) { - OutputLdaContextSlot(context, slot_index, depth); + if (context.is_current_context() && depth == 0) { + OutputLdaCurrentContextSlot(slot_index); + } else { + OutputLdaContextSlot(context, slot_index, depth); + } return *this; } BytecodeArrayBuilder& BytecodeArrayBuilder::StoreContextSlot(Register context, int slot_index, int depth) { - OutputStaContextSlot(context, slot_index, depth); + if (context.is_current_context() && depth == 0) { + OutputStaCurrentContextSlot(slot_index); + } else { + OutputStaContextSlot(context, slot_index, depth); + } return *this; } diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h index 3101a1dc4a..30c49acdce 100644 --- a/src/interpreter/bytecodes.h +++ b/src/interpreter/bytecodes.h @@ -54,10 +54,14 @@ namespace interpreter { V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \ V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ OperandType::kIdx, OperandType::kUImm) \ + V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ V(LdrContextSlot, AccumulatorUse::kNone, OperandType::kReg, \ OperandType::kIdx, OperandType::kUImm, OperandType::kRegOut) \ + V(LdrCurrentContextSlot, AccumulatorUse::kNone, OperandType::kIdx, \ + OperandType::kRegOut) \ V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \ OperandType::kIdx, OperandType::kUImm) \ + V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \ \ /* Load-Store lookup slots */ \ V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc index 7c1821b83b..d36480769b 100644 --- a/src/interpreter/interpreter.cc +++ b/src/interpreter/interpreter.cc @@ -544,6 +544,13 @@ compiler::Node* Interpreter::BuildLoadContextSlot( return __ LoadContextSlot(slot_context, slot_index); } +compiler::Node* Interpreter::BuildLoadCurrentContextSlot( + InterpreterAssembler* assembler) { + Node* slot_index = __ BytecodeOperandIdx(0); + Node* slot_context = __ GetContext(); + return __ LoadContextSlot(slot_context, slot_index); +} + // LdaContextSlot // // Load the object in |slot_index| of the context at |depth| in the context @@ -554,6 +561,15 @@ void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) { __ Dispatch(); } +// LdaCurrentContextSlot +// +// Load the object in |slot_index| of the current context into the accumulator. +void Interpreter::DoLdaCurrentContextSlot(InterpreterAssembler* assembler) { + Node* result = BuildLoadCurrentContextSlot(assembler); + __ SetAccumulator(result); + __ Dispatch(); +} + // LdrContextSlot // // Load the object in |slot_index| of the context at |depth| in the context @@ -565,6 +581,16 @@ void Interpreter::DoLdrContextSlot(InterpreterAssembler* assembler) { __ Dispatch(); } +// LdrCurrentContextSlot +// +// Load the object in |slot_index| of the current context into register |reg|. +void Interpreter::DoLdrCurrentContextSlot(InterpreterAssembler* assembler) { + Node* result = BuildLoadCurrentContextSlot(assembler); + Node* destination = __ BytecodeOperandReg(1); + __ StoreRegister(result, destination); + __ Dispatch(); +} + // StaContextSlot // // Stores the object in the accumulator into |slot_index| of the context at @@ -580,6 +606,18 @@ void Interpreter::DoStaContextSlot(InterpreterAssembler* assembler) { __ Dispatch(); } +// StaCurrentContextSlot +// +// Stores the object in the accumulator into |slot_index| of the current +// context. +void Interpreter::DoStaCurrentContextSlot(InterpreterAssembler* assembler) { + Node* value = __ GetAccumulator(); + Node* slot_index = __ BytecodeOperandIdx(0); + Node* slot_context = __ GetContext(); + __ StoreContextSlot(slot_context, slot_index, value); + __ Dispatch(); +} + void Interpreter::DoLdaLookupSlot(Runtime::FunctionId function_id, InterpreterAssembler* assembler) { Node* name_index = __ BytecodeOperandIdx(0); diff --git a/src/interpreter/interpreter.h b/src/interpreter/interpreter.h index 31d4e05d40..4fb4429250 100644 --- a/src/interpreter/interpreter.h +++ b/src/interpreter/interpreter.h @@ -142,6 +142,9 @@ class Interpreter { // Generates code to load a context slot. compiler::Node* BuildLoadContextSlot(InterpreterAssembler* assembler); + // Generates code to load a slot in the current context. + compiler::Node* BuildLoadCurrentContextSlot(InterpreterAssembler* assembler); + // Generates code to load a global. compiler::Node* BuildLoadGlobal(Callable ic, compiler::Node* context, compiler::Node* feedback_slot, diff --git a/src/interpreter/mkpeephole.cc b/src/interpreter/mkpeephole.cc index 270fe83ef9..9265e9cc13 100644 --- a/src/interpreter/mkpeephole.cc +++ b/src/interpreter/mkpeephole.cc @@ -98,6 +98,9 @@ PeepholeActionAndData PeepholeActionTableWriter::LookupActionAndData( case Bytecode::kLdaContextSlot: return {PeepholeAction::kTransformLdaStarToLdrLdarAction, Bytecode::kLdrContextSlot}; + case Bytecode::kLdaCurrentContextSlot: + return {PeepholeAction::kTransformLdaStarToLdrLdarAction, + Bytecode::kLdrCurrentContextSlot}; case Bytecode::kLdaUndefined: return {PeepholeAction::kTransformLdaStarToLdrLdarAction, Bytecode::kLdrUndefined}; diff --git a/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden b/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden index 4f0152b750..1cbd05fcea 100644 --- a/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden +++ b/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden @@ -679,34 +679,34 @@ snippet: " " frame size: 4 parameter count: 1 -bytecode array length: 63 +bytecode array length: 53 bytecodes: [ /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaZero), B(Star), R(1), /* 52 S> */ B(Ldar), R(1), - B(JumpIfToBooleanFalse), U8(55), + B(JumpIfToBooleanFalse), U8(45), /* 45 E> */ B(StackCheck), B(Ldar), R(closure), B(CreateBlockContext), U8(0), B(PushContext), R(3), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(1), U8(2), B(Star), R(0), /* 73 S> */ B(LdaSmi), U8(1), - /* 73 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 73 E> */ B(StaCurrentContextSlot), U8(4), B(Mov), R(0), R(2), - /* 106 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 106 S> */ B(LdaCurrentContextSlot), U8(4), B(JumpIfToBooleanFalse), U8(8), /* 113 S> */ B(PopContext), R(3), B(PopContext), R(3), - B(Jump), U8(14), - /* 126 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + B(Jump), U8(10), + /* 126 S> */ B(LdaCurrentContextSlot), U8(4), B(Inc), U8(2), - /* 127 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 127 E> */ B(StaCurrentContextSlot), U8(4), B(PopContext), R(3), - B(JumpLoop), U8(-54), U8(0), + B(JumpLoop), U8(-44), U8(0), B(LdaUndefined), /* 137 S> */ B(Return), ] diff --git a/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden b/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden index ff81a2d346..9058fb8ad1 100644 --- a/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden +++ b/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden @@ -101,18 +101,18 @@ snippet: " " frame size: 3 parameter count: 1 -bytecode array length: 34 +bytecode array length: 30 bytecodes: [ /* 30 E> */ B(StackCheck), B(Ldar), R(closure), B(CreateBlockContext), U8(0), B(PushContext), R(2), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(1), U8(2), B(Star), R(0), /* 53 S> */ B(LdaSmi), U8(10), - /* 53 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 53 E> */ B(StaCurrentContextSlot), U8(4), B(Mov), R(0), R(1), B(Ldar), R(0), /* 88 S> */ B(Jump), U8(2), @@ -142,34 +142,34 @@ snippet: " " frame size: 4 parameter count: 1 -bytecode array length: 67 +bytecode array length: 53 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(2), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(1), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), B(Ldar), R(closure), B(CreateBlockContext), U8(0), B(PushContext), R(3), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(1), U8(2), B(Star), R(0), /* 76 S> */ B(LdaSmi), U8(2), - /* 76 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 76 E> */ B(StaCurrentContextSlot), U8(4), B(Mov), R(0), R(1), - /* 118 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 118 S> */ B(LdaCurrentContextSlot), U8(4), B(JumpIfToBooleanFalse), U8(6), /* 125 S> */ B(PopContext), R(3), - B(Jump), U8(10), + B(Jump), U8(8), /* 142 S> */ B(LdaSmi), U8(3), - /* 144 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 144 E> */ B(StaCurrentContextSlot), U8(4), B(PopContext), R(3), /* 155 S> */ B(LdaSmi), U8(4), - /* 157 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 157 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 162 S> */ B(Return), ] diff --git a/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden b/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden index 77cadb9c3e..a39fc3f532 100644 --- a/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden +++ b/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden @@ -11,16 +11,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 89 +bytecode array length: 83 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 30 E> */ B(StackCheck), /* 34 S> */ B(CreateClosure), U8(0), U8(2), /* 36 E> */ B(StaLookupSlotSloppy), U8(1), diff --git a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden index 0542892d4d..62d08f57da 100644 --- a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden +++ b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden @@ -122,7 +122,7 @@ snippet: " " frame size: 11 parameter count: 1 -bytecode array length: 128 +bytecode array length: 120 bytecodes: [ B(CreateFunctionContext), U8(2), B(PushContext), R(3), @@ -130,9 +130,9 @@ bytecodes: [ B(Star), R(2), /* 30 E> */ B(StackCheck), /* 43 S> */ B(LdaConstant), U8(0), - /* 43 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 43 E> */ B(StaCurrentContextSlot), U8(4), /* 57 S> */ B(LdaConstant), U8(1), - /* 57 E> */ B(StaContextSlot), R(context), U8(5), U8(0), + /* 57 E> */ B(StaCurrentContextSlot), U8(5), B(LdaTheHole), B(Star), R(0), /* 62 S> */ B(LdaTheHole), @@ -146,7 +146,7 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), B(Star), R(4), B(LdrNamedProperty), R(4), U8(3), U8(2), R(5), - /* 75 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 75 E> */ B(LdaCurrentContextSlot), U8(4), B(ToName), R(7), B(CreateClosure), U8(4), U8(2), B(Star), R(8), @@ -156,7 +156,7 @@ bytecodes: [ B(Star), R(10), B(Mov), R(5), R(6), B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6), U8(5), - /* 106 E> */ B(LdaContextSlot), R(context), U8(5), U8(0), + /* 106 E> */ B(LdaCurrentContextSlot), U8(5), B(ToName), R(7), B(LdaConstant), U8(3), B(TestEqualStrict), R(7), U8(0), @@ -194,7 +194,7 @@ snippet: " " frame size: 8 parameter count: 1 -bytecode array length: 62 +bytecode array length: 60 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(3), @@ -202,7 +202,7 @@ bytecodes: [ B(Star), R(2), /* 30 E> */ B(StackCheck), /* 46 S> */ B(LdaZero), - /* 46 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 46 E> */ B(StaCurrentContextSlot), U8(4), B(LdaTheHole), B(Star), R(0), /* 49 S> */ B(LdaTheHole), diff --git a/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden b/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden index 053bce6e0f..7f679da7d0 100644 --- a/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden +++ b/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden @@ -107,17 +107,17 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 29 +bytecode array length: 23 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(1), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 45 S> */ B(CreateClosure), U8(0), U8(2), - /* 75 S> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(1), + /* 75 S> */ B(LdrCurrentContextSlot), U8(4), R(1), B(BitwiseOrSmi), U8(24), R(1), U8(2), - /* 77 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 77 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 84 S> */ B(Return), ] diff --git a/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden b/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden index 1d17e2852c..956000ff49 100644 --- a/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden +++ b/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden @@ -11,17 +11,17 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 23 +bytecode array length: 19 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 44 S> */ B(LdaSmi), U8(10), - /* 44 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 44 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 74 S> */ B(Return), ] @@ -37,18 +37,18 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 26 +bytecode array length: 20 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 44 S> */ B(LdaSmi), U8(10), - /* 44 E> */ B(StaContextSlot), R(context), U8(4), U8(0), - /* 74 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 44 E> */ B(StaCurrentContextSlot), U8(4), + /* 74 S> */ B(LdaCurrentContextSlot), U8(4), /* 84 S> */ B(Return), ] constant pool: [ @@ -63,24 +63,24 @@ snippet: " " frame size: 4 parameter count: 1 -bytecode array length: 45 +bytecode array length: 39 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 47 S> */ B(LdaSmi), U8(20), B(Star), R(2), - /* 47 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 47 E> */ B(LdaCurrentContextSlot), U8(4), B(JumpIfNotHole), U8(11), B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), - /* 47 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 47 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 80 S> */ B(Return), ] @@ -97,17 +97,17 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 30 +bytecode array length: 26 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 44 S> */ B(LdaSmi), U8(10), - /* 44 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 44 E> */ B(StaCurrentContextSlot), U8(4), /* 48 S> */ B(LdaSmi), U8(20), /* 50 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), B(LdaUndefined), diff --git a/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden b/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden index 4e65f63fa2..9a05916e14 100644 --- a/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden +++ b/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden @@ -13,12 +13,12 @@ snippet: " " frame size: 1 parameter count: 2 -bytecode array length: 15 +bytecode array length: 13 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), B(Ldar), R(arg0), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 10 E> */ B(StackCheck), /* 19 S> */ B(CreateClosure), U8(0), U8(2), /* 52 S> */ B(Return), @@ -36,16 +36,16 @@ snippet: " " frame size: 2 parameter count: 2 -bytecode array length: 21 +bytecode array length: 17 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(Ldar), R(arg0), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 10 E> */ B(StackCheck), /* 27 S> */ B(CreateClosure), U8(0), U8(2), B(Star), R(0), - /* 53 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 53 S> */ B(LdaCurrentContextSlot), U8(4), /* 66 S> */ B(Return), ] constant pool: [ @@ -61,14 +61,14 @@ snippet: " " frame size: 1 parameter count: 5 -bytecode array length: 21 +bytecode array length: 17 bytecodes: [ B(CreateFunctionContext), U8(2), B(PushContext), R(0), B(Ldar), R(arg0), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Ldar), R(arg2), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 10 E> */ B(StackCheck), /* 29 S> */ B(CreateClosure), U8(0), U8(2), /* 61 S> */ B(Return), @@ -86,13 +86,13 @@ snippet: " " frame size: 1 parameter count: 1 -bytecode array length: 15 +bytecode array length: 13 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), /* 10 E> */ B(StackCheck), /* 26 S> */ B(Ldar), R(this), - /* 26 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 26 E> */ B(StaCurrentContextSlot), U8(4), /* 32 S> */ B(CreateClosure), U8(0), U8(2), /* 65 S> */ B(Return), ] diff --git a/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden b/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden index 160fdd7cd9..61ccccf740 100644 --- a/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden +++ b/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden @@ -31,13 +31,13 @@ snippet: " " frame size: 1 parameter count: 1 -bytecode array length: 15 +bytecode array length: 13 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(1), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 45 S> */ B(CreateClosure), U8(0), U8(2), /* 75 S> */ B(Return), ] @@ -53,15 +53,15 @@ snippet: " " frame size: 1 parameter count: 1 -bytecode array length: 21 +bytecode array length: 17 bytecodes: [ B(CreateFunctionContext), U8(2), B(PushContext), R(0), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(1), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 53 S> */ B(LdaSmi), U8(2), - /* 53 E> */ B(StaContextSlot), R(context), U8(5), U8(0), + /* 53 E> */ B(StaCurrentContextSlot), U8(5), /* 56 S> */ B(CreateClosure), U8(0), U8(2), /* 92 S> */ B(Return), ] @@ -77,7 +77,7 @@ snippet: " " frame size: 3 parameter count: 1 -bytecode array length: 22 +bytecode array length: 20 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), @@ -86,7 +86,7 @@ bytecodes: [ B(CreateClosure), U8(0), U8(2), B(Star), R(1), /* 64 E> */ B(Call), R(1), R(2), U8(1), U8(2), - /* 68 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 68 S> */ B(LdaCurrentContextSlot), U8(4), /* 78 S> */ B(Return), ] constant pool: [ @@ -103,22 +103,22 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 39 +bytecode array length: 31 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 30 E> */ B(StackCheck), /* 56 S> */ B(LdaSmi), U8(1), - /* 56 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 56 E> */ B(StaCurrentContextSlot), U8(4), B(Ldar), R(closure), B(CreateBlockContext), U8(0), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 69 S> */ B(LdaSmi), U8(2), - /* 69 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 69 E> */ B(StaCurrentContextSlot), U8(4), /* 72 S> */ B(CreateClosure), U8(1), U8(2), B(PopContext), R(0), /* 104 S> */ B(Return), @@ -389,523 +389,523 @@ snippet: " " frame size: 3 parameter count: 1 -bytecode array length: 1305 +bytecode array length: 789 bytecodes: [ B(CreateFunctionContext), U8(254), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateUnmappedArguments), - B(Wide), B(StaContextSlot), R16(context), U16(257), U16(0), + B(Wide), B(StaCurrentContextSlot), U16(257), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 30 E> */ B(StackCheck), /* 57 S> */ B(LdaZero), - /* 57 E> */ B(StaContextSlot), R(context), U8(6), U8(0), + /* 57 E> */ B(StaCurrentContextSlot), U8(6), /* 69 S> */ B(LdaZero), - /* 69 E> */ B(StaContextSlot), R(context), U8(7), U8(0), + /* 69 E> */ B(StaCurrentContextSlot), U8(7), /* 81 S> */ B(LdaZero), - /* 81 E> */ B(StaContextSlot), R(context), U8(8), U8(0), + /* 81 E> */ B(StaCurrentContextSlot), U8(8), /* 93 S> */ B(LdaZero), - /* 93 E> */ B(StaContextSlot), R(context), U8(9), U8(0), + /* 93 E> */ B(StaCurrentContextSlot), U8(9), /* 105 S> */ B(LdaZero), - /* 105 E> */ B(StaContextSlot), R(context), U8(10), U8(0), + /* 105 E> */ B(StaCurrentContextSlot), U8(10), /* 117 S> */ B(LdaZero), - /* 117 E> */ B(StaContextSlot), R(context), U8(11), U8(0), + /* 117 E> */ B(StaCurrentContextSlot), U8(11), /* 129 S> */ B(LdaZero), - /* 129 E> */ B(StaContextSlot), R(context), U8(12), U8(0), + /* 129 E> */ B(StaCurrentContextSlot), U8(12), /* 141 S> */ B(LdaZero), - /* 141 E> */ B(StaContextSlot), R(context), U8(13), U8(0), + /* 141 E> */ B(StaCurrentContextSlot), U8(13), /* 153 S> */ B(LdaZero), - /* 153 E> */ B(StaContextSlot), R(context), U8(14), U8(0), + /* 153 E> */ B(StaCurrentContextSlot), U8(14), /* 165 S> */ B(LdaZero), - /* 165 E> */ B(StaContextSlot), R(context), U8(15), U8(0), + /* 165 E> */ B(StaCurrentContextSlot), U8(15), /* 178 S> */ B(LdaZero), - /* 178 E> */ B(StaContextSlot), R(context), U8(16), U8(0), + /* 178 E> */ B(StaCurrentContextSlot), U8(16), /* 191 S> */ B(LdaZero), - /* 191 E> */ B(StaContextSlot), R(context), U8(17), U8(0), + /* 191 E> */ B(StaCurrentContextSlot), U8(17), /* 204 S> */ B(LdaZero), - /* 204 E> */ B(StaContextSlot), R(context), U8(18), U8(0), + /* 204 E> */ B(StaCurrentContextSlot), U8(18), /* 217 S> */ B(LdaZero), - /* 217 E> */ B(StaContextSlot), R(context), U8(19), U8(0), + /* 217 E> */ B(StaCurrentContextSlot), U8(19), /* 230 S> */ B(LdaZero), - /* 230 E> */ B(StaContextSlot), R(context), U8(20), U8(0), + /* 230 E> */ B(StaCurrentContextSlot), U8(20), /* 243 S> */ B(LdaZero), - /* 243 E> */ B(StaContextSlot), R(context), U8(21), U8(0), + /* 243 E> */ B(StaCurrentContextSlot), U8(21), /* 256 S> */ B(LdaZero), - /* 256 E> */ B(StaContextSlot), R(context), U8(22), U8(0), + /* 256 E> */ B(StaCurrentContextSlot), U8(22), /* 269 S> */ B(LdaZero), - /* 269 E> */ B(StaContextSlot), R(context), U8(23), U8(0), + /* 269 E> */ B(StaCurrentContextSlot), U8(23), /* 282 S> */ B(LdaZero), - /* 282 E> */ B(StaContextSlot), R(context), U8(24), U8(0), + /* 282 E> */ B(StaCurrentContextSlot), U8(24), /* 295 S> */ B(LdaZero), - /* 295 E> */ B(StaContextSlot), R(context), U8(25), U8(0), + /* 295 E> */ B(StaCurrentContextSlot), U8(25), /* 308 S> */ B(LdaZero), - /* 308 E> */ B(StaContextSlot), R(context), U8(26), U8(0), + /* 308 E> */ B(StaCurrentContextSlot), U8(26), /* 321 S> */ B(LdaZero), - /* 321 E> */ B(StaContextSlot), R(context), U8(27), U8(0), + /* 321 E> */ B(StaCurrentContextSlot), U8(27), /* 334 S> */ B(LdaZero), - /* 334 E> */ B(StaContextSlot), R(context), U8(28), U8(0), + /* 334 E> */ B(StaCurrentContextSlot), U8(28), /* 347 S> */ B(LdaZero), - /* 347 E> */ B(StaContextSlot), R(context), U8(29), U8(0), + /* 347 E> */ B(StaCurrentContextSlot), U8(29), /* 360 S> */ B(LdaZero), - /* 360 E> */ B(StaContextSlot), R(context), U8(30), U8(0), + /* 360 E> */ B(StaCurrentContextSlot), U8(30), /* 373 S> */ B(LdaZero), - /* 373 E> */ B(StaContextSlot), R(context), U8(31), U8(0), + /* 373 E> */ B(StaCurrentContextSlot), U8(31), /* 386 S> */ B(LdaZero), - /* 386 E> */ B(StaContextSlot), R(context), U8(32), U8(0), + /* 386 E> */ B(StaCurrentContextSlot), U8(32), /* 399 S> */ B(LdaZero), - /* 399 E> */ B(StaContextSlot), R(context), U8(33), U8(0), + /* 399 E> */ B(StaCurrentContextSlot), U8(33), /* 412 S> */ B(LdaZero), - /* 412 E> */ B(StaContextSlot), R(context), U8(34), U8(0), + /* 412 E> */ B(StaCurrentContextSlot), U8(34), /* 425 S> */ B(LdaZero), - /* 425 E> */ B(StaContextSlot), R(context), U8(35), U8(0), + /* 425 E> */ B(StaCurrentContextSlot), U8(35), /* 438 S> */ B(LdaZero), - /* 438 E> */ B(StaContextSlot), R(context), U8(36), U8(0), + /* 438 E> */ B(StaCurrentContextSlot), U8(36), /* 451 S> */ B(LdaZero), - /* 451 E> */ B(StaContextSlot), R(context), U8(37), U8(0), + /* 451 E> */ B(StaCurrentContextSlot), U8(37), /* 464 S> */ B(LdaZero), - /* 464 E> */ B(StaContextSlot), R(context), U8(38), U8(0), + /* 464 E> */ B(StaCurrentContextSlot), U8(38), /* 477 S> */ B(LdaZero), - /* 477 E> */ B(StaContextSlot), R(context), U8(39), U8(0), + /* 477 E> */ B(StaCurrentContextSlot), U8(39), /* 490 S> */ B(LdaZero), - /* 490 E> */ B(StaContextSlot), R(context), U8(40), U8(0), + /* 490 E> */ B(StaCurrentContextSlot), U8(40), /* 503 S> */ B(LdaZero), - /* 503 E> */ B(StaContextSlot), R(context), U8(41), U8(0), + /* 503 E> */ B(StaCurrentContextSlot), U8(41), /* 516 S> */ B(LdaZero), - /* 516 E> */ B(StaContextSlot), R(context), U8(42), U8(0), + /* 516 E> */ B(StaCurrentContextSlot), U8(42), /* 529 S> */ B(LdaZero), - /* 529 E> */ B(StaContextSlot), R(context), U8(43), U8(0), + /* 529 E> */ B(StaCurrentContextSlot), U8(43), /* 542 S> */ B(LdaZero), - /* 542 E> */ B(StaContextSlot), R(context), U8(44), U8(0), + /* 542 E> */ B(StaCurrentContextSlot), U8(44), /* 555 S> */ B(LdaZero), - /* 555 E> */ B(StaContextSlot), R(context), U8(45), U8(0), + /* 555 E> */ B(StaCurrentContextSlot), U8(45), /* 568 S> */ B(LdaZero), - /* 568 E> */ B(StaContextSlot), R(context), U8(46), U8(0), + /* 568 E> */ B(StaCurrentContextSlot), U8(46), /* 581 S> */ B(LdaZero), - /* 581 E> */ B(StaContextSlot), R(context), U8(47), U8(0), + /* 581 E> */ B(StaCurrentContextSlot), U8(47), /* 594 S> */ B(LdaZero), - /* 594 E> */ B(StaContextSlot), R(context), U8(48), U8(0), + /* 594 E> */ B(StaCurrentContextSlot), U8(48), /* 607 S> */ B(LdaZero), - /* 607 E> */ B(StaContextSlot), R(context), U8(49), U8(0), + /* 607 E> */ B(StaCurrentContextSlot), U8(49), /* 620 S> */ B(LdaZero), - /* 620 E> */ B(StaContextSlot), R(context), U8(50), U8(0), + /* 620 E> */ B(StaCurrentContextSlot), U8(50), /* 633 S> */ B(LdaZero), - /* 633 E> */ B(StaContextSlot), R(context), U8(51), U8(0), + /* 633 E> */ B(StaCurrentContextSlot), U8(51), /* 646 S> */ B(LdaZero), - /* 646 E> */ B(StaContextSlot), R(context), U8(52), U8(0), + /* 646 E> */ B(StaCurrentContextSlot), U8(52), /* 659 S> */ B(LdaZero), - /* 659 E> */ B(StaContextSlot), R(context), U8(53), U8(0), + /* 659 E> */ B(StaCurrentContextSlot), U8(53), /* 672 S> */ B(LdaZero), - /* 672 E> */ B(StaContextSlot), R(context), U8(54), U8(0), + /* 672 E> */ B(StaCurrentContextSlot), U8(54), /* 685 S> */ B(LdaZero), - /* 685 E> */ B(StaContextSlot), R(context), U8(55), U8(0), + /* 685 E> */ B(StaCurrentContextSlot), U8(55), /* 698 S> */ B(LdaZero), - /* 698 E> */ B(StaContextSlot), R(context), U8(56), U8(0), + /* 698 E> */ B(StaCurrentContextSlot), U8(56), /* 711 S> */ B(LdaZero), - /* 711 E> */ B(StaContextSlot), R(context), U8(57), U8(0), + /* 711 E> */ B(StaCurrentContextSlot), U8(57), /* 724 S> */ B(LdaZero), - /* 724 E> */ B(StaContextSlot), R(context), U8(58), U8(0), + /* 724 E> */ B(StaCurrentContextSlot), U8(58), /* 737 S> */ B(LdaZero), - /* 737 E> */ B(StaContextSlot), R(context), U8(59), U8(0), + /* 737 E> */ B(StaCurrentContextSlot), U8(59), /* 750 S> */ B(LdaZero), - /* 750 E> */ B(StaContextSlot), R(context), U8(60), U8(0), + /* 750 E> */ B(StaCurrentContextSlot), U8(60), /* 763 S> */ B(LdaZero), - /* 763 E> */ B(StaContextSlot), R(context), U8(61), U8(0), + /* 763 E> */ B(StaCurrentContextSlot), U8(61), /* 776 S> */ B(LdaZero), - /* 776 E> */ B(StaContextSlot), R(context), U8(62), U8(0), + /* 776 E> */ B(StaCurrentContextSlot), U8(62), /* 789 S> */ B(LdaZero), - /* 789 E> */ B(StaContextSlot), R(context), U8(63), U8(0), + /* 789 E> */ B(StaCurrentContextSlot), U8(63), /* 802 S> */ B(LdaZero), - /* 802 E> */ B(StaContextSlot), R(context), U8(64), U8(0), + /* 802 E> */ B(StaCurrentContextSlot), U8(64), /* 815 S> */ B(LdaZero), - /* 815 E> */ B(StaContextSlot), R(context), U8(65), U8(0), + /* 815 E> */ B(StaCurrentContextSlot), U8(65), /* 828 S> */ B(LdaZero), - /* 828 E> */ B(StaContextSlot), R(context), U8(66), U8(0), + /* 828 E> */ B(StaCurrentContextSlot), U8(66), /* 841 S> */ B(LdaZero), - /* 841 E> */ B(StaContextSlot), R(context), U8(67), U8(0), + /* 841 E> */ B(StaCurrentContextSlot), U8(67), /* 854 S> */ B(LdaZero), - /* 854 E> */ B(StaContextSlot), R(context), U8(68), U8(0), + /* 854 E> */ B(StaCurrentContextSlot), U8(68), /* 867 S> */ B(LdaZero), - /* 867 E> */ B(StaContextSlot), R(context), U8(69), U8(0), + /* 867 E> */ B(StaCurrentContextSlot), U8(69), /* 880 S> */ B(LdaZero), - /* 880 E> */ B(StaContextSlot), R(context), U8(70), U8(0), + /* 880 E> */ B(StaCurrentContextSlot), U8(70), /* 893 S> */ B(LdaZero), - /* 893 E> */ B(StaContextSlot), R(context), U8(71), U8(0), + /* 893 E> */ B(StaCurrentContextSlot), U8(71), /* 906 S> */ B(LdaZero), - /* 906 E> */ B(StaContextSlot), R(context), U8(72), U8(0), + /* 906 E> */ B(StaCurrentContextSlot), U8(72), /* 919 S> */ B(LdaZero), - /* 919 E> */ B(StaContextSlot), R(context), U8(73), U8(0), + /* 919 E> */ B(StaCurrentContextSlot), U8(73), /* 932 S> */ B(LdaZero), - /* 932 E> */ B(StaContextSlot), R(context), U8(74), U8(0), + /* 932 E> */ B(StaCurrentContextSlot), U8(74), /* 945 S> */ B(LdaZero), - /* 945 E> */ B(StaContextSlot), R(context), U8(75), U8(0), + /* 945 E> */ B(StaCurrentContextSlot), U8(75), /* 958 S> */ B(LdaZero), - /* 958 E> */ B(StaContextSlot), R(context), U8(76), U8(0), + /* 958 E> */ B(StaCurrentContextSlot), U8(76), /* 971 S> */ B(LdaZero), - /* 971 E> */ B(StaContextSlot), R(context), U8(77), U8(0), + /* 971 E> */ B(StaCurrentContextSlot), U8(77), /* 984 S> */ B(LdaZero), - /* 984 E> */ B(StaContextSlot), R(context), U8(78), U8(0), + /* 984 E> */ B(StaCurrentContextSlot), U8(78), /* 997 S> */ B(LdaZero), - /* 997 E> */ B(StaContextSlot), R(context), U8(79), U8(0), + /* 997 E> */ B(StaCurrentContextSlot), U8(79), /* 1010 S> */ B(LdaZero), - /* 1010 E> */ B(StaContextSlot), R(context), U8(80), U8(0), + /* 1010 E> */ B(StaCurrentContextSlot), U8(80), /* 1023 S> */ B(LdaZero), - /* 1023 E> */ B(StaContextSlot), R(context), U8(81), U8(0), + /* 1023 E> */ B(StaCurrentContextSlot), U8(81), /* 1036 S> */ B(LdaZero), - /* 1036 E> */ B(StaContextSlot), R(context), U8(82), U8(0), + /* 1036 E> */ B(StaCurrentContextSlot), U8(82), /* 1049 S> */ B(LdaZero), - /* 1049 E> */ B(StaContextSlot), R(context), U8(83), U8(0), + /* 1049 E> */ B(StaCurrentContextSlot), U8(83), /* 1062 S> */ B(LdaZero), - /* 1062 E> */ B(StaContextSlot), R(context), U8(84), U8(0), + /* 1062 E> */ B(StaCurrentContextSlot), U8(84), /* 1075 S> */ B(LdaZero), - /* 1075 E> */ B(StaContextSlot), R(context), U8(85), U8(0), + /* 1075 E> */ B(StaCurrentContextSlot), U8(85), /* 1088 S> */ B(LdaZero), - /* 1088 E> */ B(StaContextSlot), R(context), U8(86), U8(0), + /* 1088 E> */ B(StaCurrentContextSlot), U8(86), /* 1101 S> */ B(LdaZero), - /* 1101 E> */ B(StaContextSlot), R(context), U8(87), U8(0), + /* 1101 E> */ B(StaCurrentContextSlot), U8(87), /* 1114 S> */ B(LdaZero), - /* 1114 E> */ B(StaContextSlot), R(context), U8(88), U8(0), + /* 1114 E> */ B(StaCurrentContextSlot), U8(88), /* 1127 S> */ B(LdaZero), - /* 1127 E> */ B(StaContextSlot), R(context), U8(89), U8(0), + /* 1127 E> */ B(StaCurrentContextSlot), U8(89), /* 1140 S> */ B(LdaZero), - /* 1140 E> */ B(StaContextSlot), R(context), U8(90), U8(0), + /* 1140 E> */ B(StaCurrentContextSlot), U8(90), /* 1153 S> */ B(LdaZero), - /* 1153 E> */ B(StaContextSlot), R(context), U8(91), U8(0), + /* 1153 E> */ B(StaCurrentContextSlot), U8(91), /* 1166 S> */ B(LdaZero), - /* 1166 E> */ B(StaContextSlot), R(context), U8(92), U8(0), + /* 1166 E> */ B(StaCurrentContextSlot), U8(92), /* 1179 S> */ B(LdaZero), - /* 1179 E> */ B(StaContextSlot), R(context), U8(93), U8(0), + /* 1179 E> */ B(StaCurrentContextSlot), U8(93), /* 1192 S> */ B(LdaZero), - /* 1192 E> */ B(StaContextSlot), R(context), U8(94), U8(0), + /* 1192 E> */ B(StaCurrentContextSlot), U8(94), /* 1205 S> */ B(LdaZero), - /* 1205 E> */ B(StaContextSlot), R(context), U8(95), U8(0), + /* 1205 E> */ B(StaCurrentContextSlot), U8(95), /* 1218 S> */ B(LdaZero), - /* 1218 E> */ B(StaContextSlot), R(context), U8(96), U8(0), + /* 1218 E> */ B(StaCurrentContextSlot), U8(96), /* 1231 S> */ B(LdaZero), - /* 1231 E> */ B(StaContextSlot), R(context), U8(97), U8(0), + /* 1231 E> */ B(StaCurrentContextSlot), U8(97), /* 1244 S> */ B(LdaZero), - /* 1244 E> */ B(StaContextSlot), R(context), U8(98), U8(0), + /* 1244 E> */ B(StaCurrentContextSlot), U8(98), /* 1257 S> */ B(LdaZero), - /* 1257 E> */ B(StaContextSlot), R(context), U8(99), U8(0), + /* 1257 E> */ B(StaCurrentContextSlot), U8(99), /* 1270 S> */ B(LdaZero), - /* 1270 E> */ B(StaContextSlot), R(context), U8(100), U8(0), + /* 1270 E> */ B(StaCurrentContextSlot), U8(100), /* 1283 S> */ B(LdaZero), - /* 1283 E> */ B(StaContextSlot), R(context), U8(101), U8(0), + /* 1283 E> */ B(StaCurrentContextSlot), U8(101), /* 1296 S> */ B(LdaZero), - /* 1296 E> */ B(StaContextSlot), R(context), U8(102), U8(0), + /* 1296 E> */ B(StaCurrentContextSlot), U8(102), /* 1309 S> */ B(LdaZero), - /* 1309 E> */ B(StaContextSlot), R(context), U8(103), U8(0), + /* 1309 E> */ B(StaCurrentContextSlot), U8(103), /* 1322 S> */ B(LdaZero), - /* 1322 E> */ B(StaContextSlot), R(context), U8(104), U8(0), + /* 1322 E> */ B(StaCurrentContextSlot), U8(104), /* 1335 S> */ B(LdaZero), - /* 1335 E> */ B(StaContextSlot), R(context), U8(105), U8(0), + /* 1335 E> */ B(StaCurrentContextSlot), U8(105), /* 1349 S> */ B(LdaZero), - /* 1349 E> */ B(StaContextSlot), R(context), U8(106), U8(0), + /* 1349 E> */ B(StaCurrentContextSlot), U8(106), /* 1363 S> */ B(LdaZero), - /* 1363 E> */ B(StaContextSlot), R(context), U8(107), U8(0), + /* 1363 E> */ B(StaCurrentContextSlot), U8(107), /* 1377 S> */ B(LdaZero), - /* 1377 E> */ B(StaContextSlot), R(context), U8(108), U8(0), + /* 1377 E> */ B(StaCurrentContextSlot), U8(108), /* 1391 S> */ B(LdaZero), - /* 1391 E> */ B(StaContextSlot), R(context), U8(109), U8(0), + /* 1391 E> */ B(StaCurrentContextSlot), U8(109), /* 1405 S> */ B(LdaZero), - /* 1405 E> */ B(StaContextSlot), R(context), U8(110), U8(0), + /* 1405 E> */ B(StaCurrentContextSlot), U8(110), /* 1419 S> */ B(LdaZero), - /* 1419 E> */ B(StaContextSlot), R(context), U8(111), U8(0), + /* 1419 E> */ B(StaCurrentContextSlot), U8(111), /* 1433 S> */ B(LdaZero), - /* 1433 E> */ B(StaContextSlot), R(context), U8(112), U8(0), + /* 1433 E> */ B(StaCurrentContextSlot), U8(112), /* 1447 S> */ B(LdaZero), - /* 1447 E> */ B(StaContextSlot), R(context), U8(113), U8(0), + /* 1447 E> */ B(StaCurrentContextSlot), U8(113), /* 1461 S> */ B(LdaZero), - /* 1461 E> */ B(StaContextSlot), R(context), U8(114), U8(0), + /* 1461 E> */ B(StaCurrentContextSlot), U8(114), /* 1475 S> */ B(LdaZero), - /* 1475 E> */ B(StaContextSlot), R(context), U8(115), U8(0), + /* 1475 E> */ B(StaCurrentContextSlot), U8(115), /* 1489 S> */ B(LdaZero), - /* 1489 E> */ B(StaContextSlot), R(context), U8(116), U8(0), + /* 1489 E> */ B(StaCurrentContextSlot), U8(116), /* 1503 S> */ B(LdaZero), - /* 1503 E> */ B(StaContextSlot), R(context), U8(117), U8(0), + /* 1503 E> */ B(StaCurrentContextSlot), U8(117), /* 1517 S> */ B(LdaZero), - /* 1517 E> */ B(StaContextSlot), R(context), U8(118), U8(0), + /* 1517 E> */ B(StaCurrentContextSlot), U8(118), /* 1531 S> */ B(LdaZero), - /* 1531 E> */ B(StaContextSlot), R(context), U8(119), U8(0), + /* 1531 E> */ B(StaCurrentContextSlot), U8(119), /* 1545 S> */ B(LdaZero), - /* 1545 E> */ B(StaContextSlot), R(context), U8(120), U8(0), + /* 1545 E> */ B(StaCurrentContextSlot), U8(120), /* 1559 S> */ B(LdaZero), - /* 1559 E> */ B(StaContextSlot), R(context), U8(121), U8(0), + /* 1559 E> */ B(StaCurrentContextSlot), U8(121), /* 1573 S> */ B(LdaZero), - /* 1573 E> */ B(StaContextSlot), R(context), U8(122), U8(0), + /* 1573 E> */ B(StaCurrentContextSlot), U8(122), /* 1587 S> */ B(LdaZero), - /* 1587 E> */ B(StaContextSlot), R(context), U8(123), U8(0), + /* 1587 E> */ B(StaCurrentContextSlot), U8(123), /* 1601 S> */ B(LdaZero), - /* 1601 E> */ B(StaContextSlot), R(context), U8(124), U8(0), + /* 1601 E> */ B(StaCurrentContextSlot), U8(124), /* 1615 S> */ B(LdaZero), - /* 1615 E> */ B(StaContextSlot), R(context), U8(125), U8(0), + /* 1615 E> */ B(StaCurrentContextSlot), U8(125), /* 1629 S> */ B(LdaZero), - /* 1629 E> */ B(StaContextSlot), R(context), U8(126), U8(0), + /* 1629 E> */ B(StaCurrentContextSlot), U8(126), /* 1643 S> */ B(LdaZero), - /* 1643 E> */ B(StaContextSlot), R(context), U8(127), U8(0), + /* 1643 E> */ B(StaCurrentContextSlot), U8(127), /* 1657 S> */ B(LdaZero), - /* 1657 E> */ B(StaContextSlot), R(context), U8(128), U8(0), + /* 1657 E> */ B(StaCurrentContextSlot), U8(128), /* 1671 S> */ B(LdaZero), - /* 1671 E> */ B(StaContextSlot), R(context), U8(129), U8(0), + /* 1671 E> */ B(StaCurrentContextSlot), U8(129), /* 1685 S> */ B(LdaZero), - /* 1685 E> */ B(StaContextSlot), R(context), U8(130), U8(0), + /* 1685 E> */ B(StaCurrentContextSlot), U8(130), /* 1699 S> */ B(LdaZero), - /* 1699 E> */ B(StaContextSlot), R(context), U8(131), U8(0), + /* 1699 E> */ B(StaCurrentContextSlot), U8(131), /* 1713 S> */ B(LdaZero), - /* 1713 E> */ B(StaContextSlot), R(context), U8(132), U8(0), + /* 1713 E> */ B(StaCurrentContextSlot), U8(132), /* 1727 S> */ B(LdaZero), - /* 1727 E> */ B(StaContextSlot), R(context), U8(133), U8(0), + /* 1727 E> */ B(StaCurrentContextSlot), U8(133), /* 1741 S> */ B(LdaZero), - /* 1741 E> */ B(StaContextSlot), R(context), U8(134), U8(0), + /* 1741 E> */ B(StaCurrentContextSlot), U8(134), /* 1755 S> */ B(LdaZero), - /* 1755 E> */ B(StaContextSlot), R(context), U8(135), U8(0), + /* 1755 E> */ B(StaCurrentContextSlot), U8(135), /* 1769 S> */ B(LdaZero), - /* 1769 E> */ B(StaContextSlot), R(context), U8(136), U8(0), + /* 1769 E> */ B(StaCurrentContextSlot), U8(136), /* 1783 S> */ B(LdaZero), - /* 1783 E> */ B(StaContextSlot), R(context), U8(137), U8(0), + /* 1783 E> */ B(StaCurrentContextSlot), U8(137), /* 1797 S> */ B(LdaZero), - /* 1797 E> */ B(StaContextSlot), R(context), U8(138), U8(0), + /* 1797 E> */ B(StaCurrentContextSlot), U8(138), /* 1811 S> */ B(LdaZero), - /* 1811 E> */ B(StaContextSlot), R(context), U8(139), U8(0), + /* 1811 E> */ B(StaCurrentContextSlot), U8(139), /* 1825 S> */ B(LdaZero), - /* 1825 E> */ B(StaContextSlot), R(context), U8(140), U8(0), + /* 1825 E> */ B(StaCurrentContextSlot), U8(140), /* 1839 S> */ B(LdaZero), - /* 1839 E> */ B(StaContextSlot), R(context), U8(141), U8(0), + /* 1839 E> */ B(StaCurrentContextSlot), U8(141), /* 1853 S> */ B(LdaZero), - /* 1853 E> */ B(StaContextSlot), R(context), U8(142), U8(0), + /* 1853 E> */ B(StaCurrentContextSlot), U8(142), /* 1867 S> */ B(LdaZero), - /* 1867 E> */ B(StaContextSlot), R(context), U8(143), U8(0), + /* 1867 E> */ B(StaCurrentContextSlot), U8(143), /* 1881 S> */ B(LdaZero), - /* 1881 E> */ B(StaContextSlot), R(context), U8(144), U8(0), + /* 1881 E> */ B(StaCurrentContextSlot), U8(144), /* 1895 S> */ B(LdaZero), - /* 1895 E> */ B(StaContextSlot), R(context), U8(145), U8(0), + /* 1895 E> */ B(StaCurrentContextSlot), U8(145), /* 1909 S> */ B(LdaZero), - /* 1909 E> */ B(StaContextSlot), R(context), U8(146), U8(0), + /* 1909 E> */ B(StaCurrentContextSlot), U8(146), /* 1923 S> */ B(LdaZero), - /* 1923 E> */ B(StaContextSlot), R(context), U8(147), U8(0), + /* 1923 E> */ B(StaCurrentContextSlot), U8(147), /* 1937 S> */ B(LdaZero), - /* 1937 E> */ B(StaContextSlot), R(context), U8(148), U8(0), + /* 1937 E> */ B(StaCurrentContextSlot), U8(148), /* 1951 S> */ B(LdaZero), - /* 1951 E> */ B(StaContextSlot), R(context), U8(149), U8(0), + /* 1951 E> */ B(StaCurrentContextSlot), U8(149), /* 1965 S> */ B(LdaZero), - /* 1965 E> */ B(StaContextSlot), R(context), U8(150), U8(0), + /* 1965 E> */ B(StaCurrentContextSlot), U8(150), /* 1979 S> */ B(LdaZero), - /* 1979 E> */ B(StaContextSlot), R(context), U8(151), U8(0), + /* 1979 E> */ B(StaCurrentContextSlot), U8(151), /* 1993 S> */ B(LdaZero), - /* 1993 E> */ B(StaContextSlot), R(context), U8(152), U8(0), + /* 1993 E> */ B(StaCurrentContextSlot), U8(152), /* 2007 S> */ B(LdaZero), - /* 2007 E> */ B(StaContextSlot), R(context), U8(153), U8(0), + /* 2007 E> */ B(StaCurrentContextSlot), U8(153), /* 2021 S> */ B(LdaZero), - /* 2021 E> */ B(StaContextSlot), R(context), U8(154), U8(0), + /* 2021 E> */ B(StaCurrentContextSlot), U8(154), /* 2035 S> */ B(LdaZero), - /* 2035 E> */ B(StaContextSlot), R(context), U8(155), U8(0), + /* 2035 E> */ B(StaCurrentContextSlot), U8(155), /* 2049 S> */ B(LdaZero), - /* 2049 E> */ B(StaContextSlot), R(context), U8(156), U8(0), + /* 2049 E> */ B(StaCurrentContextSlot), U8(156), /* 2063 S> */ B(LdaZero), - /* 2063 E> */ B(StaContextSlot), R(context), U8(157), U8(0), + /* 2063 E> */ B(StaCurrentContextSlot), U8(157), /* 2077 S> */ B(LdaZero), - /* 2077 E> */ B(StaContextSlot), R(context), U8(158), U8(0), + /* 2077 E> */ B(StaCurrentContextSlot), U8(158), /* 2091 S> */ B(LdaZero), - /* 2091 E> */ B(StaContextSlot), R(context), U8(159), U8(0), + /* 2091 E> */ B(StaCurrentContextSlot), U8(159), /* 2105 S> */ B(LdaZero), - /* 2105 E> */ B(StaContextSlot), R(context), U8(160), U8(0), + /* 2105 E> */ B(StaCurrentContextSlot), U8(160), /* 2119 S> */ B(LdaZero), - /* 2119 E> */ B(StaContextSlot), R(context), U8(161), U8(0), + /* 2119 E> */ B(StaCurrentContextSlot), U8(161), /* 2133 S> */ B(LdaZero), - /* 2133 E> */ B(StaContextSlot), R(context), U8(162), U8(0), + /* 2133 E> */ B(StaCurrentContextSlot), U8(162), /* 2147 S> */ B(LdaZero), - /* 2147 E> */ B(StaContextSlot), R(context), U8(163), U8(0), + /* 2147 E> */ B(StaCurrentContextSlot), U8(163), /* 2161 S> */ B(LdaZero), - /* 2161 E> */ B(StaContextSlot), R(context), U8(164), U8(0), + /* 2161 E> */ B(StaCurrentContextSlot), U8(164), /* 2175 S> */ B(LdaZero), - /* 2175 E> */ B(StaContextSlot), R(context), U8(165), U8(0), + /* 2175 E> */ B(StaCurrentContextSlot), U8(165), /* 2189 S> */ B(LdaZero), - /* 2189 E> */ B(StaContextSlot), R(context), U8(166), U8(0), + /* 2189 E> */ B(StaCurrentContextSlot), U8(166), /* 2203 S> */ B(LdaZero), - /* 2203 E> */ B(StaContextSlot), R(context), U8(167), U8(0), + /* 2203 E> */ B(StaCurrentContextSlot), U8(167), /* 2217 S> */ B(LdaZero), - /* 2217 E> */ B(StaContextSlot), R(context), U8(168), U8(0), + /* 2217 E> */ B(StaCurrentContextSlot), U8(168), /* 2231 S> */ B(LdaZero), - /* 2231 E> */ B(StaContextSlot), R(context), U8(169), U8(0), + /* 2231 E> */ B(StaCurrentContextSlot), U8(169), /* 2245 S> */ B(LdaZero), - /* 2245 E> */ B(StaContextSlot), R(context), U8(170), U8(0), + /* 2245 E> */ B(StaCurrentContextSlot), U8(170), /* 2259 S> */ B(LdaZero), - /* 2259 E> */ B(StaContextSlot), R(context), U8(171), U8(0), + /* 2259 E> */ B(StaCurrentContextSlot), U8(171), /* 2273 S> */ B(LdaZero), - /* 2273 E> */ B(StaContextSlot), R(context), U8(172), U8(0), + /* 2273 E> */ B(StaCurrentContextSlot), U8(172), /* 2287 S> */ B(LdaZero), - /* 2287 E> */ B(StaContextSlot), R(context), U8(173), U8(0), + /* 2287 E> */ B(StaCurrentContextSlot), U8(173), /* 2301 S> */ B(LdaZero), - /* 2301 E> */ B(StaContextSlot), R(context), U8(174), U8(0), + /* 2301 E> */ B(StaCurrentContextSlot), U8(174), /* 2315 S> */ B(LdaZero), - /* 2315 E> */ B(StaContextSlot), R(context), U8(175), U8(0), + /* 2315 E> */ B(StaCurrentContextSlot), U8(175), /* 2329 S> */ B(LdaZero), - /* 2329 E> */ B(StaContextSlot), R(context), U8(176), U8(0), + /* 2329 E> */ B(StaCurrentContextSlot), U8(176), /* 2343 S> */ B(LdaZero), - /* 2343 E> */ B(StaContextSlot), R(context), U8(177), U8(0), + /* 2343 E> */ B(StaCurrentContextSlot), U8(177), /* 2357 S> */ B(LdaZero), - /* 2357 E> */ B(StaContextSlot), R(context), U8(178), U8(0), + /* 2357 E> */ B(StaCurrentContextSlot), U8(178), /* 2371 S> */ B(LdaZero), - /* 2371 E> */ B(StaContextSlot), R(context), U8(179), U8(0), + /* 2371 E> */ B(StaCurrentContextSlot), U8(179), /* 2385 S> */ B(LdaZero), - /* 2385 E> */ B(StaContextSlot), R(context), U8(180), U8(0), + /* 2385 E> */ B(StaCurrentContextSlot), U8(180), /* 2399 S> */ B(LdaZero), - /* 2399 E> */ B(StaContextSlot), R(context), U8(181), U8(0), + /* 2399 E> */ B(StaCurrentContextSlot), U8(181), /* 2413 S> */ B(LdaZero), - /* 2413 E> */ B(StaContextSlot), R(context), U8(182), U8(0), + /* 2413 E> */ B(StaCurrentContextSlot), U8(182), /* 2427 S> */ B(LdaZero), - /* 2427 E> */ B(StaContextSlot), R(context), U8(183), U8(0), + /* 2427 E> */ B(StaCurrentContextSlot), U8(183), /* 2441 S> */ B(LdaZero), - /* 2441 E> */ B(StaContextSlot), R(context), U8(184), U8(0), + /* 2441 E> */ B(StaCurrentContextSlot), U8(184), /* 2455 S> */ B(LdaZero), - /* 2455 E> */ B(StaContextSlot), R(context), U8(185), U8(0), + /* 2455 E> */ B(StaCurrentContextSlot), U8(185), /* 2469 S> */ B(LdaZero), - /* 2469 E> */ B(StaContextSlot), R(context), U8(186), U8(0), + /* 2469 E> */ B(StaCurrentContextSlot), U8(186), /* 2483 S> */ B(LdaZero), - /* 2483 E> */ B(StaContextSlot), R(context), U8(187), U8(0), + /* 2483 E> */ B(StaCurrentContextSlot), U8(187), /* 2497 S> */ B(LdaZero), - /* 2497 E> */ B(StaContextSlot), R(context), U8(188), U8(0), + /* 2497 E> */ B(StaCurrentContextSlot), U8(188), /* 2511 S> */ B(LdaZero), - /* 2511 E> */ B(StaContextSlot), R(context), U8(189), U8(0), + /* 2511 E> */ B(StaCurrentContextSlot), U8(189), /* 2525 S> */ B(LdaZero), - /* 2525 E> */ B(StaContextSlot), R(context), U8(190), U8(0), + /* 2525 E> */ B(StaCurrentContextSlot), U8(190), /* 2539 S> */ B(LdaZero), - /* 2539 E> */ B(StaContextSlot), R(context), U8(191), U8(0), + /* 2539 E> */ B(StaCurrentContextSlot), U8(191), /* 2553 S> */ B(LdaZero), - /* 2553 E> */ B(StaContextSlot), R(context), U8(192), U8(0), + /* 2553 E> */ B(StaCurrentContextSlot), U8(192), /* 2567 S> */ B(LdaZero), - /* 2567 E> */ B(StaContextSlot), R(context), U8(193), U8(0), + /* 2567 E> */ B(StaCurrentContextSlot), U8(193), /* 2581 S> */ B(LdaZero), - /* 2581 E> */ B(StaContextSlot), R(context), U8(194), U8(0), + /* 2581 E> */ B(StaCurrentContextSlot), U8(194), /* 2595 S> */ B(LdaZero), - /* 2595 E> */ B(StaContextSlot), R(context), U8(195), U8(0), + /* 2595 E> */ B(StaCurrentContextSlot), U8(195), /* 2609 S> */ B(LdaZero), - /* 2609 E> */ B(StaContextSlot), R(context), U8(196), U8(0), + /* 2609 E> */ B(StaCurrentContextSlot), U8(196), /* 2623 S> */ B(LdaZero), - /* 2623 E> */ B(StaContextSlot), R(context), U8(197), U8(0), + /* 2623 E> */ B(StaCurrentContextSlot), U8(197), /* 2637 S> */ B(LdaZero), - /* 2637 E> */ B(StaContextSlot), R(context), U8(198), U8(0), + /* 2637 E> */ B(StaCurrentContextSlot), U8(198), /* 2651 S> */ B(LdaZero), - /* 2651 E> */ B(StaContextSlot), R(context), U8(199), U8(0), + /* 2651 E> */ B(StaCurrentContextSlot), U8(199), /* 2665 S> */ B(LdaZero), - /* 2665 E> */ B(StaContextSlot), R(context), U8(200), U8(0), + /* 2665 E> */ B(StaCurrentContextSlot), U8(200), /* 2679 S> */ B(LdaZero), - /* 2679 E> */ B(StaContextSlot), R(context), U8(201), U8(0), + /* 2679 E> */ B(StaCurrentContextSlot), U8(201), /* 2693 S> */ B(LdaZero), - /* 2693 E> */ B(StaContextSlot), R(context), U8(202), U8(0), + /* 2693 E> */ B(StaCurrentContextSlot), U8(202), /* 2707 S> */ B(LdaZero), - /* 2707 E> */ B(StaContextSlot), R(context), U8(203), U8(0), + /* 2707 E> */ B(StaCurrentContextSlot), U8(203), /* 2721 S> */ B(LdaZero), - /* 2721 E> */ B(StaContextSlot), R(context), U8(204), U8(0), + /* 2721 E> */ B(StaCurrentContextSlot), U8(204), /* 2735 S> */ B(LdaZero), - /* 2735 E> */ B(StaContextSlot), R(context), U8(205), U8(0), + /* 2735 E> */ B(StaCurrentContextSlot), U8(205), /* 2749 S> */ B(LdaZero), - /* 2749 E> */ B(StaContextSlot), R(context), U8(206), U8(0), + /* 2749 E> */ B(StaCurrentContextSlot), U8(206), /* 2763 S> */ B(LdaZero), - /* 2763 E> */ B(StaContextSlot), R(context), U8(207), U8(0), + /* 2763 E> */ B(StaCurrentContextSlot), U8(207), /* 2777 S> */ B(LdaZero), - /* 2777 E> */ B(StaContextSlot), R(context), U8(208), U8(0), + /* 2777 E> */ B(StaCurrentContextSlot), U8(208), /* 2791 S> */ B(LdaZero), - /* 2791 E> */ B(StaContextSlot), R(context), U8(209), U8(0), + /* 2791 E> */ B(StaCurrentContextSlot), U8(209), /* 2805 S> */ B(LdaZero), - /* 2805 E> */ B(StaContextSlot), R(context), U8(210), U8(0), + /* 2805 E> */ B(StaCurrentContextSlot), U8(210), /* 2819 S> */ B(LdaZero), - /* 2819 E> */ B(StaContextSlot), R(context), U8(211), U8(0), + /* 2819 E> */ B(StaCurrentContextSlot), U8(211), /* 2833 S> */ B(LdaZero), - /* 2833 E> */ B(StaContextSlot), R(context), U8(212), U8(0), + /* 2833 E> */ B(StaCurrentContextSlot), U8(212), /* 2847 S> */ B(LdaZero), - /* 2847 E> */ B(StaContextSlot), R(context), U8(213), U8(0), + /* 2847 E> */ B(StaCurrentContextSlot), U8(213), /* 2861 S> */ B(LdaZero), - /* 2861 E> */ B(StaContextSlot), R(context), U8(214), U8(0), + /* 2861 E> */ B(StaCurrentContextSlot), U8(214), /* 2875 S> */ B(LdaZero), - /* 2875 E> */ B(StaContextSlot), R(context), U8(215), U8(0), + /* 2875 E> */ B(StaCurrentContextSlot), U8(215), /* 2889 S> */ B(LdaZero), - /* 2889 E> */ B(StaContextSlot), R(context), U8(216), U8(0), + /* 2889 E> */ B(StaCurrentContextSlot), U8(216), /* 2903 S> */ B(LdaZero), - /* 2903 E> */ B(StaContextSlot), R(context), U8(217), U8(0), + /* 2903 E> */ B(StaCurrentContextSlot), U8(217), /* 2917 S> */ B(LdaZero), - /* 2917 E> */ B(StaContextSlot), R(context), U8(218), U8(0), + /* 2917 E> */ B(StaCurrentContextSlot), U8(218), /* 2931 S> */ B(LdaZero), - /* 2931 E> */ B(StaContextSlot), R(context), U8(219), U8(0), + /* 2931 E> */ B(StaCurrentContextSlot), U8(219), /* 2945 S> */ B(LdaZero), - /* 2945 E> */ B(StaContextSlot), R(context), U8(220), U8(0), + /* 2945 E> */ B(StaCurrentContextSlot), U8(220), /* 2959 S> */ B(LdaZero), - /* 2959 E> */ B(StaContextSlot), R(context), U8(221), U8(0), + /* 2959 E> */ B(StaCurrentContextSlot), U8(221), /* 2973 S> */ B(LdaZero), - /* 2973 E> */ B(StaContextSlot), R(context), U8(222), U8(0), + /* 2973 E> */ B(StaCurrentContextSlot), U8(222), /* 2987 S> */ B(LdaZero), - /* 2987 E> */ B(StaContextSlot), R(context), U8(223), U8(0), + /* 2987 E> */ B(StaCurrentContextSlot), U8(223), /* 3001 S> */ B(LdaZero), - /* 3001 E> */ B(StaContextSlot), R(context), U8(224), U8(0), + /* 3001 E> */ B(StaCurrentContextSlot), U8(224), /* 3015 S> */ B(LdaZero), - /* 3015 E> */ B(StaContextSlot), R(context), U8(225), U8(0), + /* 3015 E> */ B(StaCurrentContextSlot), U8(225), /* 3029 S> */ B(LdaZero), - /* 3029 E> */ B(StaContextSlot), R(context), U8(226), U8(0), + /* 3029 E> */ B(StaCurrentContextSlot), U8(226), /* 3043 S> */ B(LdaZero), - /* 3043 E> */ B(StaContextSlot), R(context), U8(227), U8(0), + /* 3043 E> */ B(StaCurrentContextSlot), U8(227), /* 3057 S> */ B(LdaZero), - /* 3057 E> */ B(StaContextSlot), R(context), U8(228), U8(0), + /* 3057 E> */ B(StaCurrentContextSlot), U8(228), /* 3071 S> */ B(LdaZero), - /* 3071 E> */ B(StaContextSlot), R(context), U8(229), U8(0), + /* 3071 E> */ B(StaCurrentContextSlot), U8(229), /* 3085 S> */ B(LdaZero), - /* 3085 E> */ B(StaContextSlot), R(context), U8(230), U8(0), + /* 3085 E> */ B(StaCurrentContextSlot), U8(230), /* 3099 S> */ B(LdaZero), - /* 3099 E> */ B(StaContextSlot), R(context), U8(231), U8(0), + /* 3099 E> */ B(StaCurrentContextSlot), U8(231), /* 3113 S> */ B(LdaZero), - /* 3113 E> */ B(StaContextSlot), R(context), U8(232), U8(0), + /* 3113 E> */ B(StaCurrentContextSlot), U8(232), /* 3127 S> */ B(LdaZero), - /* 3127 E> */ B(StaContextSlot), R(context), U8(233), U8(0), + /* 3127 E> */ B(StaCurrentContextSlot), U8(233), /* 3141 S> */ B(LdaZero), - /* 3141 E> */ B(StaContextSlot), R(context), U8(234), U8(0), + /* 3141 E> */ B(StaCurrentContextSlot), U8(234), /* 3155 S> */ B(LdaZero), - /* 3155 E> */ B(StaContextSlot), R(context), U8(235), U8(0), + /* 3155 E> */ B(StaCurrentContextSlot), U8(235), /* 3169 S> */ B(LdaZero), - /* 3169 E> */ B(StaContextSlot), R(context), U8(236), U8(0), + /* 3169 E> */ B(StaCurrentContextSlot), U8(236), /* 3183 S> */ B(LdaZero), - /* 3183 E> */ B(StaContextSlot), R(context), U8(237), U8(0), + /* 3183 E> */ B(StaCurrentContextSlot), U8(237), /* 3197 S> */ B(LdaZero), - /* 3197 E> */ B(StaContextSlot), R(context), U8(238), U8(0), + /* 3197 E> */ B(StaCurrentContextSlot), U8(238), /* 3211 S> */ B(LdaZero), - /* 3211 E> */ B(StaContextSlot), R(context), U8(239), U8(0), + /* 3211 E> */ B(StaCurrentContextSlot), U8(239), /* 3225 S> */ B(LdaZero), - /* 3225 E> */ B(StaContextSlot), R(context), U8(240), U8(0), + /* 3225 E> */ B(StaCurrentContextSlot), U8(240), /* 3239 S> */ B(LdaZero), - /* 3239 E> */ B(StaContextSlot), R(context), U8(241), U8(0), + /* 3239 E> */ B(StaCurrentContextSlot), U8(241), /* 3253 S> */ B(LdaZero), - /* 3253 E> */ B(StaContextSlot), R(context), U8(242), U8(0), + /* 3253 E> */ B(StaCurrentContextSlot), U8(242), /* 3267 S> */ B(LdaZero), - /* 3267 E> */ B(StaContextSlot), R(context), U8(243), U8(0), + /* 3267 E> */ B(StaCurrentContextSlot), U8(243), /* 3281 S> */ B(LdaZero), - /* 3281 E> */ B(StaContextSlot), R(context), U8(244), U8(0), + /* 3281 E> */ B(StaCurrentContextSlot), U8(244), /* 3295 S> */ B(LdaZero), - /* 3295 E> */ B(StaContextSlot), R(context), U8(245), U8(0), + /* 3295 E> */ B(StaCurrentContextSlot), U8(245), /* 3309 S> */ B(LdaZero), - /* 3309 E> */ B(StaContextSlot), R(context), U8(246), U8(0), + /* 3309 E> */ B(StaCurrentContextSlot), U8(246), /* 3323 S> */ B(LdaZero), - /* 3323 E> */ B(StaContextSlot), R(context), U8(247), U8(0), + /* 3323 E> */ B(StaCurrentContextSlot), U8(247), /* 3337 S> */ B(LdaZero), - /* 3337 E> */ B(StaContextSlot), R(context), U8(248), U8(0), + /* 3337 E> */ B(StaCurrentContextSlot), U8(248), /* 3351 S> */ B(LdaZero), - /* 3351 E> */ B(StaContextSlot), R(context), U8(249), U8(0), + /* 3351 E> */ B(StaCurrentContextSlot), U8(249), /* 3365 S> */ B(LdaZero), - /* 3365 E> */ B(StaContextSlot), R(context), U8(250), U8(0), + /* 3365 E> */ B(StaCurrentContextSlot), U8(250), /* 3379 S> */ B(LdaZero), - /* 3379 E> */ B(StaContextSlot), R(context), U8(251), U8(0), + /* 3379 E> */ B(StaCurrentContextSlot), U8(251), /* 3393 S> */ B(LdaZero), - /* 3393 E> */ B(StaContextSlot), R(context), U8(252), U8(0), + /* 3393 E> */ B(StaCurrentContextSlot), U8(252), /* 3407 S> */ B(LdaZero), - /* 3407 E> */ B(StaContextSlot), R(context), U8(253), U8(0), + /* 3407 E> */ B(StaCurrentContextSlot), U8(253), /* 3421 S> */ B(LdaZero), - /* 3421 E> */ B(StaContextSlot), R(context), U8(254), U8(0), + /* 3421 E> */ B(StaCurrentContextSlot), U8(254), /* 3435 S> */ B(LdaZero), - /* 3435 E> */ B(StaContextSlot), R(context), U8(255), U8(0), + /* 3435 E> */ B(StaCurrentContextSlot), U8(255), /* 3438 S> */ B(LdrUndefined), R(2), /* 3438 E> */ B(LdrGlobal), U8(4), R(1), /* 3438 E> */ B(Call), R(1), R(2), U8(1), U8(2), /* 3454 S> */ B(LdaSmi), U8(100), - /* 3454 E> */ B(Wide), B(StaContextSlot), R16(context), U16(256), U16(0), - /* 3459 S> */ B(Wide), B(LdaContextSlot), R16(context), U16(256), U16(0), + /* 3454 E> */ B(Wide), B(StaCurrentContextSlot), U16(256), + /* 3459 S> */ B(Wide), B(LdaCurrentContextSlot), U16(256), /* 3468 S> */ B(Return), ] constant pool: [ diff --git a/test/cctest/interpreter/bytecode_expectations/CountOperators.golden b/test/cctest/interpreter/bytecode_expectations/CountOperators.golden index 29e0ec3582..5683eb7a07 100644 --- a/test/cctest/interpreter/bytecode_expectations/CountOperators.golden +++ b/test/cctest/interpreter/bytecode_expectations/CountOperators.golden @@ -197,18 +197,18 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 27 +bytecode array length: 21 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(1), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 53 S> */ B(CreateClosure), U8(0), U8(2), B(Star), R(0), - /* 78 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 78 S> */ B(LdaCurrentContextSlot), U8(4), B(Inc), U8(2), - /* 87 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 87 E> */ B(StaCurrentContextSlot), U8(4), /* 90 S> */ B(Return), ] constant pool: [ @@ -223,19 +223,19 @@ snippet: " " frame size: 3 parameter count: 1 -bytecode array length: 31 +bytecode array length: 25 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(1), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 53 S> */ B(CreateClosure), U8(0), U8(2), B(Star), R(0), - /* 78 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 78 S> */ B(LdaCurrentContextSlot), U8(4), B(ToNumber), R(2), B(Dec), U8(2), - /* 86 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 86 E> */ B(StaCurrentContextSlot), U8(4), B(Ldar), R(2), /* 90 S> */ B(Return), ] diff --git a/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden b/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden index 1c12767e09..cc073cfd66 100644 --- a/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden +++ b/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden @@ -74,12 +74,12 @@ snippet: " " frame size: 2 parameter count: 2 -bytecode array length: 19 +bytecode array length: 17 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(Ldar), R(arg0), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), B(Star), R(0), /* 10 E> */ B(StackCheck), @@ -99,16 +99,16 @@ snippet: " " frame size: 2 parameter count: 4 -bytecode array length: 28 +bytecode array length: 22 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(1), B(Ldar), R(arg0), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(arg1), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Ldar), R(arg2), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), B(Star), R(0), /* 10 E> */ B(StackCheck), diff --git a/test/cctest/interpreter/bytecode_expectations/Delete.golden b/test/cctest/interpreter/bytecode_expectations/Delete.golden index d7d60aa26f..0cd3a18944 100644 --- a/test/cctest/interpreter/bytecode_expectations/Delete.golden +++ b/test/cctest/interpreter/bytecode_expectations/Delete.golden @@ -98,16 +98,16 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 29 +bytecode array length: 25 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(0), /* 30 E> */ B(StackCheck), /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), R(1), B(Ldar), R(1), - /* 56 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 56 E> */ B(StaCurrentContextSlot), U8(4), /* 64 S> */ B(CreateClosure), U8(1), U8(2), - /* 93 S> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(1), + /* 93 S> */ B(LdrCurrentContextSlot), U8(4), R(1), B(LdaSmi), U8(1), B(DeletePropertyStrict), R(1), /* 113 S> */ B(Return), diff --git a/test/cctest/interpreter/bytecode_expectations/Eval.golden b/test/cctest/interpreter/bytecode_expectations/Eval.golden index fafc8d564b..d8781cecfe 100644 --- a/test/cctest/interpreter/bytecode_expectations/Eval.golden +++ b/test/cctest/interpreter/bytecode_expectations/Eval.golden @@ -11,16 +11,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 69 +bytecode array length: 63 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 30 E> */ B(StackCheck), /* 34 S> */ B(LdaConstant), U8(0), B(Star), R(4), diff --git a/test/cctest/interpreter/bytecode_expectations/ForOf.golden b/test/cctest/interpreter/bytecode_expectations/ForOf.golden index 53e81d090a..aaa7666e91 100644 --- a/test/cctest/interpreter/bytecode_expectations/ForOf.golden +++ b/test/cctest/interpreter/bytecode_expectations/ForOf.golden @@ -11,7 +11,7 @@ snippet: " " frame size: 15 parameter count: 1 -bytecode array length: 279 +bytecode array length: 277 bytecodes: [ /* 30 E> */ B(StackCheck), B(LdaZero), @@ -42,7 +42,7 @@ bytecodes: [ B(LdaZero), B(Star), R(4), B(JumpLoop), U8(-49), U8(0), - B(Jump), U8(37), + B(Jump), U8(35), B(Star), R(13), B(Ldar), R(closure), B(CreateCatchContext), R(13), U8(5), U8(6), @@ -53,7 +53,7 @@ bytecodes: [ B(JumpIfFalse), U8(6), B(LdaSmi), U8(1), B(Star), R(4), - B(LdrContextSlot), R(context), U8(4), U8(0), R(13), + B(LdrCurrentContextSlot), U8(4), R(13), B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1), B(PopContext), R(8), B(LdaSmi), U8(-1), @@ -137,9 +137,9 @@ constant pool: [ FIXED_ARRAY_TYPE, ] handlers: [ - [7, 118, 124], + [7, 116, 122], [10, 81, 83], - [201, 211, 213], + [199, 209, 211], ] --- @@ -149,7 +149,7 @@ snippet: " " frame size: 16 parameter count: 1 -bytecode array length: 290 +bytecode array length: 288 bytecodes: [ /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaConstant), U8(0), @@ -180,8 +180,8 @@ bytecodes: [ /* 73 S> */ B(LdaZero), B(Star), R(10), B(Mov), R(1), R(11), - B(Jump), U8(51), - B(Jump), U8(37), + B(Jump), U8(49), + B(Jump), U8(35), B(Star), R(14), B(Ldar), R(closure), B(CreateCatchContext), R(14), U8(5), U8(6), @@ -192,7 +192,7 @@ bytecodes: [ B(JumpIfFalse), U8(6), B(LdaSmi), U8(1), B(Star), R(5), - B(LdrContextSlot), R(context), U8(4), U8(0), R(14), + B(LdrCurrentContextSlot), U8(4), R(14), B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1), B(PopContext), R(9), B(LdaSmi), U8(-1), @@ -281,9 +281,9 @@ constant pool: [ FIXED_ARRAY_TYPE, ] handlers: [ - [11, 118, 124], + [11, 116, 122], [14, 81, 83], - [202, 212, 214], + [200, 210, 212], ] --- @@ -295,7 +295,7 @@ snippet: " " frame size: 15 parameter count: 1 -bytecode array length: 297 +bytecode array length: 295 bytecodes: [ /* 30 E> */ B(StackCheck), B(LdaZero), @@ -334,7 +334,7 @@ bytecodes: [ B(LdaZero), B(Star), R(4), B(JumpLoop), U8(-67), U8(0), - B(Jump), U8(37), + B(Jump), U8(35), B(Star), R(13), B(Ldar), R(closure), B(CreateCatchContext), R(13), U8(5), U8(6), @@ -345,7 +345,7 @@ bytecodes: [ B(JumpIfFalse), U8(6), B(LdaSmi), U8(1), B(Star), R(4), - B(LdrContextSlot), R(context), U8(4), U8(0), R(13), + B(LdrCurrentContextSlot), U8(4), R(13), B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1), B(PopContext), R(8), B(LdaSmi), U8(-1), @@ -429,9 +429,9 @@ constant pool: [ FIXED_ARRAY_TYPE, ] handlers: [ - [7, 136, 142], + [7, 134, 140], [10, 99, 101], - [219, 229, 231], + [217, 227, 229], ] --- @@ -441,7 +441,7 @@ snippet: " " frame size: 14 parameter count: 1 -bytecode array length: 303 +bytecode array length: 301 bytecodes: [ /* 30 E> */ B(StackCheck), /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), R(8), @@ -475,8 +475,8 @@ bytecodes: [ /* 96 E> */ B(LdrNamedProperty), R(0), U8(6), U8(16), R(9), B(LdaZero), B(Star), R(8), - B(Jump), U8(51), - B(Jump), U8(37), + B(Jump), U8(49), + B(Jump), U8(35), B(Star), R(12), B(Ldar), R(closure), B(CreateCatchContext), R(12), U8(7), U8(8), @@ -487,7 +487,7 @@ bytecodes: [ B(JumpIfFalse), U8(6), B(LdaSmi), U8(1), B(Star), R(3), - B(LdrContextSlot), R(context), U8(4), U8(0), R(12), + B(LdrCurrentContextSlot), U8(4), R(12), B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1), B(PopContext), R(7), B(LdaSmi), U8(-1), @@ -578,8 +578,8 @@ constant pool: [ FIXED_ARRAY_TYPE, ] handlers: [ - [15, 131, 137], + [15, 129, 135], [18, 94, 96], - [215, 225, 227], + [213, 223, 225], ] diff --git a/test/cctest/interpreter/bytecode_expectations/Generators.golden b/test/cctest/interpreter/bytecode_expectations/Generators.golden index 8e8aa4eb79..f6621dbabf 100644 --- a/test/cctest/interpreter/bytecode_expectations/Generators.golden +++ b/test/cctest/interpreter/bytecode_expectations/Generators.golden @@ -13,7 +13,7 @@ snippet: " " frame size: 11 parameter count: 1 -bytecode array length: 212 +bytecode array length: 202 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -21,7 +21,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(61), + B(JumpIfTrue), U8(53), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -30,16 +30,16 @@ bytecodes: [ B(CreateFunctionContext), U8(2), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 11 E> */ B(StackCheck), B(Mov), R(context), R(4), - /* 11 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(6), + /* 11 E> */ B(LdrCurrentContextSlot), U8(4), R(6), B(Ldar), R(6), B(Mov), R(closure), R(5), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(5), - B(LdrContextSlot), R(context), U8(5), U8(0), R(6), + B(LdrCurrentContextSlot), U8(5), R(6), B(LdaZero), B(SuspendGenerator), R(6), B(Ldar), R(5), @@ -83,7 +83,7 @@ bytecodes: [ B(Star), R(2), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(Star), R(4), - B(LdrContextSlot), R(context), U8(5), U8(0), R(5), + B(LdrCurrentContextSlot), U8(5), R(5), B(CallRuntime), U16(Runtime::k_GeneratorClose), R(5), U8(1), B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1), B(LdaZero), @@ -108,7 +108,7 @@ bytecodes: [ constant pool: [ ] handlers: [ - [41, 145, 151], + [39, 137, 143], ] --- @@ -118,7 +118,7 @@ snippet: " " frame size: 11 parameter count: 1 -bytecode array length: 310 +bytecode array length: 298 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(28), @@ -126,7 +126,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(68), + B(JumpIfTrue), U8(60), B(LdaSmi), U8(1), B(TestEqualStrict), R(1), U8(0), B(JumpIfTrueConstant), U8(0), @@ -138,16 +138,16 @@ bytecodes: [ B(CreateFunctionContext), U8(2), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 11 E> */ B(StackCheck), B(Mov), R(context), R(4), - /* 11 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(6), + /* 11 E> */ B(LdrCurrentContextSlot), U8(4), R(6), B(Ldar), R(6), B(Mov), R(closure), R(5), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(5), - B(LdrContextSlot), R(context), U8(5), U8(0), R(6), + B(LdrCurrentContextSlot), U8(5), R(6), B(LdaZero), B(SuspendGenerator), R(6), B(Ldar), R(5), @@ -172,7 +172,7 @@ bytecodes: [ B(Star), R(3), B(LdaZero), B(Star), R(2), - B(Jump), U8(116), + B(Jump), U8(114), B(Ldar), R(7), /* 11 E> */ B(Throw), /* 16 S> */ B(LdaSmi), U8(42), @@ -181,7 +181,7 @@ bytecodes: [ B(Star), R(6), B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(5), U8(2), B(Star), R(5), - B(LdrContextSlot), R(context), U8(5), U8(0), R(6), + B(LdrCurrentContextSlot), U8(5), R(6), B(LdaSmi), U8(1), B(SuspendGenerator), R(6), B(Ldar), R(5), @@ -225,7 +225,7 @@ bytecodes: [ B(Star), R(2), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(Star), R(4), - B(LdrContextSlot), R(context), U8(5), U8(0), R(5), + B(LdrCurrentContextSlot), U8(5), R(5), B(CallRuntime), U16(Runtime::k_GeneratorClose), R(5), U8(1), B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1), B(LdaZero), @@ -253,10 +253,10 @@ bytecodes: [ /* 25 S> */ B(Return), ] constant pool: [ - Smi [141], + Smi [131], ] handlers: [ - [48, 233, 239], + [46, 223, 229], ] --- @@ -266,7 +266,7 @@ snippet: " " frame size: 18 parameter count: 1 -bytecode array length: 793 +bytecode array length: 773 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(28), @@ -274,7 +274,7 @@ bytecodes: [ B(Star), R(4), B(LdaZero), B(TestEqualStrict), R(4), U8(0), - B(JumpIfTrue), U8(68), + B(JumpIfTrue), U8(60), B(LdaSmi), U8(1), B(TestEqualStrict), R(4), U8(0), B(JumpIfTrueConstant), U8(3), @@ -286,16 +286,16 @@ bytecodes: [ B(CreateFunctionContext), U8(9), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 11 E> */ B(StackCheck), B(Mov), R(context), R(7), - /* 11 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(9), + /* 11 E> */ B(LdrCurrentContextSlot), U8(4), R(9), B(Ldar), R(9), B(Mov), R(closure), R(8), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(8), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(8), - B(LdrContextSlot), R(context), U8(5), U8(0), R(9), + B(LdrCurrentContextSlot), U8(5), R(9), B(LdaZero), B(SuspendGenerator), R(9), B(Ldar), R(8), @@ -320,14 +320,14 @@ bytecodes: [ B(Star), R(6), B(LdaZero), B(Star), R(5), - B(JumpConstant), U8(18), + B(JumpConstant), U8(19), B(Ldar), R(10), /* 11 E> */ B(Throw), B(Ldar), R(closure), B(CreateBlockContext), U8(0), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(LdaZero), B(StaContextSlot), R(1), U8(9), U8(0), B(Mov), R(context), R(10), @@ -372,10 +372,10 @@ bytecodes: [ B(CreateBlockContext), U8(7), B(PushContext), R(2), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(LdaContextSlot), R(1), U8(6), U8(0), - B(StaContextSlot), R(context), U8(4), U8(0), - /* 36 S> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(12), + B(StaCurrentContextSlot), U8(4), + /* 36 S> */ B(LdrCurrentContextSlot), U8(4), R(12), B(LdaFalse), B(Star), R(13), B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(12), U8(2), @@ -411,14 +411,14 @@ bytecodes: [ B(Star), R(9), B(LdaZero), B(Star), R(8), - B(Jump), U8(74), + B(Jump), U8(72), B(Ldar), R(14), /* 36 E> */ B(Throw), B(PopContext), R(2), B(LdaZero), B(StaContextSlot), R(1), U8(9), U8(0), - B(Wide), B(JumpLoop), U16(-220), U16(0), - B(Jump), U8(44), + B(Wide), B(JumpLoop), U16(-214), U16(0), + B(Jump), U8(42), B(Star), R(12), B(Ldar), R(closure), B(CreateCatchContext), R(12), U8(10), U8(11), @@ -430,7 +430,7 @@ bytecodes: [ B(JumpIfFalse), U8(8), B(LdaSmi), U8(1), B(StaContextSlot), R(0), U8(9), U8(0), - B(LdrContextSlot), R(context), U8(4), U8(0), R(12), + B(LdrCurrentContextSlot), U8(4), R(12), B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1), B(PopContext), R(2), B(LdaSmi), U8(-1), @@ -448,7 +448,7 @@ bytecodes: [ B(LdrContextSlot), R(1), U8(7), U8(0), R(11), B(LdaUndefined), B(TestEqualStrict), R(11), U8(16), - B(JumpIfTrueConstant), U8(9), + B(JumpIfTrueConstant), U8(18), B(LdrContextSlot), R(1), U8(7), U8(0), R(11), B(LdaNamedProperty), R(11), U8(12), U8(17), B(StaContextSlot), R(1), U8(11), U8(0), @@ -535,7 +535,7 @@ bytecodes: [ B(Star), R(5), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(Star), R(7), - B(LdrContextSlot), R(context), U8(5), U8(0), R(8), + B(LdrCurrentContextSlot), U8(5), R(8), B(CallRuntime), U16(Runtime::k_GeneratorClose), R(8), U8(1), B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(7), U8(1), B(LdaZero), @@ -571,13 +571,13 @@ constant pool: [ FIXED_ARRAY_TYPE, FIXED_ARRAY_TYPE, SYMBOL_TYPE, - Smi [158], + Smi [148], ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], FIXED_ARRAY_TYPE, - Smi [134], - Smi [155], + Smi [128], + Smi [149], ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], FIXED_ARRAY_TYPE, ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], @@ -586,12 +586,13 @@ constant pool: [ FIXED_ARRAY_TYPE, Smi [129], Smi [166], - Smi [589], + Smi [155], + Smi [579], ] handlers: [ - [48, 706, 712], - [153, 446, 452], - [156, 402, 404], - [560, 574, 576], + [46, 688, 694], + [143, 428, 434], + [146, 386, 388], + [542, 556, 558], ] diff --git a/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden b/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden index 66583f3389..fea78bae62 100644 --- a/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden +++ b/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden @@ -64,10 +64,10 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 16 +bytecode array length: 14 bytecodes: [ /* 32 E> */ B(StackCheck), - /* 39 S> */ B(LdrContextSlot), R(context), U8(3), U8(0), R(0), + /* 39 S> */ B(LdrCurrentContextSlot), U8(3), R(0), B(LdrContextSlot), R(0), U8(2), U8(0), R(1), B(LdaConstant), U8(0), B(DeletePropertySloppy), R(1), @@ -89,10 +89,10 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 16 +bytecode array length: 14 bytecodes: [ /* 18 E> */ B(StackCheck), - /* 25 S> */ B(LdrContextSlot), R(context), U8(3), U8(0), R(0), + /* 25 S> */ B(LdrCurrentContextSlot), U8(3), R(0), B(LdrContextSlot), R(0), U8(2), U8(0), R(1), B(LdaConstant), U8(0), B(DeletePropertySloppy), R(1), diff --git a/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden b/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden index bea38c7ea5..39c334985f 100644 --- a/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden +++ b/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden @@ -11,17 +11,17 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 23 +bytecode array length: 19 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(10), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 72 S> */ B(Return), ] @@ -37,18 +37,18 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 26 +bytecode array length: 20 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(10), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), - /* 72 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), + /* 72 S> */ B(LdaCurrentContextSlot), U8(4), /* 82 S> */ B(Return), ] constant pool: [ @@ -63,25 +63,25 @@ snippet: " " frame size: 4 parameter count: 1 -bytecode array length: 46 +bytecode array length: 38 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 45 S> */ B(LdaSmi), U8(20), B(Star), R(2), - /* 45 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 45 E> */ B(LdaCurrentContextSlot), U8(4), B(JumpIfNotHole), U8(11), B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), B(Ldar), R(2), - B(StaContextSlot), R(context), U8(4), U8(0), - /* 45 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), + /* 45 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 78 S> */ B(Return), ] @@ -98,19 +98,19 @@ snippet: " " frame size: 2 parameter count: 1 -bytecode array length: 29 +bytecode array length: 23 bytecodes: [ B(CreateFunctionContext), U8(1), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateClosure), U8(0), U8(2), B(Star), R(0), /* 30 E> */ B(StackCheck), /* 42 S> */ B(LdaSmi), U8(10), - /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 46 S> */ B(LdaSmi), U8(20), - /* 48 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 48 E> */ B(StaCurrentContextSlot), U8(4), B(LdaUndefined), /* 80 S> */ B(Return), ] diff --git a/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden b/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden index 77ff808468..8e36d68d63 100644 --- a/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden +++ b/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden @@ -12,16 +12,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 73 +bytecode array length: 67 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 10 E> */ B(StackCheck), /* 14 S> */ B(LdaConstant), U8(0), B(Star), R(4), @@ -57,16 +57,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 74 +bytecode array length: 68 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 10 E> */ B(StackCheck), /* 14 S> */ B(LdaConstant), U8(0), B(Star), R(4), @@ -103,16 +103,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 73 +bytecode array length: 67 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 10 E> */ B(StackCheck), /* 14 S> */ B(LdaSmi), U8(20), /* 16 E> */ B(StaLookupSlotSloppy), U8(0), @@ -154,16 +154,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 73 +bytecode array length: 67 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 38 E> */ B(StackCheck), /* 44 S> */ B(LdaConstant), U8(0), B(Star), R(4), @@ -204,16 +204,16 @@ snippet: " " frame size: 10 parameter count: 1 -bytecode array length: 73 +bytecode array length: 67 bytecodes: [ B(CreateFunctionContext), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(CreateMappedArguments), - B(StaContextSlot), R(context), U8(6), U8(0), + B(StaCurrentContextSlot), U8(6), B(Ldar), R(new_target), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), /* 34 E> */ B(StackCheck), /* 40 S> */ B(LdaConstant), U8(0), B(Star), R(4), diff --git a/test/cctest/interpreter/bytecode_expectations/Modules.golden b/test/cctest/interpreter/bytecode_expectations/Modules.golden index c5ff8b4b4c..e373200a37 100644 --- a/test/cctest/interpreter/bytecode_expectations/Modules.golden +++ b/test/cctest/interpreter/bytecode_expectations/Modules.golden @@ -13,7 +13,7 @@ snippet: " " frame size: 8 parameter count: 2 -bytecode array length: 133 +bytecode array length: 125 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -21,7 +21,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(71), + B(JumpIfTrue), U8(63), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -34,15 +34,15 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), B(Ldar), R(3), B(Mov), R(closure), R(2), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(2), - B(LdrContextSlot), R(context), U8(5), U8(0), R(3), + B(LdrCurrentContextSlot), U8(5), R(3), B(LdaZero), B(SuspendGenerator), R(3), B(Ldar), R(2), @@ -82,7 +82,7 @@ snippet: " " frame size: 8 parameter count: 2 -bytecode array length: 133 +bytecode array length: 125 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -90,7 +90,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(71), + B(JumpIfTrue), U8(63), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -103,15 +103,15 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), B(Ldar), R(3), B(Mov), R(closure), R(2), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(2), - B(LdrContextSlot), R(context), U8(5), U8(0), R(3), + B(LdrCurrentContextSlot), U8(5), R(3), B(LdaZero), B(SuspendGenerator), R(3), B(Ldar), R(2), @@ -153,7 +153,7 @@ snippet: " " frame size: 9 parameter count: 2 -bytecode array length: 223 +bytecode array length: 211 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -161,7 +161,7 @@ bytecodes: [ B(Star), R(2), B(LdaZero), B(TestEqualStrict), R(2), U8(0), - B(JumpIfTrue), U8(71), + B(JumpIfTrue), U8(63), B(LdaSmi), U8(76), B(Star), R(3), B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), @@ -174,15 +174,15 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(4), B(Ldar), R(4), B(Mov), R(closure), R(3), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(3), - B(LdrContextSlot), R(context), U8(5), U8(0), R(4), + B(LdrCurrentContextSlot), U8(5), R(4), B(LdaZero), B(SuspendGenerator), R(4), B(Ldar), R(3), @@ -225,9 +225,9 @@ bytecodes: [ B(CreateBlockContext), U8(3), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 47 S> */ B(LdaUndefined), - /* 47 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 47 E> */ B(StaCurrentContextSlot), U8(4), /* 52 S> */ B(LdrUndefined), R(4), B(LdaConstant), U8(1), B(Star), R(6), @@ -263,7 +263,7 @@ snippet: " " frame size: 9 parameter count: 2 -bytecode array length: 208 +bytecode array length: 196 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -271,7 +271,7 @@ bytecodes: [ B(Star), R(2), B(LdaZero), B(TestEqualStrict), R(2), U8(0), - B(JumpIfTrue), U8(71), + B(JumpIfTrue), U8(63), B(LdaSmi), U8(76), B(Star), R(3), B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), @@ -284,15 +284,15 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(4), B(Ldar), R(4), B(Mov), R(closure), R(3), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(3), - B(LdrContextSlot), R(context), U8(5), U8(0), R(4), + B(LdrCurrentContextSlot), U8(5), R(4), B(LdaZero), B(SuspendGenerator), R(4), B(Ldar), R(3), @@ -334,9 +334,9 @@ bytecodes: [ B(CreateBlockContext), U8(2), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 34 S> */ B(LdaUndefined), - /* 34 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 34 E> */ B(StaCurrentContextSlot), U8(4), /* 39 S> */ B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1), @@ -365,7 +365,7 @@ snippet: " " frame size: 9 parameter count: 2 -bytecode array length: 220 +bytecode array length: 208 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -373,7 +373,7 @@ bytecodes: [ B(Star), R(2), B(LdaZero), B(TestEqualStrict), R(2), U8(0), - B(JumpIfTrue), U8(83), + B(JumpIfTrue), U8(75), B(LdaSmi), U8(76), B(Star), R(3), B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), @@ -386,20 +386,20 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(LdaTheHole), B(Star), R(4), B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(4), B(Ldar), R(4), B(Mov), R(closure), R(3), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(3), - B(LdrContextSlot), R(context), U8(5), U8(0), R(4), + B(LdrCurrentContextSlot), U8(5), R(4), B(LdaZero), B(SuspendGenerator), R(4), B(Ldar), R(3), @@ -441,9 +441,9 @@ bytecodes: [ B(CreateBlockContext), U8(2), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 34 S> */ B(LdaUndefined), - /* 34 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 34 E> */ B(StaCurrentContextSlot), U8(4), /* 39 S> */ B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1), @@ -472,7 +472,7 @@ snippet: " " frame size: 9 parameter count: 2 -bytecode array length: 208 +bytecode array length: 196 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -480,7 +480,7 @@ bytecodes: [ B(Star), R(2), B(LdaZero), B(TestEqualStrict), R(2), U8(0), - B(JumpIfTrue), U8(83), + B(JumpIfTrue), U8(75), B(LdaSmi), U8(76), B(Star), R(3), B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), @@ -493,20 +493,20 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(LdaTheHole), B(Star), R(4), B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(4), B(Ldar), R(4), B(Mov), R(closure), R(3), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(3), - B(LdrContextSlot), R(context), U8(5), U8(0), R(4), + B(LdrCurrentContextSlot), U8(5), R(4), B(LdaZero), B(SuspendGenerator), R(4), B(Ldar), R(3), @@ -545,9 +545,9 @@ bytecodes: [ B(CreateBlockContext), U8(2), B(PushContext), R(1), B(LdaTheHole), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 36 S> */ B(LdaUndefined), - /* 36 E> */ B(StaContextSlot), R(context), U8(4), U8(0), + /* 36 E> */ B(StaCurrentContextSlot), U8(4), /* 41 S> */ B(LdaConstant), U8(1), B(Star), R(3), B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1), @@ -571,7 +571,7 @@ snippet: " " frame size: 8 parameter count: 2 -bytecode array length: 159 +bytecode array length: 151 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -579,7 +579,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(83), + B(JumpIfTrue), U8(75), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -592,20 +592,20 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(LdaTheHole), B(Star), R(3), B(LdaConstant), U8(1), B(Star), R(2), B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), B(Ldar), R(3), B(Mov), R(closure), R(2), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(2), - B(LdrContextSlot), R(context), U8(5), U8(0), R(3), + B(LdrCurrentContextSlot), U8(5), R(3), B(LdaZero), B(SuspendGenerator), R(3), B(Ldar), R(2), @@ -652,7 +652,7 @@ snippet: " " frame size: 8 parameter count: 2 -bytecode array length: 196 +bytecode array length: 184 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -660,7 +660,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(83), + B(JumpIfTrue), U8(75), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -673,20 +673,20 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), B(LdaTheHole), B(Star), R(3), B(LdaConstant), U8(1), B(Star), R(2), B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), B(Ldar), R(3), B(Mov), R(closure), R(2), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(2), - B(LdrContextSlot), R(context), U8(5), U8(0), R(3), + B(LdrCurrentContextSlot), U8(5), R(3), B(LdaZero), B(SuspendGenerator), R(3), B(Ldar), R(2), @@ -723,8 +723,8 @@ bytecodes: [ B(Star), R(2), B(LdrNamedProperty), R(2), U8(3), U8(2), R(3), B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), - B(StaContextSlot), R(context), U8(6), U8(0), - /* 16 E> */ B(LdrContextSlot), R(context), U8(6), U8(0), R(3), + B(StaCurrentContextSlot), U8(6), + /* 16 E> */ B(LdrCurrentContextSlot), U8(6), R(3), B(LdaConstant), U8(1), B(Star), R(2), B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2), @@ -746,7 +746,7 @@ snippet: " " frame size: 8 parameter count: 2 -bytecode array length: 133 +bytecode array length: 125 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -754,7 +754,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(71), + B(JumpIfTrue), U8(63), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -767,15 +767,15 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), B(Ldar), R(3), B(Mov), R(closure), R(2), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(2), - B(LdrContextSlot), R(context), U8(5), U8(0), R(3), + B(LdrCurrentContextSlot), U8(5), R(3), B(LdaZero), B(SuspendGenerator), R(3), B(Ldar), R(2), @@ -815,7 +815,7 @@ snippet: " " frame size: 8 parameter count: 2 -bytecode array length: 133 +bytecode array length: 125 bytecodes: [ B(Ldar), R(new_target), B(JumpIfUndefined), U8(21), @@ -823,7 +823,7 @@ bytecodes: [ B(Star), R(1), B(LdaZero), B(TestEqualStrict), R(1), U8(0), - B(JumpIfTrue), U8(71), + B(JumpIfTrue), U8(63), B(LdaSmi), U8(76), B(Star), R(2), B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), @@ -836,15 +836,15 @@ bytecodes: [ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3), B(PushContext), R(0), B(Ldar), R(this), - B(StaContextSlot), R(context), U8(4), U8(0), + B(StaCurrentContextSlot), U8(4), /* 0 E> */ B(StackCheck), - /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3), + /* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), B(Ldar), R(3), B(Mov), R(closure), R(2), B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2), - B(StaContextSlot), R(context), U8(5), U8(0), + B(StaCurrentContextSlot), U8(5), B(Star), R(2), - B(LdrContextSlot), R(context), U8(5), U8(0), R(3), + B(LdrCurrentContextSlot), U8(5), R(3), B(LdaZero), B(SuspendGenerator), R(3), B(Ldar), R(2), diff --git a/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden b/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden index 397b0de724..5e9bc569d2 100644 --- a/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden +++ b/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden @@ -20,11 +20,11 @@ snippet: " " frame size: 1 parameter count: 1 -bytecode array length: 14 +bytecode array length: 12 bytecodes: [ /* 97 E> */ B(StackCheck), /* 102 S> */ B(LdrContextSlot), R(context), U8(4), U8(1), R(0), - /* 120 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 120 E> */ B(LdaCurrentContextSlot), U8(4), B(Mul), R(0), U8(2), /* 130 S> */ B(Return), ] @@ -47,10 +47,10 @@ snippet: " " frame size: 0 parameter count: 1 -bytecode array length: 11 +bytecode array length: 9 bytecodes: [ /* 97 E> */ B(StackCheck), - /* 102 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), + /* 102 S> */ B(LdaCurrentContextSlot), U8(4), /* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1), B(LdaUndefined), /* 123 S> */ B(Return), diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc index b5044123d7..9ce46c4a75 100644 --- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc +++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc @@ -88,6 +88,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { .LoadContextSlot(reg, 1, 0) .StoreContextSlot(reg, 1, 0); + // Emit context operations which operate on the local context. + builder.LoadContextSlot(Register::current_context(), 1, 0) + .StoreContextSlot(Register::current_context(), 1, 0); + // Emit load / store property operations. builder.LoadNamedProperty(reg, name, 0) .LoadKeyedProperty(reg, 0) @@ -312,6 +316,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { .StoreAccumulatorInRegister(reg) .LoadContextSlot(reg, 1, 0) .StoreAccumulatorInRegister(reg) + .LoadContextSlot(Register::current_context(), 1, 0) + .StoreAccumulatorInRegister(reg) .LoadGlobal(0, TypeofMode::NOT_INSIDE_TYPEOF) .StoreAccumulatorInRegister(reg) .LoadUndefined() @@ -386,6 +392,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { scorecard[Bytecodes::ToByte(Bytecode::kLdrKeyedProperty)] = 1; scorecard[Bytecodes::ToByte(Bytecode::kLdrGlobal)] = 1; scorecard[Bytecodes::ToByte(Bytecode::kLdrContextSlot)] = 1; + scorecard[Bytecodes::ToByte(Bytecode::kLdrCurrentContextSlot)] = 1; scorecard[Bytecodes::ToByte(Bytecode::kLdrUndefined)] = 1; scorecard[Bytecodes::ToByte(Bytecode::kLogicalNot)] = 1; scorecard[Bytecodes::ToByte(Bytecode::kJump)] = 1;