| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 DCHECK_EQ(IrOpcode::kTransitionElementsKind, op->opcode()); | 260 DCHECK_EQ(IrOpcode::kTransitionElementsKind, op->opcode()); |
| 261 return OpParameter<ElementsTransition>(op); | 261 return OpParameter<ElementsTransition>(op); |
| 262 } | 262 } |
| 263 | 263 |
| 264 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) { | 264 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) { |
| 265 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberAdd || | 265 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberAdd || |
| 266 op->opcode() == IrOpcode::kSpeculativeNumberSubtract || | 266 op->opcode() == IrOpcode::kSpeculativeNumberSubtract || |
| 267 op->opcode() == IrOpcode::kSpeculativeNumberMultiply || | 267 op->opcode() == IrOpcode::kSpeculativeNumberMultiply || |
| 268 op->opcode() == IrOpcode::kSpeculativeNumberDivide || | 268 op->opcode() == IrOpcode::kSpeculativeNumberDivide || |
| 269 op->opcode() == IrOpcode::kSpeculativeNumberModulus || | 269 op->opcode() == IrOpcode::kSpeculativeNumberModulus || |
| 270 op->opcode() == IrOpcode::kSpeculativeNumberShiftLeft); | 270 op->opcode() == IrOpcode::kSpeculativeNumberShiftLeft || |
| 271 op->opcode() == IrOpcode::kSpeculativeNumberShiftRight || |
| 272 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical); |
| 271 return OpParameter<BinaryOperationHints::Hint>(op); | 273 return OpParameter<BinaryOperationHints::Hint>(op); |
| 272 } | 274 } |
| 273 | 275 |
| 274 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { | 276 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { |
| 275 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || | 277 DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || |
| 276 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || | 278 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || |
| 277 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); | 279 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); |
| 278 return OpParameter<CompareOperationHints::Hint>(op); | 280 return OpParameter<CompareOperationHints::Hint>(op); |
| 279 } | 281 } |
| 280 | 282 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 V(StringEqual, Operator::kCommutative, 2, 0) \ | 358 V(StringEqual, Operator::kCommutative, 2, 0) \ |
| 357 V(StringLessThan, Operator::kNoProperties, 2, 0) \ | 359 V(StringLessThan, Operator::kNoProperties, 2, 0) \ |
| 358 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) | 360 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) |
| 359 | 361 |
| 360 #define SPECULATIVE_BINOP_LIST(V) \ | 362 #define SPECULATIVE_BINOP_LIST(V) \ |
| 361 V(SpeculativeNumberAdd) \ | 363 V(SpeculativeNumberAdd) \ |
| 362 V(SpeculativeNumberSubtract) \ | 364 V(SpeculativeNumberSubtract) \ |
| 363 V(SpeculativeNumberDivide) \ | 365 V(SpeculativeNumberDivide) \ |
| 364 V(SpeculativeNumberMultiply) \ | 366 V(SpeculativeNumberMultiply) \ |
| 365 V(SpeculativeNumberModulus) \ | 367 V(SpeculativeNumberModulus) \ |
| 366 V(SpeculativeNumberShiftLeft) | 368 V(SpeculativeNumberShiftLeft) \ |
| 369 V(SpeculativeNumberShiftRight) \ |
| 370 V(SpeculativeNumberShiftRightLogical) |
| 367 | 371 |
| 368 #define CHECKED_OP_LIST(V) \ | 372 #define CHECKED_OP_LIST(V) \ |
| 369 V(CheckBounds, 2, 1) \ | 373 V(CheckBounds, 2, 1) \ |
| 370 V(CheckIf, 1, 0) \ | 374 V(CheckIf, 1, 0) \ |
| 371 V(CheckNumber, 1, 1) \ | 375 V(CheckNumber, 1, 1) \ |
| 372 V(CheckString, 1, 1) \ | 376 V(CheckString, 1, 1) \ |
| 373 V(CheckTaggedPointer, 1, 1) \ | 377 V(CheckTaggedPointer, 1, 1) \ |
| 374 V(CheckTaggedSigned, 1, 1) \ | 378 V(CheckTaggedSigned, 1, 1) \ |
| 375 V(CheckedInt32Add, 2, 1) \ | 379 V(CheckedInt32Add, 2, 1) \ |
| 376 V(CheckedInt32Sub, 2, 1) \ | 380 V(CheckedInt32Sub, 2, 1) \ |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 Operator::kNoDeopt | Operator::kNoThrow | properties, \ | 648 Operator::kNoDeopt | Operator::kNoThrow | properties, \ |
| 645 #Name, value_input_count, 1, control_input_count, \ | 649 #Name, value_input_count, 1, control_input_count, \ |
| 646 output_count, 1, 0, access); \ | 650 output_count, 1, 0, access); \ |
| 647 } | 651 } |
| 648 ACCESS_OP_LIST(ACCESS) | 652 ACCESS_OP_LIST(ACCESS) |
| 649 #undef ACCESS | 653 #undef ACCESS |
| 650 | 654 |
| 651 } // namespace compiler | 655 } // namespace compiler |
| 652 } // namespace internal | 656 } // namespace internal |
| 653 } // namespace v8 | 657 } // namespace v8 |
| OLD | NEW |