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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 268 } |
269 | 269 |
270 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) { | 270 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) { |
271 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberAdd || | 271 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberAdd || |
272 op->opcode() == IrOpcode::kSpeculativeNumberSubtract || | 272 op->opcode() == IrOpcode::kSpeculativeNumberSubtract || |
273 op->opcode() == IrOpcode::kSpeculativeNumberMultiply || | 273 op->opcode() == IrOpcode::kSpeculativeNumberMultiply || |
274 op->opcode() == IrOpcode::kSpeculativeNumberDivide || | 274 op->opcode() == IrOpcode::kSpeculativeNumberDivide || |
275 op->opcode() == IrOpcode::kSpeculativeNumberModulus || | 275 op->opcode() == IrOpcode::kSpeculativeNumberModulus || |
276 op->opcode() == IrOpcode::kSpeculativeNumberShiftLeft || | 276 op->opcode() == IrOpcode::kSpeculativeNumberShiftLeft || |
277 op->opcode() == IrOpcode::kSpeculativeNumberShiftRight || | 277 op->opcode() == IrOpcode::kSpeculativeNumberShiftRight || |
278 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical); | 278 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical || |
| 279 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseAnd || |
| 280 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseOr || |
| 281 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseXor); |
279 return OpParameter<BinaryOperationHints::Hint>(op); | 282 return OpParameter<BinaryOperationHints::Hint>(op); |
280 } | 283 } |
281 | 284 |
282 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { | 285 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { |
283 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || | 286 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || |
284 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || | 287 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || |
285 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); | 288 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); |
286 return OpParameter<CompareOperationHints::Hint>(op); | 289 return OpParameter<CompareOperationHints::Hint>(op); |
287 } | 290 } |
288 | 291 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 V(ObjectIsCallable, Operator::kNoProperties, 1, 0) \ | 361 V(ObjectIsCallable, Operator::kNoProperties, 1, 0) \ |
359 V(ObjectIsNumber, Operator::kNoProperties, 1, 0) \ | 362 V(ObjectIsNumber, Operator::kNoProperties, 1, 0) \ |
360 V(ObjectIsReceiver, Operator::kNoProperties, 1, 0) \ | 363 V(ObjectIsReceiver, Operator::kNoProperties, 1, 0) \ |
361 V(ObjectIsSmi, Operator::kNoProperties, 1, 0) \ | 364 V(ObjectIsSmi, Operator::kNoProperties, 1, 0) \ |
362 V(ObjectIsString, Operator::kNoProperties, 1, 0) \ | 365 V(ObjectIsString, Operator::kNoProperties, 1, 0) \ |
363 V(ObjectIsUndetectable, Operator::kNoProperties, 1, 0) \ | 366 V(ObjectIsUndetectable, Operator::kNoProperties, 1, 0) \ |
364 V(StringEqual, Operator::kCommutative, 2, 0) \ | 367 V(StringEqual, Operator::kCommutative, 2, 0) \ |
365 V(StringLessThan, Operator::kNoProperties, 2, 0) \ | 368 V(StringLessThan, Operator::kNoProperties, 2, 0) \ |
366 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) | 369 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) |
367 | 370 |
368 #define SPECULATIVE_BINOP_LIST(V) \ | 371 #define SPECULATIVE_BINOP_LIST(V) \ |
369 V(SpeculativeNumberAdd) \ | 372 V(SpeculativeNumberAdd) \ |
370 V(SpeculativeNumberSubtract) \ | 373 V(SpeculativeNumberSubtract) \ |
371 V(SpeculativeNumberDivide) \ | 374 V(SpeculativeNumberDivide) \ |
372 V(SpeculativeNumberMultiply) \ | 375 V(SpeculativeNumberMultiply) \ |
373 V(SpeculativeNumberModulus) \ | 376 V(SpeculativeNumberModulus) \ |
374 V(SpeculativeNumberShiftLeft) \ | 377 V(SpeculativeNumberShiftLeft) \ |
375 V(SpeculativeNumberShiftRight) \ | 378 V(SpeculativeNumberShiftRight) \ |
376 V(SpeculativeNumberShiftRightLogical) | 379 V(SpeculativeNumberShiftRightLogical) \ |
| 380 V(SpeculativeNumberBitwiseAnd) \ |
| 381 V(SpeculativeNumberBitwiseOr) \ |
| 382 V(SpeculativeNumberBitwiseXor) |
377 | 383 |
378 #define CHECKED_OP_LIST(V) \ | 384 #define CHECKED_OP_LIST(V) \ |
379 V(CheckBounds, 2, 1) \ | 385 V(CheckBounds, 2, 1) \ |
380 V(CheckIf, 1, 0) \ | 386 V(CheckIf, 1, 0) \ |
381 V(CheckNumber, 1, 1) \ | 387 V(CheckNumber, 1, 1) \ |
382 V(CheckString, 1, 1) \ | 388 V(CheckString, 1, 1) \ |
383 V(CheckTaggedPointer, 1, 1) \ | 389 V(CheckTaggedPointer, 1, 1) \ |
384 V(CheckTaggedSigned, 1, 1) \ | 390 V(CheckTaggedSigned, 1, 1) \ |
385 V(CheckedInt32Add, 2, 1) \ | 391 V(CheckedInt32Add, 2, 1) \ |
386 V(CheckedInt32Sub, 2, 1) \ | 392 V(CheckedInt32Sub, 2, 1) \ |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 Operator::kNoDeopt | Operator::kNoThrow | properties, \ | 662 Operator::kNoDeopt | Operator::kNoThrow | properties, \ |
657 #Name, value_input_count, 1, control_input_count, \ | 663 #Name, value_input_count, 1, control_input_count, \ |
658 output_count, 1, 0, access); \ | 664 output_count, 1, 0, access); \ |
659 } | 665 } |
660 ACCESS_OP_LIST(ACCESS) | 666 ACCESS_OP_LIST(ACCESS) |
661 #undef ACCESS | 667 #undef ACCESS |
662 | 668 |
663 } // namespace compiler | 669 } // namespace compiler |
664 } // namespace internal | 670 } // namespace internal |
665 } // namespace v8 | 671 } // namespace v8 |
OLD | NEW |