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.h" | 10 #include "src/types.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { | 224 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { |
225 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || | 225 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || |
226 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || | 226 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || |
227 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); | 227 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); |
228 return OpParameter<CompareOperationHints::Hint>(op); | 228 return OpParameter<CompareOperationHints::Hint>(op); |
229 } | 229 } |
230 | 230 |
231 #define PURE_OP_LIST(V) \ | 231 #define PURE_OP_LIST(V) \ |
232 V(BooleanNot, Operator::kNoProperties, 1) \ | 232 V(BooleanNot, Operator::kNoProperties, 1) \ |
233 V(BooleanToNumber, Operator::kNoProperties, 1) \ | |
234 V(NumberEqual, Operator::kCommutative, 2) \ | 233 V(NumberEqual, Operator::kCommutative, 2) \ |
235 V(NumberLessThan, Operator::kNoProperties, 2) \ | 234 V(NumberLessThan, Operator::kNoProperties, 2) \ |
236 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \ | 235 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \ |
237 V(NumberAdd, Operator::kCommutative, 2) \ | 236 V(NumberAdd, Operator::kCommutative, 2) \ |
238 V(NumberSubtract, Operator::kNoProperties, 2) \ | 237 V(NumberSubtract, Operator::kNoProperties, 2) \ |
239 V(NumberMultiply, Operator::kCommutative, 2) \ | 238 V(NumberMultiply, Operator::kCommutative, 2) \ |
240 V(NumberDivide, Operator::kNoProperties, 2) \ | 239 V(NumberDivide, Operator::kNoProperties, 2) \ |
241 V(NumberModulus, Operator::kNoProperties, 2) \ | 240 V(NumberModulus, Operator::kNoProperties, 2) \ |
242 V(NumberBitwiseOr, Operator::kCommutative, 2) \ | 241 V(NumberBitwiseOr, Operator::kCommutative, 2) \ |
243 V(NumberBitwiseXor, Operator::kCommutative, 2) \ | 242 V(NumberBitwiseXor, Operator::kCommutative, 2) \ |
(...skipping 29 matching lines...) Expand all Loading... |
273 V(NumberSin, Operator::kNoProperties, 1) \ | 272 V(NumberSin, Operator::kNoProperties, 1) \ |
274 V(NumberSinh, Operator::kNoProperties, 1) \ | 273 V(NumberSinh, Operator::kNoProperties, 1) \ |
275 V(NumberSqrt, Operator::kNoProperties, 1) \ | 274 V(NumberSqrt, Operator::kNoProperties, 1) \ |
276 V(NumberTan, Operator::kNoProperties, 1) \ | 275 V(NumberTan, Operator::kNoProperties, 1) \ |
277 V(NumberTanh, Operator::kNoProperties, 1) \ | 276 V(NumberTanh, Operator::kNoProperties, 1) \ |
278 V(NumberTrunc, Operator::kNoProperties, 1) \ | 277 V(NumberTrunc, Operator::kNoProperties, 1) \ |
279 V(NumberToInt32, Operator::kNoProperties, 1) \ | 278 V(NumberToInt32, Operator::kNoProperties, 1) \ |
280 V(NumberToUint32, Operator::kNoProperties, 1) \ | 279 V(NumberToUint32, Operator::kNoProperties, 1) \ |
281 V(NumberSilenceNaN, Operator::kNoProperties, 1) \ | 280 V(NumberSilenceNaN, Operator::kNoProperties, 1) \ |
282 V(StringFromCharCode, Operator::kNoProperties, 1) \ | 281 V(StringFromCharCode, Operator::kNoProperties, 1) \ |
283 V(StringToNumber, Operator::kNoProperties, 1) \ | |
284 V(PlainPrimitiveToNumber, Operator::kNoProperties, 1) \ | 282 V(PlainPrimitiveToNumber, Operator::kNoProperties, 1) \ |
285 V(PlainPrimitiveToWord32, Operator::kNoProperties, 1) \ | 283 V(PlainPrimitiveToWord32, Operator::kNoProperties, 1) \ |
286 V(PlainPrimitiveToFloat64, Operator::kNoProperties, 1) \ | 284 V(PlainPrimitiveToFloat64, Operator::kNoProperties, 1) \ |
287 V(ChangeTaggedSignedToInt32, Operator::kNoProperties, 1) \ | 285 V(ChangeTaggedSignedToInt32, Operator::kNoProperties, 1) \ |
288 V(ChangeTaggedToInt32, Operator::kNoProperties, 1) \ | 286 V(ChangeTaggedToInt32, Operator::kNoProperties, 1) \ |
289 V(ChangeTaggedToUint32, Operator::kNoProperties, 1) \ | 287 V(ChangeTaggedToUint32, Operator::kNoProperties, 1) \ |
290 V(ChangeTaggedToFloat64, Operator::kNoProperties, 1) \ | 288 V(ChangeTaggedToFloat64, Operator::kNoProperties, 1) \ |
291 V(ChangeInt31ToTaggedSigned, Operator::kNoProperties, 1) \ | 289 V(ChangeInt31ToTaggedSigned, Operator::kNoProperties, 1) \ |
292 V(ChangeInt32ToTagged, Operator::kNoProperties, 1) \ | 290 V(ChangeInt32ToTagged, Operator::kNoProperties, 1) \ |
293 V(ChangeUint32ToTagged, Operator::kNoProperties, 1) \ | 291 V(ChangeUint32ToTagged, Operator::kNoProperties, 1) \ |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 Operator::kNoDeopt | Operator::kNoThrow | properties, \ | 542 Operator::kNoDeopt | Operator::kNoThrow | properties, \ |
545 #Name, value_input_count, 1, control_input_count, \ | 543 #Name, value_input_count, 1, control_input_count, \ |
546 output_count, 1, 0, access); \ | 544 output_count, 1, 0, access); \ |
547 } | 545 } |
548 ACCESS_OP_LIST(ACCESS) | 546 ACCESS_OP_LIST(ACCESS) |
549 #undef ACCESS | 547 #undef ACCESS |
550 | 548 |
551 } // namespace compiler | 549 } // namespace compiler |
552 } // namespace internal | 550 } // namespace internal |
553 } // namespace v8 | 551 } // namespace v8 |
OLD | NEW |