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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset); | 290 return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset); |
291 } | 291 } |
292 | 292 |
293 | 293 |
294 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) { | 294 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) { |
295 return raw_assembler_->Load(kMachAnyTagged, object, | 295 return raw_assembler_->Load(kMachAnyTagged, object, |
296 IntPtrConstant(offset - kHeapObjectTag)); | 296 IntPtrConstant(offset - kHeapObjectTag)); |
297 } | 297 } |
298 | 298 |
299 | 299 |
| 300 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) { |
| 301 return raw_assembler_->Load(kMachAnyTagged, context, |
| 302 IntPtrConstant(Context::SlotOffset(slot_index))); |
| 303 } |
| 304 |
| 305 |
300 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { | 306 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { |
301 Node* offset = | 307 Node* offset = |
302 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), | 308 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), |
303 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); | 309 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); |
304 return raw_assembler_->Load(kMachAnyTagged, context, offset); | 310 return raw_assembler_->Load(kMachAnyTagged, context, offset); |
305 } | 311 } |
306 | 312 |
307 | 313 |
308 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, | 314 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, |
309 Node* value) { | 315 Node* value) { |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 return raw_assembler_->schedule(); | 626 return raw_assembler_->schedule(); |
621 } | 627 } |
622 | 628 |
623 | 629 |
624 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 630 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
625 | 631 |
626 | 632 |
627 } // namespace compiler | 633 } // namespace compiler |
628 } // namespace internal | 634 } // namespace internal |
629 } // namespace v8 | 635 } // namespace v8 |
OLD | NEW |