| 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 24 matching lines...) Expand all Loading... |
| 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: | 42 case IrOpcode::kJSDivide: |
| 43 case IrOpcode::kJSModulus: | 43 case IrOpcode::kJSModulus: |
| 44 | 44 |
| 45 // Shift operations |
| 46 case IrOpcode::kJSShiftLeft: |
| 47 case IrOpcode::kJSShiftRight: |
| 48 case IrOpcode::kJSShiftRightLogical: |
| 49 |
| 45 // Compare operations | 50 // Compare operations |
| 46 case IrOpcode::kJSEqual: | 51 case IrOpcode::kJSEqual: |
| 47 case IrOpcode::kJSNotEqual: | 52 case IrOpcode::kJSNotEqual: |
| 48 case IrOpcode::kJSGreaterThan: | 53 case IrOpcode::kJSGreaterThan: |
| 49 case IrOpcode::kJSGreaterThanOrEqual: | 54 case IrOpcode::kJSGreaterThanOrEqual: |
| 50 case IrOpcode::kJSLessThan: | 55 case IrOpcode::kJSLessThan: |
| 51 case IrOpcode::kJSLessThanOrEqual: | 56 case IrOpcode::kJSLessThanOrEqual: |
| 52 case IrOpcode::kJSHasProperty: | 57 case IrOpcode::kJSHasProperty: |
| 53 case IrOpcode::kJSInstanceOf: | 58 case IrOpcode::kJSInstanceOf: |
| 54 | 59 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 case IrOpcode::kJSForInPrepare: | 95 case IrOpcode::kJSForInPrepare: |
| 91 case IrOpcode::kJSStackCheck: | 96 case IrOpcode::kJSStackCheck: |
| 92 return 1; | 97 return 1; |
| 93 | 98 |
| 94 // Binary operators that can deopt in the middle the operation (e.g., | 99 // Binary operators that can deopt in the middle the operation (e.g., |
| 95 // as a result of lazy deopt in ToNumber conversion) need a second frame | 100 // as a result of lazy deopt in ToNumber conversion) need a second frame |
| 96 // state so that we can resume before the operation. | 101 // state so that we can resume before the operation. |
| 97 case IrOpcode::kJSBitwiseAnd: | 102 case IrOpcode::kJSBitwiseAnd: |
| 98 case IrOpcode::kJSBitwiseOr: | 103 case IrOpcode::kJSBitwiseOr: |
| 99 case IrOpcode::kJSBitwiseXor: | 104 case IrOpcode::kJSBitwiseXor: |
| 100 case IrOpcode::kJSShiftLeft: | |
| 101 case IrOpcode::kJSShiftRight: | |
| 102 case IrOpcode::kJSShiftRightLogical: | |
| 103 return 2; | 105 return 2; |
| 104 | 106 |
| 105 default: | 107 default: |
| 106 return 0; | 108 return 0; |
| 107 } | 109 } |
| 108 } | 110 } |
| 109 | 111 |
| 110 | 112 |
| 111 // static | 113 // static |
| 112 int OperatorProperties::GetTotalInputCount(const Operator* op) { | 114 int OperatorProperties::GetTotalInputCount(const Operator* op) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 123 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || | 125 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || |
| 124 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || | 126 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || |
| 125 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || | 127 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || |
| 126 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || | 128 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || |
| 127 opcode == IrOpcode::kIfDefault; | 129 opcode == IrOpcode::kIfDefault; |
| 128 } | 130 } |
| 129 | 131 |
| 130 } // namespace compiler | 132 } // namespace compiler |
| 131 } // namespace internal | 133 } // namespace internal |
| 132 } // namespace v8 | 134 } // namespace v8 |
| OLD | NEW |