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_COMPILER_GRAPH_UNITTEST_H_ | 5 #ifndef V8_COMPILER_GRAPH_UNITTEST_H_ |
6 #define V8_COMPILER_GRAPH_UNITTEST_H_ | 6 #define V8_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 13 matching lines...) Expand all Loading... |
24 using ::testing::Matcher; | 24 using ::testing::Matcher; |
25 | 25 |
26 | 26 |
27 class GraphTest : public TestWithContext, public TestWithZone { | 27 class GraphTest : public TestWithContext, public TestWithZone { |
28 public: | 28 public: |
29 explicit GraphTest(int parameters = 1); | 29 explicit GraphTest(int parameters = 1); |
30 virtual ~GraphTest(); | 30 virtual ~GraphTest(); |
31 | 31 |
32 protected: | 32 protected: |
33 Node* Parameter(int32_t index); | 33 Node* Parameter(int32_t index); |
34 Node* Float64Constant(double value); | 34 Node* Float32Constant(volatile float value); |
| 35 Node* Float64Constant(volatile double value); |
35 Node* Int32Constant(int32_t value); | 36 Node* Int32Constant(int32_t value); |
36 Node* Int64Constant(int64_t value); | 37 Node* Int64Constant(int64_t value); |
37 Node* NumberConstant(double value); | 38 Node* NumberConstant(volatile double value); |
38 Node* HeapConstant(const Unique<HeapObject>& value); | 39 Node* HeapConstant(const Unique<HeapObject>& value); |
39 Node* FalseConstant(); | 40 Node* FalseConstant(); |
40 Node* TrueConstant(); | 41 Node* TrueConstant(); |
41 | 42 |
42 Matcher<Node*> IsFalseConstant(); | 43 Matcher<Node*> IsFalseConstant(); |
43 Matcher<Node*> IsTrueConstant(); | 44 Matcher<Node*> IsTrueConstant(); |
44 | 45 |
45 CommonOperatorBuilder* common() { return &common_; } | 46 CommonOperatorBuilder* common() { return &common_; } |
46 Graph* graph() { return &graph_; } | 47 Graph* graph() { return &graph_; } |
47 | 48 |
(...skipping 10 matching lines...) Expand all Loading... |
58 Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher); | 59 Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher); |
59 Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher); | 60 Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher); |
60 Matcher<Node*> IsControlEffect(const Matcher<Node*>& control_matcher); | 61 Matcher<Node*> IsControlEffect(const Matcher<Node*>& control_matcher); |
61 Matcher<Node*> IsValueEffect(const Matcher<Node*>& value_matcher); | 62 Matcher<Node*> IsValueEffect(const Matcher<Node*>& value_matcher); |
62 Matcher<Node*> IsFinish(const Matcher<Node*>& value_matcher, | 63 Matcher<Node*> IsFinish(const Matcher<Node*>& value_matcher, |
63 const Matcher<Node*>& effect_matcher); | 64 const Matcher<Node*>& effect_matcher); |
64 Matcher<Node*> IsExternalConstant( | 65 Matcher<Node*> IsExternalConstant( |
65 const Matcher<ExternalReference>& value_matcher); | 66 const Matcher<ExternalReference>& value_matcher); |
66 Matcher<Node*> IsHeapConstant( | 67 Matcher<Node*> IsHeapConstant( |
67 const Matcher<Unique<HeapObject> >& value_matcher); | 68 const Matcher<Unique<HeapObject> >& value_matcher); |
| 69 Matcher<Node*> IsFloat32Constant(const Matcher<float>& value_matcher); |
68 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher); | 70 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher); |
69 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher); | 71 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher); |
70 Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher); | 72 Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher); |
71 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher); | 73 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher); |
72 Matcher<Node*> IsPhi(const Matcher<MachineType>& type_matcher, | 74 Matcher<Node*> IsPhi(const Matcher<MachineType>& type_matcher, |
73 const Matcher<Node*>& value0_matcher, | 75 const Matcher<Node*>& value0_matcher, |
74 const Matcher<Node*>& value1_matcher, | 76 const Matcher<Node*>& value1_matcher, |
75 const Matcher<Node*>& merge_matcher); | 77 const Matcher<Node*>& merge_matcher); |
76 Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher, | 78 Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher, |
77 const Matcher<Node*>& base_matcher); | 79 const Matcher<Node*>& base_matcher); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); | 125 Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); |
124 Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); | 126 Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); |
125 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); | 127 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); |
126 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); | 128 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); |
127 | 129 |
128 } // namespace compiler | 130 } // namespace compiler |
129 } // namespace internal | 131 } // namespace internal |
130 } // namespace v8 | 132 } // namespace v8 |
131 | 133 |
132 #endif // V8_COMPILER_GRAPH_UNITTEST_H_ | 134 #endif // V8_COMPILER_GRAPH_UNITTEST_H_ |
OLD | NEW |