| 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 "test/unittests/compiler/interpreter-assembler-unittest.h" | 5 #include "test/unittests/compiler/interpreter-assembler-unittest.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
| 9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
| 10 #include "src/interface-descriptors.h" | 10 #include "src/interface-descriptors.h" |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { | 680 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { |
| 681 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 681 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
| 682 InterpreterAssemblerForTest m(this, bytecode); | 682 InterpreterAssemblerForTest m(this, bytecode); |
| 683 Node* feedback_vector = m.LoadTypeFeedbackVector(); | 683 Node* feedback_vector = m.LoadTypeFeedbackVector(); |
| 684 | 684 |
| 685 Matcher<Node*> load_function_matcher = | 685 Matcher<Node*> load_function_matcher = |
| 686 m.IsLoad(MachineType::AnyTagged(), | 686 m.IsLoad(MachineType::AnyTagged(), |
| 687 IsParameter(Linkage::kInterpreterRegisterFileParameter), | 687 IsParameter(Linkage::kInterpreterRegisterFileParameter), |
| 688 IsIntPtrConstant( | 688 IsIntPtrConstant( |
| 689 InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 689 InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
| 690 Matcher<Node*> load_literals_matcher = m.IsLoad( | 690 Matcher<Node*> load_shared_function_info_matcher = |
| 691 MachineType::AnyTagged(), load_function_matcher, | 691 m.IsLoad(MachineType::AnyTagged(), load_function_matcher, |
| 692 IsIntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag)); | 692 IsIntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
| 693 kHeapObjectTag)); |
| 693 | 694 |
| 694 EXPECT_THAT(feedback_vector, | 695 EXPECT_THAT( |
| 695 m.IsLoad(MachineType::AnyTagged(), load_literals_matcher, | 696 feedback_vector, |
| 696 IsIntPtrConstant(LiteralsArray::kFeedbackVectorOffset - | 697 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher, |
| 697 kHeapObjectTag))); | 698 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
| 699 kHeapObjectTag))); |
| 698 } | 700 } |
| 699 } | 701 } |
| 700 | 702 |
| 701 } // namespace compiler | 703 } // namespace compiler |
| 702 } // namespace internal | 704 } // namespace internal |
| 703 } // namespace v8 | 705 } // namespace v8 |
| OLD | NEW |