| 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_NODE_H_ | 5 #ifndef V8_COMPILER_NODE_H_ |
| 6 #define V8_COMPILER_NODE_H_ | 6 #define V8_COMPILER_NODE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 typedef NodeVector::iterator NodeVectorIter; | 70 typedef NodeVector::iterator NodeVectorIter; |
| 71 typedef NodeVector::reverse_iterator NodeVectorRIter; | 71 typedef NodeVector::reverse_iterator NodeVectorRIter; |
| 72 | 72 |
| 73 typedef ZoneVector<NodeVector> NodeVectorVector; | 73 typedef ZoneVector<NodeVector> NodeVectorVector; |
| 74 typedef NodeVectorVector::iterator NodeVectorVectorIter; | 74 typedef NodeVectorVector::iterator NodeVectorVectorIter; |
| 75 typedef NodeVectorVector::reverse_iterator NodeVectorVectorRIter; | 75 typedef NodeVectorVector::reverse_iterator NodeVectorVectorRIter; |
| 76 | 76 |
| 77 typedef Node::Uses::iterator UseIter; | 77 typedef Node::Uses::iterator UseIter; |
| 78 typedef Node::Inputs::iterator InputIter; | 78 typedef Node::Inputs::iterator InputIter; |
| 79 | 79 |
| 80 // Helper to extract parameters from Operator1<*> operator. |
| 81 template <typename T> |
| 82 static inline T OpParameter(Operator* op) { |
| 83 return reinterpret_cast<Operator1<T>*>(op)->parameter(); |
| 84 } |
| 85 |
| 86 |
| 80 // Helper to extract parameters from Operator1<*> nodes. | 87 // Helper to extract parameters from Operator1<*> nodes. |
| 81 template <typename T> | 88 template <typename T> |
| 82 static inline T OpParameter(Node* node) { | 89 static inline T OpParameter(Node* node) { |
| 83 return reinterpret_cast<Operator1<T>*>(node->op())->parameter(); | 90 return OpParameter<T>(node->op()); |
| 84 } | 91 } |
| 85 } | 92 } |
| 86 } | 93 } |
| 87 } // namespace v8::internal::compiler | 94 } // namespace v8::internal::compiler |
| 88 | 95 |
| 89 #endif // V8_COMPILER_NODE_H_ | 96 #endif // V8_COMPILER_NODE_H_ |
| OLD | NEW |