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/interpreter/interpreter-assembler-unittest.h" | 5 #include "test/unittests/interpreter/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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 | 685 |
686 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { | 686 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { |
687 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 687 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
688 InterpreterAssemblerForTest m(this, bytecode); | 688 InterpreterAssemblerForTest m(this, bytecode); |
689 Node* feedback_vector = m.LoadTypeFeedbackVector(); | 689 Node* feedback_vector = m.LoadTypeFeedbackVector(); |
690 | 690 |
691 Matcher<Node*> load_function_matcher = | 691 Matcher<Node*> load_function_matcher = |
692 m.IsLoad(MachineType::AnyTagged(), IsLoadParentFramePointer(), | 692 m.IsLoad(MachineType::AnyTagged(), IsLoadParentFramePointer(), |
693 IsIntPtrConstant(Register::function_closure().ToOperand() | 693 IsIntPtrConstant(Register::function_closure().ToOperand() |
694 << kPointerSizeLog2)); | 694 << kPointerSizeLog2)); |
695 Matcher<Node*> load_shared_function_info_matcher = | 695 Matcher<Node*> load_literals_matcher = m.IsLoad( |
696 m.IsLoad(MachineType::AnyTagged(), load_function_matcher, | 696 MachineType::AnyTagged(), load_function_matcher, |
697 IsIntPtrConstant(JSFunction::kSharedFunctionInfoOffset - | 697 IsIntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag)); |
698 kHeapObjectTag)); | |
699 | 698 |
700 EXPECT_THAT( | 699 EXPECT_THAT(feedback_vector, |
701 feedback_vector, | 700 m.IsLoad(MachineType::AnyTagged(), load_literals_matcher, |
702 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher, | 701 IsIntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
703 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - | 702 kHeapObjectTag))); |
704 kHeapObjectTag))); | |
705 } | 703 } |
706 } | 704 } |
707 | 705 |
708 } // namespace interpreter | 706 } // namespace interpreter |
709 } // namespace internal | 707 } // namespace internal |
710 } // namespace v8 | 708 } // namespace v8 |
OLD | NEW |