| 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/operator-properties.h" | 5 #include "src/compiler/operator-properties.h" |
| 6 | 6 |
| 7 #include "src/compiler/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // Strict equality cannot lazily deoptimize. | 33 // Strict equality cannot lazily deoptimize. |
| 34 case IrOpcode::kJSStrictEqual: | 34 case IrOpcode::kJSStrictEqual: |
| 35 case IrOpcode::kJSStrictNotEqual: | 35 case IrOpcode::kJSStrictNotEqual: |
| 36 return 0; | 36 return 0; |
| 37 | 37 |
| 38 // Binary operations | 38 // Binary operations |
| 39 case IrOpcode::kJSAdd: | 39 case IrOpcode::kJSAdd: |
| 40 case IrOpcode::kJSSubtract: | 40 case IrOpcode::kJSSubtract: |
| 41 case IrOpcode::kJSMultiply: | 41 case IrOpcode::kJSMultiply: |
| 42 case IrOpcode::kJSDivide: |
| 43 case IrOpcode::kJSModulus: |
| 42 | 44 |
| 43 // Compare operations | 45 // Compare operations |
| 44 case IrOpcode::kJSEqual: | 46 case IrOpcode::kJSEqual: |
| 45 case IrOpcode::kJSNotEqual: | 47 case IrOpcode::kJSNotEqual: |
| 46 case IrOpcode::kJSHasProperty: | 48 case IrOpcode::kJSHasProperty: |
| 47 case IrOpcode::kJSInstanceOf: | 49 case IrOpcode::kJSInstanceOf: |
| 48 | 50 |
| 49 // Object operations | 51 // Object operations |
| 50 case IrOpcode::kJSCreate: | 52 case IrOpcode::kJSCreate: |
| 51 case IrOpcode::kJSCreateArguments: | 53 case IrOpcode::kJSCreateArguments: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 case IrOpcode::kJSForInPrepare: | 86 case IrOpcode::kJSForInPrepare: |
| 85 case IrOpcode::kJSStackCheck: | 87 case IrOpcode::kJSStackCheck: |
| 86 return 1; | 88 return 1; |
| 87 | 89 |
| 88 // Binary operators that can deopt in the middle the operation (e.g., | 90 // Binary operators that can deopt in the middle the operation (e.g., |
| 89 // as a result of lazy deopt in ToNumber conversion) need a second frame | 91 // as a result of lazy deopt in ToNumber conversion) need a second frame |
| 90 // state so that we can resume before the operation. | 92 // state so that we can resume before the operation. |
| 91 case IrOpcode::kJSBitwiseAnd: | 93 case IrOpcode::kJSBitwiseAnd: |
| 92 case IrOpcode::kJSBitwiseOr: | 94 case IrOpcode::kJSBitwiseOr: |
| 93 case IrOpcode::kJSBitwiseXor: | 95 case IrOpcode::kJSBitwiseXor: |
| 94 case IrOpcode::kJSDivide: | |
| 95 case IrOpcode::kJSModulus: | |
| 96 case IrOpcode::kJSShiftLeft: | 96 case IrOpcode::kJSShiftLeft: |
| 97 case IrOpcode::kJSShiftRight: | 97 case IrOpcode::kJSShiftRight: |
| 98 case IrOpcode::kJSShiftRightLogical: | 98 case IrOpcode::kJSShiftRightLogical: |
| 99 return 2; | 99 return 2; |
| 100 | 100 |
| 101 // Compare operators that can deopt in the middle the operation (e.g., | 101 // Compare operators that can deopt in the middle the operation (e.g., |
| 102 // as a result of lazy deopt in ToNumber conversion) need a second frame | 102 // as a result of lazy deopt in ToNumber conversion) need a second frame |
| 103 // state so that we can resume before the operation. | 103 // state so that we can resume before the operation. |
| 104 case IrOpcode::kJSGreaterThan: | 104 case IrOpcode::kJSGreaterThan: |
| 105 case IrOpcode::kJSGreaterThanOrEqual: | 105 case IrOpcode::kJSGreaterThanOrEqual: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 128 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || | 128 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || |
| 129 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || | 129 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || |
| 130 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || | 130 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || |
| 131 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || | 131 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || |
| 132 opcode == IrOpcode::kIfDefault; | 132 opcode == IrOpcode::kIfDefault; |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace compiler | 135 } // namespace compiler |
| 136 } // namespace internal | 136 } // namespace internal |
| 137 } // namespace v8 | 137 } // namespace v8 |
| OLD | NEW |