Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1819)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 1403943004: [Interpreter] Add support for local context loads and stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_contextchain
Patch Set: Add back outer_ &&] Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/interpreter-assembler.h" 9 #include "src/compiler/interpreter-assembler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void Interpreter::DoLdaContextSlot(compiler::InterpreterAssembler* assembler) { 214 void Interpreter::DoLdaContextSlot(compiler::InterpreterAssembler* assembler) {
215 Node* reg_index = __ BytecodeOperandReg8(0); 215 Node* reg_index = __ BytecodeOperandReg8(0);
216 Node* context = __ LoadRegister(reg_index); 216 Node* context = __ LoadRegister(reg_index);
217 Node* slot_index = __ BytecodeOperandIdx8(1); 217 Node* slot_index = __ BytecodeOperandIdx8(1);
218 Node* result = __ LoadContextSlot(context, slot_index); 218 Node* result = __ LoadContextSlot(context, slot_index);
219 __ SetAccumulator(result); 219 __ SetAccumulator(result);
220 __ Dispatch(); 220 __ Dispatch();
221 } 221 }
222 222
223 223
224 // StaContextSlot <context> <slot_index>
225 //
226 // Stores the object in the accumulator into |slot_index| of |context|.
227 void Interpreter::DoStaContextSlot(compiler::InterpreterAssembler* assembler) {
228 Node* value = __ GetAccumulator();
229 Node* reg_index = __ BytecodeOperandReg8(0);
230 Node* context = __ LoadRegister(reg_index);
231 Node* slot_index = __ BytecodeOperandIdx8(1);
232 __ StoreContextSlot(context, slot_index, value);
233 __ Dispatch();
234 }
235
236
224 void Interpreter::DoPropertyLoadIC(Callable ic, 237 void Interpreter::DoPropertyLoadIC(Callable ic,
225 compiler::InterpreterAssembler* assembler) { 238 compiler::InterpreterAssembler* assembler) {
226 Node* code_target = __ HeapConstant(ic.code()); 239 Node* code_target = __ HeapConstant(ic.code());
227 Node* reg_index = __ BytecodeOperandReg8(0); 240 Node* reg_index = __ BytecodeOperandReg8(0);
228 Node* object = __ LoadRegister(reg_index); 241 Node* object = __ LoadRegister(reg_index);
229 Node* name = __ GetAccumulator(); 242 Node* name = __ GetAccumulator();
230 Node* raw_slot = __ BytecodeOperandIdx8(1); 243 Node* raw_slot = __ BytecodeOperandIdx8(1);
231 Node* smi_slot = __ SmiTag(raw_slot); 244 Node* smi_slot = __ SmiTag(raw_slot);
232 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); 245 Node* type_feedback_vector = __ LoadTypeFeedbackVector();
233 Node* result = __ CallIC(ic.descriptor(), code_target, object, name, smi_slot, 246 Node* result = __ CallIC(ic.descriptor(), code_target, object, name, smi_slot,
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 // 858 //
846 // Return the value in the accumulator. 859 // Return the value in the accumulator.
847 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 860 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
848 __ Return(); 861 __ Return();
849 } 862 }
850 863
851 864
852 } // namespace interpreter 865 } // namespace interpreter
853 } // namespace internal 866 } // namespace internal
854 } // namespace v8 867 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698