| 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 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 static int PastFrameStateIndex(Node* node); | 32 static int PastFrameStateIndex(Node* node); |
| 33 static int PastEffectIndex(Node* node); | 33 static int PastEffectIndex(Node* node); |
| 34 static int PastControlIndex(Node* node); | 34 static int PastControlIndex(Node* node); |
| 35 | 35 |
| 36 | 36 |
| 37 // --------------------------------------------------------------------------- | 37 // --------------------------------------------------------------------------- |
| 38 // Input accessors. | 38 // Input accessors. |
| 39 | 39 |
| 40 static Node* GetValueInput(Node* node, int index); | 40 static Node* GetValueInput(Node* node, int index); |
| 41 static Node* GetContextInput(Node* node); | 41 static Node* GetContextInput(Node* node); |
| 42 static Node* GetFrameStateInput(Node* node); | 42 static Node* GetFrameStateInput(Node* node, int index); |
| 43 static Node* GetEffectInput(Node* node, int index = 0); | 43 static Node* GetEffectInput(Node* node, int index = 0); |
| 44 static Node* GetControlInput(Node* node, int index = 0); | 44 static Node* GetControlInput(Node* node, int index = 0); |
| 45 | 45 |
| 46 | 46 |
| 47 // --------------------------------------------------------------------------- | 47 // --------------------------------------------------------------------------- |
| 48 // Edge kinds. | 48 // Edge kinds. |
| 49 | 49 |
| 50 static bool IsValueEdge(Edge edge); | 50 static bool IsValueEdge(Edge edge); |
| 51 static bool IsContextEdge(Edge edge); | 51 static bool IsContextEdge(Edge edge); |
| 52 static bool IsFrameStateEdge(Edge edge); | 52 static bool IsFrameStateEdge(Edge edge); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 70 return IrOpcode::IsPhiOpcode(node->opcode()); | 70 return IrOpcode::IsPhiOpcode(node->opcode()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 | 73 |
| 74 // --------------------------------------------------------------------------- | 74 // --------------------------------------------------------------------------- |
| 75 // Miscellaneous mutators. | 75 // Miscellaneous mutators. |
| 76 | 76 |
| 77 static void ReplaceContextInput(Node* node, Node* context); | 77 static void ReplaceContextInput(Node* node, Node* context); |
| 78 static void ReplaceControlInput(Node* node, Node* control); | 78 static void ReplaceControlInput(Node* node, Node* control); |
| 79 static void ReplaceEffectInput(Node* node, Node* effect, int index = 0); | 79 static void ReplaceEffectInput(Node* node, Node* effect, int index = 0); |
| 80 static void ReplaceFrameStateInput(Node* node, Node* frame_state); | 80 static void ReplaceFrameStateInput(Node* node, int index, Node* frame_state); |
| 81 static void RemoveNonValueInputs(Node* node); | 81 static void RemoveNonValueInputs(Node* node); |
| 82 | 82 |
| 83 // Replace value uses of {node} with {value} and effect uses of {node} with | 83 // Replace value uses of {node} with {value} and effect uses of {node} with |
| 84 // {effect}. If {effect == NULL}, then use the effect input to {node}. All | 84 // {effect}. If {effect == NULL}, then use the effect input to {node}. All |
| 85 // control uses will be relaxed assuming {node} cannot throw. | 85 // control uses will be relaxed assuming {node} cannot throw. |
| 86 static void ReplaceWithValue(Node* node, Node* value, Node* effect = nullptr, | 86 static void ReplaceWithValue(Node* node, Node* value, Node* effect = nullptr, |
| 87 Node* control = nullptr); | 87 Node* control = nullptr); |
| 88 | 88 |
| 89 // --------------------------------------------------------------------------- | 89 // --------------------------------------------------------------------------- |
| 90 // Miscellaneous utilities. | 90 // Miscellaneous utilities. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 121 | 121 |
| 122 private: | 122 private: |
| 123 static inline bool IsInputRange(Edge edge, int first, int count); | 123 static inline bool IsInputRange(Edge edge, int first, int count); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace compiler | 126 } // namespace compiler |
| 127 } // namespace internal | 127 } // namespace internal |
| 128 } // namespace v8 | 128 } // namespace v8 |
| 129 | 129 |
| 130 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 130 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
| OLD | NEW |