OLD | NEW |
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 Loading... |
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( | 128 return raw_assembler_->Store(kMachAnyTagged, RegisterFileRawPointer(), |
129 StoreRepresentation(kMachAnyTagged, kNoWriteBarrier), | 129 RegisterFrameOffset(reg_index), value, |
130 RegisterFileRawPointer(), RegisterFrameOffset(reg_index), value); | 130 kNoWriteBarrier); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 Node* InterpreterAssembler::BytecodeOperand(int operand_index) { | 134 Node* InterpreterAssembler::BytecodeOperand(int operand_index) { |
135 DCHECK_LT(operand_index, interpreter::Bytecodes::NumberOfOperands(bytecode_)); | 135 DCHECK_LT(operand_index, interpreter::Bytecodes::NumberOfOperands(bytecode_)); |
136 DCHECK_EQ(interpreter::OperandSize::kByte, | 136 DCHECK_EQ(interpreter::OperandSize::kByte, |
137 interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index)); | 137 interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index)); |
138 return raw_assembler_->Load( | 138 return raw_assembler_->Load( |
139 kMachUint8, BytecodeArrayTaggedPointer(), | 139 kMachUint8, BytecodeArrayTaggedPointer(), |
140 IntPtrAdd(BytecodeOffset(), | 140 IntPtrAdd(BytecodeOffset(), |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); | 310 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); |
311 return raw_assembler_->Load(kMachAnyTagged, context, offset); | 311 return raw_assembler_->Load(kMachAnyTagged, context, offset); |
312 } | 312 } |
313 | 313 |
314 | 314 |
315 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, | 315 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, |
316 Node* value) { | 316 Node* value) { |
317 Node* offset = | 317 Node* offset = |
318 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), | 318 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), |
319 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); | 319 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); |
320 return raw_assembler_->Store( | 320 return raw_assembler_->Store(kMachAnyTagged, context, offset, value, |
321 StoreRepresentation(kMachAnyTagged, kFullWriteBarrier), context, offset, | 321 kFullWriteBarrier); |
322 value); | |
323 } | 322 } |
324 | 323 |
325 | 324 |
326 Node* InterpreterAssembler::LoadTypeFeedbackVector() { | 325 Node* InterpreterAssembler::LoadTypeFeedbackVector() { |
327 Node* function = raw_assembler_->Load( | 326 Node* function = raw_assembler_->Load( |
328 kMachAnyTagged, RegisterFileRawPointer(), | 327 kMachAnyTagged, RegisterFileRawPointer(), |
329 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 328 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
330 Node* shared_info = | 329 Node* shared_info = |
331 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); | 330 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); |
332 Node* vector = | 331 Node* vector = |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 return raw_assembler_->schedule(); | 628 return raw_assembler_->schedule(); |
630 } | 629 } |
631 | 630 |
632 | 631 |
633 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 632 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
634 | 633 |
635 | 634 |
636 } // namespace compiler | 635 } // namespace compiler |
637 } // namespace internal | 636 } // namespace internal |
638 } // namespace v8 | 637 } // namespace v8 |
OLD | NEW |