OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/simplified-operator.h" | 5 #include "src/compiler/simplified-operator.h" |
6 | 6 |
7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/types-inl.h" | 10 #include "src/types-inl.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 static bool Equals(const ElementAccess& lhs, const ElementAccess& rhs) { | 58 static bool Equals(const ElementAccess& lhs, const ElementAccess& rhs) { |
59 return lhs.base_is_tagged == rhs.base_is_tagged && | 59 return lhs.base_is_tagged == rhs.base_is_tagged && |
60 lhs.header_size == rhs.header_size && | 60 lhs.header_size == rhs.header_size && |
61 lhs.machine_type == rhs.machine_type && lhs.type->Is(rhs.type); | 61 lhs.machine_type == rhs.machine_type && lhs.type->Is(rhs.type); |
62 } | 62 } |
63 }; | 63 }; |
64 | 64 |
65 | 65 |
66 #define PURE_OP_LIST(V) \ | 66 #define PURE_OP_LIST(V) \ |
67 V(BooleanNot, Operator::kNoProperties, 1) \ | 67 V(BooleanNot, Operator::kNoProperties, 1) \ |
| 68 V(BooleanToNumber, Operator::kNoProperties, 1) \ |
68 V(NumberEqual, Operator::kCommutative, 2) \ | 69 V(NumberEqual, Operator::kCommutative, 2) \ |
69 V(NumberLessThan, Operator::kNoProperties, 2) \ | 70 V(NumberLessThan, Operator::kNoProperties, 2) \ |
70 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \ | 71 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \ |
71 V(NumberAdd, Operator::kCommutative, 2) \ | 72 V(NumberAdd, Operator::kCommutative, 2) \ |
72 V(NumberSubtract, Operator::kNoProperties, 2) \ | 73 V(NumberSubtract, Operator::kNoProperties, 2) \ |
73 V(NumberMultiply, Operator::kCommutative, 2) \ | 74 V(NumberMultiply, Operator::kCommutative, 2) \ |
74 V(NumberDivide, Operator::kNoProperties, 2) \ | 75 V(NumberDivide, Operator::kNoProperties, 2) \ |
75 V(NumberModulus, Operator::kNoProperties, 2) \ | 76 V(NumberModulus, Operator::kNoProperties, 2) \ |
76 V(NumberToInt32, Operator::kNoProperties, 1) \ | 77 V(NumberToInt32, Operator::kNoProperties, 1) \ |
77 V(NumberToUint32, Operator::kNoProperties, 1) \ | 78 V(NumberToUint32, Operator::kNoProperties, 1) \ |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 return new (zone()) \ | 137 return new (zone()) \ |
137 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ | 138 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ |
138 input_count, output_count, #Name, access); \ | 139 input_count, output_count, #Name, access); \ |
139 } | 140 } |
140 ACCESS_OP_LIST(ACCESS) | 141 ACCESS_OP_LIST(ACCESS) |
141 #undef ACCESS | 142 #undef ACCESS |
142 | 143 |
143 } // namespace compiler | 144 } // namespace compiler |
144 } // namespace internal | 145 } // namespace internal |
145 } // namespace v8 | 146 } // namespace v8 |
OLD | NEW |