| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { | 285 Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { |
| 286 Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), | 286 Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), |
| 287 BytecodeArray::kConstantPoolOffset); | 287 BytecodeArray::kConstantPoolOffset); |
| 288 Node* entry_offset = | 288 Node* entry_offset = |
| 289 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), | 289 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), |
| 290 WordShl(index, kPointerSizeLog2)); | 290 WordShl(index, kPointerSizeLog2)); |
| 291 return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset); | 291 return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset); |
| 292 } | 292 } |
| 293 | 293 |
| 294 | 294 |
| 295 Node* InterpreterAssembler::LoadFixedArrayElement(Node* fixed_array, |
| 296 int index) { |
| 297 Node* entry_offset = |
| 298 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), |
| 299 WordShl(Int32Constant(index), kPointerSizeLog2)); |
| 300 return raw_assembler_->Load(kMachAnyTagged, fixed_array, entry_offset); |
| 301 } |
| 302 |
| 303 |
| 295 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) { | 304 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) { |
| 296 return raw_assembler_->Load(kMachAnyTagged, object, | 305 return raw_assembler_->Load(kMachAnyTagged, object, |
| 297 IntPtrConstant(offset - kHeapObjectTag)); | 306 IntPtrConstant(offset - kHeapObjectTag)); |
| 298 } | 307 } |
| 299 | 308 |
| 300 | 309 |
| 301 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) { | 310 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) { |
| 302 return raw_assembler_->Load(kMachAnyTagged, context, | 311 return raw_assembler_->Load(kMachAnyTagged, context, |
| 303 IntPtrConstant(Context::SlotOffset(slot_index))); | 312 IntPtrConstant(Context::SlotOffset(slot_index))); |
| 304 } | 313 } |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 return raw_assembler_->schedule(); | 638 return raw_assembler_->schedule(); |
| 630 } | 639 } |
| 631 | 640 |
| 632 | 641 |
| 633 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 642 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
| 634 | 643 |
| 635 | 644 |
| 636 } // namespace compiler | 645 } // namespace compiler |
| 637 } // namespace internal | 646 } // namespace internal |
| 638 } // namespace v8 | 647 } // namespace v8 |
| OLD | NEW |