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 #include "src/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/compiler/operator-properties-inl.h" | 9 #include "src/compiler/operator-properties-inl.h" |
10 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 &CommonOperatorBuilder::Name, IrOpcode::k##Name, properties, \ | 44 &CommonOperatorBuilder::Name, IrOpcode::k##Name, properties, \ |
45 value_input_count, effect_input_count, control_input_count, \ | 45 value_input_count, effect_input_count, control_input_count, \ |
46 effect_output_count, control_output_count \ | 46 effect_output_count, control_output_count \ |
47 } | 47 } |
48 SHARED(Dead, Operator::kFoldable, 0, 0, 0, 0, 1), | 48 SHARED(Dead, Operator::kFoldable, 0, 0, 0, 0, 1), |
49 SHARED(End, Operator::kFoldable, 0, 0, 1, 0, 0), | 49 SHARED(End, Operator::kFoldable, 0, 0, 1, 0, 0), |
50 SHARED(Branch, Operator::kFoldable, 1, 0, 1, 0, 2), | 50 SHARED(Branch, Operator::kFoldable, 1, 0, 1, 0, 2), |
51 SHARED(IfTrue, Operator::kFoldable, 0, 0, 1, 0, 1), | 51 SHARED(IfTrue, Operator::kFoldable, 0, 0, 1, 0, 1), |
52 SHARED(IfFalse, Operator::kFoldable, 0, 0, 1, 0, 1), | 52 SHARED(IfFalse, Operator::kFoldable, 0, 0, 1, 0, 1), |
53 SHARED(Throw, Operator::kFoldable, 1, 0, 1, 0, 1), | 53 SHARED(Throw, Operator::kFoldable, 1, 0, 1, 0, 1), |
54 SHARED(Return, Operator::kNoProperties, 1, 1, 1, 1, 1), | 54 SHARED(Return, Operator::kNoProperties, 1, 1, 1, 1, 1) |
55 SHARED(ControlEffect, Operator::kPure, 0, 0, 1, 1, 0) | |
56 #undef SHARED | 55 #undef SHARED |
57 }; | 56 }; |
58 | 57 |
59 | 58 |
60 class CommonSharedOperatorTest | 59 class CommonSharedOperatorTest |
61 : public TestWithZone, | 60 : public TestWithZone, |
62 public ::testing::WithParamInterface<SharedOperator> {}; | 61 public ::testing::WithParamInterface<SharedOperator> {}; |
63 | 62 |
64 } // namespace | 63 } // namespace |
65 | 64 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); | 173 EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); |
175 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); | 174 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
176 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); | 175 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
177 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); | 176 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
178 } | 177 } |
179 } | 178 } |
180 | 179 |
181 } // namespace compiler | 180 } // namespace compiler |
182 } // namespace internal | 181 } // namespace internal |
183 } // namespace v8 | 182 } // namespace v8 |
OLD | NEW |