| 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_COMMON_OPERATOR_H_ | 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_ |
| 6 #define V8_COMPILER_COMMON_OPERATOR_H_ | 6 #define V8_COMPILER_COMMON_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 Operator* Phi(int arguments) { | 123 Operator* Phi(int arguments) { |
| 124 DCHECK(arguments > 0); // Disallow empty phis. | 124 DCHECK(arguments > 0); // Disallow empty phis. |
| 125 return new (zone_) Operator1<int>(IrOpcode::kPhi, Operator::kPure, | 125 return new (zone_) Operator1<int>(IrOpcode::kPhi, Operator::kPure, |
| 126 arguments, 1, "Phi", arguments); | 126 arguments, 1, "Phi", arguments); |
| 127 } | 127 } |
| 128 Operator* EffectPhi(int arguments) { | 128 Operator* EffectPhi(int arguments) { |
| 129 DCHECK(arguments > 0); // Disallow empty phis. | 129 DCHECK(arguments > 0); // Disallow empty phis. |
| 130 return new (zone_) Operator1<int>(IrOpcode::kEffectPhi, Operator::kPure, 0, | 130 return new (zone_) Operator1<int>(IrOpcode::kEffectPhi, Operator::kPure, 0, |
| 131 0, "EffectPhi", arguments); | 131 0, "EffectPhi", arguments); |
| 132 } | 132 } |
| 133 Operator* ControlEffect() { |
| 134 return new (zone_) SimpleOperator(IrOpcode::kControlEffect, Operator::kPure, |
| 135 0, 0, "ControlEffect"); |
| 136 } |
| 137 Operator* Finish(int arguments) { |
| 138 DCHECK(arguments > 0); // Disallow empty finishes. |
| 139 return new (zone_) Operator1<int>(IrOpcode::kFinish, Operator::kPure, 1, 1, |
| 140 "Finish", arguments); |
| 141 } |
| 133 Operator* StateValues(int arguments) { | 142 Operator* StateValues(int arguments) { |
| 134 return new (zone_) Operator1<int>(IrOpcode::kStateValues, Operator::kPure, | 143 return new (zone_) Operator1<int>(IrOpcode::kStateValues, Operator::kPure, |
| 135 arguments, 1, "StateValues", arguments); | 144 arguments, 1, "StateValues", arguments); |
| 136 } | 145 } |
| 137 Operator* FrameState(BailoutId ast_id) { | 146 Operator* FrameState(BailoutId ast_id) { |
| 138 return new (zone_) Operator1<BailoutId>( | 147 return new (zone_) Operator1<BailoutId>( |
| 139 IrOpcode::kFrameState, Operator::kPure, 3, 1, "FrameState", ast_id); | 148 IrOpcode::kFrameState, Operator::kPure, 3, 1, "FrameState", ast_id); |
| 140 } | 149 } |
| 141 Operator* Call(CallDescriptor* descriptor) { | 150 Operator* Call(CallDescriptor* descriptor) { |
| 142 return new (zone_) CallOperator(descriptor, "Call"); | 151 return new (zone_) CallOperator(descriptor, "Call"); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 284 |
| 276 template <typename T> | 285 template <typename T> |
| 277 inline T ValueOf(Operator* op) { | 286 inline T ValueOf(Operator* op) { |
| 278 return CommonOperatorTraits<T>::ValueOf(op); | 287 return CommonOperatorTraits<T>::ValueOf(op); |
| 279 } | 288 } |
| 280 } | 289 } |
| 281 } | 290 } |
| 282 } // namespace v8::internal::compiler | 291 } // namespace v8::internal::compiler |
| 283 | 292 |
| 284 #endif // V8_COMPILER_COMMON_OPERATOR_H_ | 293 #endif // V8_COMPILER_COMMON_OPERATOR_H_ |
| OLD | NEW |