| 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_PROPERTIES_H_ | 5 #ifndef V8_COMPILER_NODE_PROPERTIES_H_ |
| 6 #define V8_COMPILER_NODE_PROPERTIES_H_ | 6 #define V8_COMPILER_NODE_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
| 9 #include "src/compiler/types.h" | 9 #include "src/compiler/types.h" |
| 10 #include "src/globals.h" |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 namespace compiler { | 14 namespace compiler { |
| 14 | 15 |
| 15 class Graph; | 16 class Graph; |
| 16 class Operator; | 17 class Operator; |
| 17 class CommonOperatorBuilder; | 18 class CommonOperatorBuilder; |
| 18 | 19 |
| 19 // A facade that simplifies access to the different kinds of inputs to a node. | 20 // A facade that simplifies access to the different kinds of inputs to a node. |
| 20 class NodeProperties final { | 21 class V8_EXPORT_PRIVATE NodeProperties final { |
| 21 public: | 22 public: |
| 22 // --------------------------------------------------------------------------- | 23 // --------------------------------------------------------------------------- |
| 23 // Input layout. | 24 // Input layout. |
| 24 // Inputs are always arranged in order as follows: | 25 // Inputs are always arranged in order as follows: |
| 25 // 0 [ values, context, frame state, effects, control ] node->InputCount() | 26 // 0 [ values, context, frame state, effects, control ] node->InputCount() |
| 26 | 27 |
| 27 static int FirstValueIndex(Node* node) { return 0; } | 28 static int FirstValueIndex(Node* node) { return 0; } |
| 28 static int FirstContextIndex(Node* node) { return PastValueIndex(node); } | 29 static int FirstContextIndex(Node* node) { return PastValueIndex(node); } |
| 29 static int FirstFrameStateIndex(Node* node) { return PastContextIndex(node); } | 30 static int FirstFrameStateIndex(Node* node) { return PastContextIndex(node); } |
| 30 static int FirstEffectIndex(Node* node) { return PastFrameStateIndex(node); } | 31 static int FirstEffectIndex(Node* node) { return PastFrameStateIndex(node); } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 150 |
| 150 private: | 151 private: |
| 151 static inline bool IsInputRange(Edge edge, int first, int count); | 152 static inline bool IsInputRange(Edge edge, int first, int count); |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 } // namespace compiler | 155 } // namespace compiler |
| 155 } // namespace internal | 156 } // namespace internal |
| 156 } // namespace v8 | 157 } // namespace v8 |
| 157 | 158 |
| 158 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 159 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
| OLD | NEW |