| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 5 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
| 6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
| 7 | 7 |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/js-operator.h" | 9 #include "src/compiler/js-operator.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return 0; // no effects. | 111 return 0; // no effects. |
| 112 return 1; | 112 return 1; |
| 113 } | 113 } |
| 114 | 114 |
| 115 inline int OperatorProperties::GetControlInputCount(const Operator* op) { | 115 inline int OperatorProperties::GetControlInputCount(const Operator* op) { |
| 116 switch (op->opcode()) { | 116 switch (op->opcode()) { |
| 117 case IrOpcode::kPhi: | 117 case IrOpcode::kPhi: |
| 118 case IrOpcode::kEffectPhi: | 118 case IrOpcode::kEffectPhi: |
| 119 case IrOpcode::kLoad: | 119 case IrOpcode::kLoad: |
| 120 case IrOpcode::kLoadElement: | 120 case IrOpcode::kLoadElement: |
| 121 case IrOpcode::kLoadField: |
| 121 return 1; | 122 return 1; |
| 122 #define OPCODE_CASE(x) case IrOpcode::k##x: | 123 #define OPCODE_CASE(x) case IrOpcode::k##x: |
| 123 CONTROL_OP_LIST(OPCODE_CASE) | 124 CONTROL_OP_LIST(OPCODE_CASE) |
| 124 #undef OPCODE_CASE | 125 #undef OPCODE_CASE |
| 125 // Control operators are Operator1<int>. | 126 // Control operators are Operator1<int>. |
| 126 return OpParameter<int>(op); | 127 return OpParameter<int>(op); |
| 127 default: | 128 default: |
| 128 // Operators that have write effects must have a control | 129 // Operators that have write effects must have a control |
| 129 // dependency. Effect dependencies only ensure the correct order of | 130 // dependency. Effect dependencies only ensure the correct order of |
| 130 // write/read operations without consideration of control flow. Without an | 131 // write/read operations without consideration of control flow. Without an |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || | 181 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || |
| 181 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || | 182 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || |
| 182 opcode == IrOpcode::kIfFalse; | 183 opcode == IrOpcode::kIfFalse; |
| 183 } | 184 } |
| 184 | 185 |
| 185 } // namespace compiler | 186 } // namespace compiler |
| 186 } // namespace internal | 187 } // namespace internal |
| 187 } // namespace v8 | 188 } // namespace v8 |
| 188 | 189 |
| 189 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 190 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
| OLD | NEW |