| 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/types.h" | 9 #include "src/types.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 namespace compiler { | 13 namespace compiler { |
| 14 | 14 |
| 15 class Graph; | 15 class Graph; |
| 16 class Operator; | 16 class Operator; |
| 17 class CommonOperatorBuilder; | 17 class CommonOperatorBuilder; |
| 18 | 18 |
| 19 // A facade that simplifies access to the different kinds of inputs to a node. | 19 // A facade that simplifies access to the different kinds of inputs to a node. |
| 20 class NodeProperties FINAL { | 20 class NodeProperties final { |
| 21 public: | 21 public: |
| 22 // --------------------------------------------------------------------------- | 22 // --------------------------------------------------------------------------- |
| 23 // Input layout. | 23 // Input layout. |
| 24 // Inputs are always arranged in order as follows: | 24 // Inputs are always arranged in order as follows: |
| 25 // 0 [ values, context, frame state, effects, control ] node->InputCount() | 25 // 0 [ values, context, frame state, effects, control ] node->InputCount() |
| 26 | 26 |
| 27 static int FirstValueIndex(Node* node) { return 0; } | 27 static int FirstValueIndex(Node* node) { return 0; } |
| 28 static int FirstContextIndex(Node* node) { return PastValueIndex(node); } | 28 static int FirstContextIndex(Node* node) { return PastValueIndex(node); } |
| 29 static int FirstFrameStateIndex(Node* node) { return PastContextIndex(node); } | 29 static int FirstFrameStateIndex(Node* node) { return PastContextIndex(node); } |
| 30 static int FirstEffectIndex(Node* node) { return PastFrameStateIndex(node); } | 30 static int FirstEffectIndex(Node* node) { return PastFrameStateIndex(node); } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 static inline bool IsInputRange(Edge edge, int first, int count); | 130 static inline bool IsInputRange(Edge edge, int first, int count); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace compiler | 133 } // namespace compiler |
| 134 } // namespace internal | 134 } // namespace internal |
| 135 } // namespace v8 | 135 } // namespace v8 |
| 136 | 136 |
| 137 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 137 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
| OLD | NEW |