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 #ifndef V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ |
6 #define V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ | 6 #define V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ |
7 | 7 |
8 #include "src/compiler/interpreter-assembler.h" | 8 #include "src/compiler/interpreter-assembler.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 InterpreterAssemblerTest() {} | 22 InterpreterAssemblerTest() {} |
23 ~InterpreterAssemblerTest() override {} | 23 ~InterpreterAssemblerTest() override {} |
24 | 24 |
25 class InterpreterAssemblerForTest final : public InterpreterAssembler { | 25 class InterpreterAssemblerForTest final : public InterpreterAssembler { |
26 public: | 26 public: |
27 InterpreterAssemblerForTest(InterpreterAssemblerTest* test, | 27 InterpreterAssemblerForTest(InterpreterAssemblerTest* test, |
28 interpreter::Bytecode bytecode) | 28 interpreter::Bytecode bytecode) |
29 : InterpreterAssembler(test->isolate(), test->zone(), bytecode) {} | 29 : InterpreterAssembler(test->isolate(), test->zone(), bytecode) {} |
30 ~InterpreterAssemblerForTest() override {} | 30 ~InterpreterAssemblerForTest() override {} |
31 | 31 |
32 Graph* GetCompletedGraph(); | |
33 | |
34 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, | 32 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, |
35 const Matcher<Node*>& base_matcher, | 33 const Matcher<Node*>& base_matcher, |
36 const Matcher<Node*>& index_matcher); | 34 const Matcher<Node*>& index_matcher); |
37 Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, | 35 Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, |
38 const Matcher<Node*>& base_matcher, | 36 const Matcher<Node*>& base_matcher, |
39 const Matcher<Node*>& index_matcher, | 37 const Matcher<Node*>& index_matcher, |
40 const Matcher<Node*>& value_matcher); | 38 const Matcher<Node*>& value_matcher); |
41 template <class... A> | 39 template <class... A> |
42 Matcher<Node*> IsCall( | 40 Matcher<Node*> IsCall( |
43 const Matcher<const CallDescriptor*>& descriptor_matcher, | 41 const Matcher<const CallDescriptor*>& descriptor_matcher, |
44 A... args); | 42 A... args); |
45 | 43 |
46 Matcher<Node*> IsBytecodeOperand(int offset); | 44 Matcher<Node*> IsBytecodeOperand(int offset); |
47 Matcher<Node*> IsBytecodeOperandSignExtended(int offset); | 45 Matcher<Node*> IsBytecodeOperandSignExtended(int offset); |
48 Matcher<Node*> IsBytecodeOperandShort(int offset); | 46 Matcher<Node*> IsBytecodeOperandShort(int offset); |
49 | 47 |
50 using InterpreterAssembler::call_descriptor; | 48 using InterpreterAssembler::call_descriptor; |
51 using InterpreterAssembler::graph; | 49 using InterpreterAssembler::graph; |
52 | 50 |
53 private: | 51 private: |
54 DISALLOW_COPY_AND_ASSIGN(InterpreterAssemblerForTest); | 52 DISALLOW_COPY_AND_ASSIGN(InterpreterAssemblerForTest); |
55 }; | 53 }; |
56 }; | 54 }; |
57 | 55 |
58 } // namespace compiler | 56 } // namespace compiler |
59 } // namespace internal | 57 } // namespace internal |
60 } // namespace v8 | 58 } // namespace v8 |
61 | 59 |
62 #endif // V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ | 60 #endif // V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ |
OLD | NEW |