| Index: src/interpreter/interpreter.cc
|
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
|
| index c9f06e4e008819a27c7545ec121cc9e46cf5b5d6..e8ebf2bfe1f60848ac208082f800fb7a9bbd6c73 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::BuildLoadLocalContextSlot(
|
| + InterpreterAssembler* assembler) {
|
| + Node* slot_index = __ BytecodeOperandIdx(0);
|
| + Node* slot_context = __ GetContext();
|
| + return __ LoadContextSlot(slot_context, slot_index);
|
| +}
|
| +
|
| // LdaContextSlot <context> <slot_index> <depth>
|
| //
|
| // Load the object in |slot_index| of the context at |depth| in the context
|
| @@ -554,6 +561,15 @@ void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) {
|
| __ Dispatch();
|
| }
|
|
|
| +// LdaLocalContextSlot <slot_index>
|
| +//
|
| +// Load the object in |slot_index| of the current context into the accumulator.
|
| +void Interpreter::DoLdaLocalContextSlot(InterpreterAssembler* assembler) {
|
| + Node* result = BuildLoadLocalContextSlot(assembler);
|
| + __ SetAccumulator(result);
|
| + __ Dispatch();
|
| +}
|
| +
|
| // LdrContextSlot <context> <slot_index> <depth> <reg>
|
| //
|
| // Load the object in |slot_index| of the context at |depth| in the context
|
| @@ -565,6 +581,16 @@ void Interpreter::DoLdrContextSlot(InterpreterAssembler* assembler) {
|
| __ Dispatch();
|
| }
|
|
|
| +// LdrLocalContextSlot <slot_index> <reg>
|
| +//
|
| +// Load the object in |slot_index| of the current context into register |reg|.
|
| +void Interpreter::DoLdrLocalContextSlot(InterpreterAssembler* assembler) {
|
| + Node* result = BuildLoadLocalContextSlot(assembler);
|
| + Node* destination = __ BytecodeOperandReg(1);
|
| + __ StoreRegister(result, destination);
|
| + __ Dispatch();
|
| +}
|
| +
|
| // StaContextSlot <context> <slot_index> <depth>
|
| //
|
| // Stores the object in the accumulator into |slot_index| of the context at
|
| @@ -580,6 +606,18 @@ void Interpreter::DoStaContextSlot(InterpreterAssembler* assembler) {
|
| __ Dispatch();
|
| }
|
|
|
| +// StaLocalContextSlot <slot_index>
|
| +//
|
| +// Stores the object in the accumulator into |slot_index| of the current
|
| +// context.
|
| +void Interpreter::DoStaLocalContextSlot(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);
|
|
|