| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 Matcher<Node*> IsWordOr(const Matcher<Node*>& lhs_matcher, | 62 Matcher<Node*> IsWordOr(const Matcher<Node*>& lhs_matcher, |
| 63 const Matcher<Node*>& rhs_matcher) { | 63 const Matcher<Node*>& rhs_matcher) { |
| 64 return kPointerSize == 8 ? IsWord64Or(lhs_matcher, rhs_matcher) | 64 return kPointerSize == 8 ? IsWord64Or(lhs_matcher, rhs_matcher) |
| 65 : IsWord32Or(lhs_matcher, rhs_matcher); | 65 : IsWord32Or(lhs_matcher, rhs_matcher); |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsLoad( | 69 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsLoad( |
| 70 const Matcher<LoadRepresentation>& rep_matcher, | 70 const Matcher<LoadRepresentation>& rep_matcher, |
| 71 const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher) { | 71 const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher) { |
| 72 return ::i::compiler::IsLoad(rep_matcher, base_matcher, index_matcher, | 72 return ::i::compiler::IsLoad(rep_matcher, base_matcher, index_matcher, _, _); |
| 73 graph()->start(), graph()->start()); | |
| 74 } | 73 } |
| 75 | 74 |
| 76 | 75 |
| 77 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore( | 76 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore( |
| 78 const Matcher<StoreRepresentation>& rep_matcher, | 77 const Matcher<StoreRepresentation>& rep_matcher, |
| 79 const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher, | 78 const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher, |
| 80 const Matcher<Node*>& value_matcher) { | 79 const Matcher<Node*>& value_matcher) { |
| 81 return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher, | 80 return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher, |
| 82 value_matcher, graph()->start(), | 81 value_matcher, _, _); |
| 83 graph()->start()); | |
| 84 } | 82 } |
| 85 | 83 |
| 86 | 84 |
| 87 Matcher<Node*> | 85 Matcher<Node*> |
| 88 InterpreterAssemblerTest::InterpreterAssemblerForTest::IsBytecodeOperand( | 86 InterpreterAssemblerTest::InterpreterAssemblerForTest::IsBytecodeOperand( |
| 89 int offset) { | 87 int offset) { |
| 90 return IsLoad( | 88 return IsLoad( |
| 91 kMachUint8, IsParameter(Linkage::kInterpreterBytecodeArrayParameter), | 89 kMachUint8, IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
| 92 IsIntPtrAdd(IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), | 90 IsIntPtrAdd(IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), |
| 93 IsInt32Constant(offset))); | 91 IsInt32Constant(offset))); |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 feedback_vector, | 614 feedback_vector, |
| 617 m.IsLoad(kMachAnyTagged, load_shared_function_info_matcher, | 615 m.IsLoad(kMachAnyTagged, load_shared_function_info_matcher, |
| 618 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - | 616 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
| 619 kHeapObjectTag))); | 617 kHeapObjectTag))); |
| 620 } | 618 } |
| 621 } | 619 } |
| 622 | 620 |
| 623 } // namespace compiler | 621 } // namespace compiler |
| 624 } // namespace internal | 622 } // namespace internal |
| 625 } // namespace v8 | 623 } // namespace v8 |
| OLD | NEW |