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.h" | 9 #include "src/types.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 const PureOperator kPureOperators[] = { | 34 const PureOperator kPureOperators[] = { |
35 #define PURE(Name, properties, input_count) \ | 35 #define PURE(Name, properties, input_count) \ |
36 { \ | 36 { \ |
37 &SimplifiedOperatorBuilder::Name, IrOpcode::k##Name, \ | 37 &SimplifiedOperatorBuilder::Name, IrOpcode::k##Name, \ |
38 Operator::kPure | properties, input_count \ | 38 Operator::kPure | properties, input_count \ |
39 } | 39 } |
40 PURE(BooleanNot, Operator::kNoProperties, 1), | 40 PURE(BooleanNot, Operator::kNoProperties, 1), |
41 PURE(BooleanToNumber, Operator::kNoProperties, 1), | |
42 PURE(NumberEqual, Operator::kCommutative, 2), | 41 PURE(NumberEqual, Operator::kCommutative, 2), |
43 PURE(NumberLessThan, Operator::kNoProperties, 2), | 42 PURE(NumberLessThan, Operator::kNoProperties, 2), |
44 PURE(NumberLessThanOrEqual, Operator::kNoProperties, 2), | 43 PURE(NumberLessThanOrEqual, Operator::kNoProperties, 2), |
45 PURE(NumberAdd, Operator::kCommutative, 2), | 44 PURE(NumberAdd, Operator::kCommutative, 2), |
46 PURE(NumberSubtract, Operator::kNoProperties, 2), | 45 PURE(NumberSubtract, Operator::kNoProperties, 2), |
47 PURE(NumberMultiply, Operator::kCommutative, 2), | 46 PURE(NumberMultiply, Operator::kCommutative, 2), |
48 PURE(NumberDivide, Operator::kNoProperties, 2), | 47 PURE(NumberDivide, Operator::kNoProperties, 2), |
49 PURE(NumberModulus, Operator::kNoProperties, 2), | 48 PURE(NumberModulus, Operator::kNoProperties, 2), |
50 PURE(NumberBitwiseOr, Operator::kCommutative, 2), | 49 PURE(NumberBitwiseOr, Operator::kCommutative, 2), |
51 PURE(NumberBitwiseXor, Operator::kCommutative, 2), | 50 PURE(NumberBitwiseXor, Operator::kCommutative, 2), |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } | 295 } |
297 | 296 |
298 | 297 |
299 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, | 298 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, |
300 SimplifiedElementAccessOperatorTest, | 299 SimplifiedElementAccessOperatorTest, |
301 ::testing::ValuesIn(kElementAccesses)); | 300 ::testing::ValuesIn(kElementAccesses)); |
302 | 301 |
303 } // namespace compiler | 302 } // namespace compiler |
304 } // namespace internal | 303 } // namespace internal |
305 } // namespace v8 | 304 } // namespace v8 |
OLD | NEW |