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

Side by Side Diff: src/compiler/interpreter-assembler.cc

Issue 1425633002: [Interpreter] Add support for loading from / storing to outer context variables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_conditional
Patch Set: Fix interpreter-assembler-unittests Created 5 years, 1 month 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 | « no previous file | src/compiler/raw-machine-assembler.h » ('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/compiler/interpreter-assembler.h" 5 #include "src/compiler/interpreter-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 120
121 Node* InterpreterAssembler::LoadRegister(Node* reg_index) { 121 Node* InterpreterAssembler::LoadRegister(Node* reg_index) {
122 return raw_assembler_->Load(kMachAnyTagged, RegisterFileRawPointer(), 122 return raw_assembler_->Load(kMachAnyTagged, RegisterFileRawPointer(),
123 RegisterFrameOffset(reg_index)); 123 RegisterFrameOffset(reg_index));
124 } 124 }
125 125
126 126
127 Node* InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) { 127 Node* InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) {
128 return raw_assembler_->Store(kMachAnyTagged, RegisterFileRawPointer(), 128 return raw_assembler_->Store(
129 RegisterFrameOffset(reg_index), value); 129 StoreRepresentation(kMachAnyTagged, kNoWriteBarrier),
130 RegisterFileRawPointer(), RegisterFrameOffset(reg_index), value);
130 } 131 }
131 132
132 133
133 Node* InterpreterAssembler::BytecodeOperand(int operand_index) { 134 Node* InterpreterAssembler::BytecodeOperand(int operand_index) {
134 DCHECK_LT(operand_index, interpreter::Bytecodes::NumberOfOperands(bytecode_)); 135 DCHECK_LT(operand_index, interpreter::Bytecodes::NumberOfOperands(bytecode_));
135 DCHECK_EQ(interpreter::OperandSize::kByte, 136 DCHECK_EQ(interpreter::OperandSize::kByte,
136 interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index)); 137 interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index));
137 return raw_assembler_->Load( 138 return raw_assembler_->Load(
138 kMachUint8, BytecodeArrayTaggedPointer(), 139 kMachUint8, BytecodeArrayTaggedPointer(),
139 IntPtrAdd(BytecodeOffset(), 140 IntPtrAdd(BytecodeOffset(),
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); 310 Int32Constant(Context::kHeaderSize - kHeapObjectTag));
310 return raw_assembler_->Load(kMachAnyTagged, context, offset); 311 return raw_assembler_->Load(kMachAnyTagged, context, offset);
311 } 312 }
312 313
313 314
314 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, 315 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index,
315 Node* value) { 316 Node* value) {
316 Node* offset = 317 Node* offset =
317 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), 318 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
318 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); 319 Int32Constant(Context::kHeaderSize - kHeapObjectTag));
319 return raw_assembler_->Store(kMachAnyTagged, context, offset, value); 320 return raw_assembler_->Store(
321 StoreRepresentation(kMachAnyTagged, kFullWriteBarrier), context, offset,
322 value);
320 } 323 }
321 324
322 325
323 Node* InterpreterAssembler::LoadTypeFeedbackVector() { 326 Node* InterpreterAssembler::LoadTypeFeedbackVector() {
324 Node* function = raw_assembler_->Load( 327 Node* function = raw_assembler_->Load(
325 kMachAnyTagged, RegisterFileRawPointer(), 328 kMachAnyTagged, RegisterFileRawPointer(),
326 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); 329 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer));
327 Node* shared_info = 330 Node* shared_info =
328 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); 331 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset);
329 Node* vector = 332 Node* vector =
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 return raw_assembler_->schedule(); 629 return raw_assembler_->schedule();
627 } 630 }
628 631
629 632
630 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } 633 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); }
631 634
632 635
633 } // namespace compiler 636 } // namespace compiler
634 } // namespace internal 637 } // namespace internal
635 } // namespace v8 638 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698