OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_GRAPH_UNITTEST_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ |
6 #define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ | 6 #define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 class GraphTest : public TestWithContext, public TestWithZone { | 34 class GraphTest : public TestWithContext, public TestWithZone { |
35 public: | 35 public: |
36 explicit GraphTest(int parameters = 1); | 36 explicit GraphTest(int parameters = 1); |
37 virtual ~GraphTest(); | 37 virtual ~GraphTest(); |
38 | 38 |
39 protected: | 39 protected: |
40 Node* Parameter(int32_t index); | 40 Node* Parameter(int32_t index); |
41 Node* Float32Constant(volatile float value); | 41 Node* Float32Constant(volatile float value); |
42 Node* Float64Constant(volatile double value); | 42 Node* Float64Constant(volatile double value); |
43 Node* Int32Constant(int32_t value); | 43 Node* Int32Constant(int32_t value); |
| 44 Node* Uint32Constant(uint32_t value) { |
| 45 return Int32Constant(bit_cast<int32_t>(value)); |
| 46 } |
44 Node* Int64Constant(int64_t value); | 47 Node* Int64Constant(int64_t value); |
45 Node* NumberConstant(volatile double value); | 48 Node* NumberConstant(volatile double value); |
46 Node* HeapConstant(const Handle<HeapObject>& value); | 49 Node* HeapConstant(const Handle<HeapObject>& value); |
47 Node* HeapConstant(const Unique<HeapObject>& value); | 50 Node* HeapConstant(const Unique<HeapObject>& value); |
48 Node* FalseConstant(); | 51 Node* FalseConstant(); |
49 Node* TrueConstant(); | 52 Node* TrueConstant(); |
50 Node* UndefinedConstant(); | 53 Node* UndefinedConstant(); |
51 | 54 |
52 Matcher<Node*> IsFalseConstant(); | 55 Matcher<Node*> IsFalseConstant(); |
53 Matcher<Node*> IsTrueConstant(); | 56 Matcher<Node*> IsTrueConstant(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const Matcher<Node*>& length_matcher, | 115 const Matcher<Node*>& length_matcher, |
113 const Matcher<Node*>& value_matcher, | 116 const Matcher<Node*>& value_matcher, |
114 const Matcher<Node*>& effect_matcher, | 117 const Matcher<Node*>& effect_matcher, |
115 const Matcher<Node*>& control_matcher); | 118 const Matcher<Node*>& control_matcher); |
116 | 119 |
117 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, | 120 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, |
118 const Matcher<Node*>& base_matcher, | 121 const Matcher<Node*>& base_matcher, |
119 const Matcher<Node*>& index_matcher, | 122 const Matcher<Node*>& index_matcher, |
120 const Matcher<Node*>& effect_matcher, | 123 const Matcher<Node*>& effect_matcher, |
121 const Matcher<Node*>& control_matcher); | 124 const Matcher<Node*>& control_matcher); |
122 Matcher<Node*> IsStore(const Matcher<MachineType>& type_matcher, | 125 Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, |
123 const Matcher<WriteBarrierKind>& write_barrier_matcher, | |
124 const Matcher<Node*>& base_matcher, | 126 const Matcher<Node*>& base_matcher, |
125 const Matcher<Node*>& index_matcher, | 127 const Matcher<Node*>& index_matcher, |
126 const Matcher<Node*>& value_matcher, | 128 const Matcher<Node*>& value_matcher, |
127 const Matcher<Node*>& effect_matcher, | 129 const Matcher<Node*>& effect_matcher, |
128 const Matcher<Node*>& control_matcher); | 130 const Matcher<Node*>& control_matcher); |
129 Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher, | 131 Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher, |
130 const Matcher<Node*>& rhs_matcher); | 132 const Matcher<Node*>& rhs_matcher); |
131 Matcher<Node*> IsWord32Sar(const Matcher<Node*>& lhs_matcher, | 133 Matcher<Node*> IsWord32Sar(const Matcher<Node*>& lhs_matcher, |
132 const Matcher<Node*>& rhs_matcher); | 134 const Matcher<Node*>& rhs_matcher); |
133 Matcher<Node*> IsWord32Shl(const Matcher<Node*>& lhs_matcher, | 135 Matcher<Node*> IsWord32Shl(const Matcher<Node*>& lhs_matcher, |
(...skipping 25 matching lines...) Expand all Loading... |
159 Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher); | 161 Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher); |
160 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); | 162 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); |
161 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); | 163 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); |
162 Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher); | 164 Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher); |
163 | 165 |
164 } // namespace compiler | 166 } // namespace compiler |
165 } // namespace internal | 167 } // namespace internal |
166 } // namespace v8 | 168 } // namespace v8 |
167 | 169 |
168 #endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ | 170 #endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ |
OLD | NEW |