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/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 | 90 |
91 Node* InterpreterAssembler::RegisterFrameOffset(Node* index) { | 91 Node* InterpreterAssembler::RegisterFrameOffset(Node* index) { |
92 return raw_assembler_->IntPtrSub( | 92 return raw_assembler_->IntPtrSub( |
93 Int32Constant(kFirstRegisterOffsetFromFp), | 93 Int32Constant(kFirstRegisterOffsetFromFp), |
94 raw_assembler_->WordShl(index, Int32Constant(kPointerSizeLog2))); | 94 raw_assembler_->WordShl(index, Int32Constant(kPointerSizeLog2))); |
95 } | 95 } |
96 | 96 |
97 | 97 |
98 Node* InterpreterAssembler::BytecodeArg(int delta) { | 98 Node* InterpreterAssembler::BytecodeOperand(int delta) { |
99 DCHECK_LT(delta, interpreter::Bytecodes::NumberOfArguments(bytecode_)); | 99 DCHECK_LT(delta, interpreter::Bytecodes::NumberOfOperands(bytecode_)); |
100 return raw_assembler_->Load( | 100 return raw_assembler_->Load( |
101 kMachUint8, BytecodeArrayPointer(), | 101 kMachUint8, BytecodeArrayPointer(), |
102 raw_assembler_->IntPtrAdd(BytecodeOffset(), Int32Constant(1 + delta))); | 102 raw_assembler_->IntPtrAdd(BytecodeOffset(), Int32Constant(1 + delta))); |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 Node* InterpreterAssembler::LoadRegister(int index) { | 106 Node* InterpreterAssembler::LoadRegister(int index) { |
107 return raw_assembler_->Load(kMachPtr, FramePointer(), | 107 return raw_assembler_->Load(kMachPtr, FramePointer(), |
108 RegisterFrameOffset(index)); | 108 RegisterFrameOffset(index)); |
109 } | 109 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 | 229 |
230 Node* InterpreterAssembler::HeapConstant(Unique<HeapObject> object) { | 230 Node* InterpreterAssembler::HeapConstant(Unique<HeapObject> object) { |
231 return raw_assembler_->HeapConstant(object); | 231 return raw_assembler_->HeapConstant(object); |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 } // namespace interpreter | 235 } // namespace interpreter |
236 } // namespace internal | 236 } // namespace internal |
237 } // namespace v8 | 237 } // namespace v8 |
OLD | NEW |