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/opcodes.h" | 5 #include "src/compiler/opcodes.h" |
6 #include "src/compiler/operator.h" | 6 #include "src/compiler/operator.h" |
7 #include "src/compiler/operator-properties.h" | 7 #include "src/compiler/operator-properties.h" |
8 #include "src/compiler/simplified-operator.h" | 8 #include "src/compiler/simplified-operator.h" |
9 #include "src/types-inl.h" | 9 #include "src/types-inl.h" |
10 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 return os << IrOpcode::Mnemonic(pop.opcode); | 31 return os << IrOpcode::Mnemonic(pop.opcode); |
32 } | 32 } |
33 | 33 |
34 | 34 |
35 const PureOperator kPureOperators[] = { | 35 const PureOperator kPureOperators[] = { |
36 #define PURE(Name, properties, input_count) \ | 36 #define PURE(Name, properties, input_count) \ |
37 { \ | 37 { \ |
38 &SimplifiedOperatorBuilder::Name, IrOpcode::k##Name, \ | 38 &SimplifiedOperatorBuilder::Name, IrOpcode::k##Name, \ |
39 Operator::kPure | properties, input_count \ | 39 Operator::kPure | properties, input_count \ |
40 } | 40 } |
| 41 PURE(AnyToBoolean, Operator::kNoProperties, 1), |
41 PURE(BooleanNot, Operator::kNoProperties, 1), | 42 PURE(BooleanNot, Operator::kNoProperties, 1), |
42 PURE(BooleanToNumber, Operator::kNoProperties, 1), | 43 PURE(BooleanToNumber, Operator::kNoProperties, 1), |
43 PURE(NumberEqual, Operator::kCommutative, 2), | 44 PURE(NumberEqual, Operator::kCommutative, 2), |
44 PURE(NumberLessThan, Operator::kNoProperties, 2), | 45 PURE(NumberLessThan, Operator::kNoProperties, 2), |
45 PURE(NumberLessThanOrEqual, Operator::kNoProperties, 2), | 46 PURE(NumberLessThanOrEqual, Operator::kNoProperties, 2), |
46 PURE(NumberAdd, Operator::kCommutative, 2), | 47 PURE(NumberAdd, Operator::kCommutative, 2), |
47 PURE(NumberSubtract, Operator::kNoProperties, 2), | 48 PURE(NumberSubtract, Operator::kNoProperties, 2), |
48 PURE(NumberMultiply, Operator::kCommutative, 2), | 49 PURE(NumberMultiply, Operator::kCommutative, 2), |
49 PURE(NumberDivide, Operator::kNoProperties, 2), | 50 PURE(NumberDivide, Operator::kNoProperties, 2), |
50 PURE(NumberModulus, Operator::kNoProperties, 2), | 51 PURE(NumberModulus, Operator::kNoProperties, 2), |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 279 } |
279 | 280 |
280 | 281 |
281 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, | 282 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, |
282 SimplifiedElementAccessOperatorTest, | 283 SimplifiedElementAccessOperatorTest, |
283 ::testing::ValuesIn(kElementAccesses)); | 284 ::testing::ValuesIn(kElementAccesses)); |
284 | 285 |
285 } // namespace compiler | 286 } // namespace compiler |
286 } // namespace internal | 287 } // namespace internal |
287 } // namespace v8 | 288 } // namespace v8 |
OLD | NEW |