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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { | 662 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { |
663 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 663 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
664 InterpreterAssemblerForTest m(this, bytecode); | 664 InterpreterAssemblerForTest m(this, bytecode); |
665 Node* feedback_vector = m.LoadTypeFeedbackVector(); | 665 Node* feedback_vector = m.LoadTypeFeedbackVector(); |
666 | 666 |
667 Matcher<Node*> load_function_matcher = | 667 Matcher<Node*> load_function_matcher = |
668 m.IsLoad(MachineType::AnyTagged(), | 668 m.IsLoad(MachineType::AnyTagged(), |
669 IsParameter(Linkage::kInterpreterRegisterFileParameter), | 669 IsParameter(Linkage::kInterpreterRegisterFileParameter), |
670 IsIntPtrConstant( | 670 IsIntPtrConstant( |
671 InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 671 InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
672 Matcher<Node*> load_shared_function_info_matcher = | 672 Matcher<Node*> load_literals_matcher = m.IsLoad( |
673 m.IsLoad(MachineType::AnyTagged(), load_function_matcher, | 673 MachineType::AnyTagged(), load_function_matcher, |
674 IsIntPtrConstant(JSFunction::kSharedFunctionInfoOffset - | 674 IsIntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag)); |
675 kHeapObjectTag)); | |
676 | 675 |
677 EXPECT_THAT( | 676 EXPECT_THAT(feedback_vector, |
678 feedback_vector, | 677 m.IsLoad(MachineType::AnyTagged(), load_literals_matcher, |
679 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher, | 678 IsIntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
680 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - | 679 kHeapObjectTag))); |
681 kHeapObjectTag))); | |
682 } | 680 } |
683 } | 681 } |
684 | 682 |
685 } // namespace compiler | 683 } // namespace compiler |
686 } // namespace internal | 684 } // namespace internal |
687 } // namespace v8 | 685 } // namespace v8 |
OLD | NEW |