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_H_ | 5 #ifndef V8_COMPILER_OPERATOR_H_ |
6 #define V8_COMPILER_OPERATOR_H_ | 6 #define V8_COMPILER_OPERATOR_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
10 #include "src/unique.h" | 10 #include "src/unique.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 int output_count_; | 259 int output_count_; |
260 T parameter_; | 260 T parameter_; |
261 }; | 261 }; |
262 | 262 |
263 // Type definitions for operators with specific types of parameters. | 263 // Type definitions for operators with specific types of parameters. |
264 typedef Operator1<Unique<Name> > NameOperator; | 264 typedef Operator1<Unique<Name> > NameOperator; |
265 | 265 |
266 | 266 |
267 // Helper to extract parameters from Operator1<*> operator. | 267 // Helper to extract parameters from Operator1<*> operator. |
268 template <typename T> | 268 template <typename T> |
269 static inline T OpParameter(const Operator* op) { | 269 static inline const T& OpParameter(const Operator* op) { |
270 return reinterpret_cast<const Operator1<T>*>(op)->parameter(); | 270 return reinterpret_cast<const Operator1<T>*>(op)->parameter(); |
271 } | 271 } |
272 | 272 |
273 } // namespace compiler | 273 } // namespace compiler |
274 } // namespace internal | 274 } // namespace internal |
275 } // namespace v8 | 275 } // namespace v8 |
276 | 276 |
277 #endif // V8_COMPILER_OPERATOR_H_ | 277 #endif // V8_COMPILER_OPERATOR_H_ |
OLD | NEW |