| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 | 299 |
| 300 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { | 300 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { |
| 301 Node* offset = | 301 Node* offset = |
| 302 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), | 302 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), |
| 303 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); | 303 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); |
| 304 return raw_assembler_->Load(kMachAnyTagged, context, offset); | 304 return raw_assembler_->Load(kMachAnyTagged, context, offset); |
| 305 } | 305 } |
| 306 | 306 |
| 307 | 307 |
| 308 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, |
| 309 Node* value) { |
| 310 Node* offset = |
| 311 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), |
| 312 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); |
| 313 return raw_assembler_->Store(kMachAnyTagged, context, offset, value); |
| 314 } |
| 315 |
| 316 |
| 308 Node* InterpreterAssembler::LoadTypeFeedbackVector() { | 317 Node* InterpreterAssembler::LoadTypeFeedbackVector() { |
| 309 Node* function = raw_assembler_->Load( | 318 Node* function = raw_assembler_->Load( |
| 310 kMachAnyTagged, RegisterFileRawPointer(), | 319 kMachAnyTagged, RegisterFileRawPointer(), |
| 311 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 320 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
| 312 Node* shared_info = | 321 Node* shared_info = |
| 313 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); | 322 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); |
| 314 Node* vector = | 323 Node* vector = |
| 315 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); | 324 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); |
| 316 return vector; | 325 return vector; |
| 317 } | 326 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 return raw_assembler_->schedule(); | 595 return raw_assembler_->schedule(); |
| 587 } | 596 } |
| 588 | 597 |
| 589 | 598 |
| 590 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 599 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
| 591 | 600 |
| 592 | 601 |
| 593 } // namespace compiler | 602 } // namespace compiler |
| 594 } // namespace internal | 603 } // namespace internal |
| 595 } // namespace v8 | 604 } // namespace v8 |
| OLD | NEW |