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/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler/js-operator.h" | 10 #include "src/compiler/js-operator.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // ----------------------------------------------------------------------------- | 84 // ----------------------------------------------------------------------------- |
85 // Output properties. | 85 // Output properties. |
86 | 86 |
87 inline bool OperatorProperties::HasValueOutput(Operator* op) { | 87 inline bool OperatorProperties::HasValueOutput(Operator* op) { |
88 return GetValueOutputCount(op) > 0; | 88 return GetValueOutputCount(op) > 0; |
89 } | 89 } |
90 | 90 |
91 inline bool OperatorProperties::HasEffectOutput(Operator* op) { | 91 inline bool OperatorProperties::HasEffectOutput(Operator* op) { |
92 return op->opcode() == IrOpcode::kStart || | 92 return op->opcode() == IrOpcode::kStart || |
93 op->opcode() == IrOpcode::kControlEffect || | 93 op->opcode() == IrOpcode::kControlEffect || |
| 94 op->opcode() == IrOpcode::kValueEffect || |
94 (op->opcode() != IrOpcode::kFinish && GetEffectInputCount(op) > 0); | 95 (op->opcode() != IrOpcode::kFinish && GetEffectInputCount(op) > 0); |
95 } | 96 } |
96 | 97 |
97 inline bool OperatorProperties::HasControlOutput(Operator* op) { | 98 inline bool OperatorProperties::HasControlOutput(Operator* op) { |
98 IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode()); | 99 IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode()); |
99 return (opcode != IrOpcode::kEnd && IrOpcode::IsControlOpcode(opcode)) || | 100 return (opcode != IrOpcode::kEnd && IrOpcode::IsControlOpcode(opcode)) || |
100 CanLazilyDeoptimize(op); | 101 CanLazilyDeoptimize(op); |
101 } | 102 } |
102 | 103 |
103 | 104 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 default: | 187 default: |
187 return false; | 188 return false; |
188 } | 189 } |
189 return false; | 190 return false; |
190 } | 191 } |
191 } | 192 } |
192 } | 193 } |
193 } // namespace v8::internal::compiler | 194 } // namespace v8::internal::compiler |
194 | 195 |
195 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 196 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
OLD | NEW |