| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 static void ReplaceValueInput(Node* node, Node* value, int index); | 82 static void ReplaceValueInput(Node* node, Node* value, int index); |
| 83 static void ReplaceContextInput(Node* node, Node* context); | 83 static void ReplaceContextInput(Node* node, Node* context); |
| 84 static void ReplaceControlInput(Node* node, Node* control); | 84 static void ReplaceControlInput(Node* node, Node* control); |
| 85 static void ReplaceEffectInput(Node* node, Node* effect, int index = 0); | 85 static void ReplaceEffectInput(Node* node, Node* effect, int index = 0); |
| 86 static void ReplaceFrameStateInput(Node* node, int index, Node* frame_state); | 86 static void ReplaceFrameStateInput(Node* node, int index, Node* frame_state); |
| 87 static void RemoveFrameStateInput(Node* node, int index); | 87 static void RemoveFrameStateInput(Node* node, int index); |
| 88 static void RemoveNonValueInputs(Node* node); | 88 static void RemoveNonValueInputs(Node* node); |
| 89 static void RemoveValueInputs(Node* node); | 89 static void RemoveValueInputs(Node* node); |
| 90 | 90 |
| 91 // Replaces all value inputs of {node} with the single input {value}. |
| 92 static void ReplaceValueInputs(Node* node, Node* value); |
| 93 |
| 91 // Merge the control node {node} into the end of the graph, introducing a | 94 // Merge the control node {node} into the end of the graph, introducing a |
| 92 // merge node or expanding an existing merge node if necessary. | 95 // merge node or expanding an existing merge node if necessary. |
| 93 static void MergeControlToEnd(Graph* graph, CommonOperatorBuilder* common, | 96 static void MergeControlToEnd(Graph* graph, CommonOperatorBuilder* common, |
| 94 Node* node); | 97 Node* node); |
| 95 | 98 |
| 96 // Replace all uses of {node} with the given replacement nodes. All occurring | 99 // Replace all uses of {node} with the given replacement nodes. All occurring |
| 97 // use kinds need to be replaced, {NULL} is only valid if a use kind is | 100 // use kinds need to be replaced, {NULL} is only valid if a use kind is |
| 98 // guaranteed not to exist. | 101 // guaranteed not to exist. |
| 99 static void ReplaceUses(Node* node, Node* value, Node* effect = nullptr, | 102 static void ReplaceUses(Node* node, Node* value, Node* effect = nullptr, |
| 100 Node* success = nullptr, Node* exception = nullptr); | 103 Node* success = nullptr, Node* exception = nullptr); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 157 |
| 155 private: | 158 private: |
| 156 static inline bool IsInputRange(Edge edge, int first, int count); | 159 static inline bool IsInputRange(Edge edge, int first, int count); |
| 157 }; | 160 }; |
| 158 | 161 |
| 159 } // namespace compiler | 162 } // namespace compiler |
| 160 } // namespace internal | 163 } // namespace internal |
| 161 } // namespace v8 | 164 } // namespace v8 |
| 162 | 165 |
| 163 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 166 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
| OLD | NEW |