| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Replaces all value inputs of {node} with the single input {value}. | 91 // Replaces all value inputs of {node} with the single input {value}. |
| 92 static void ReplaceValueInputs(Node* node, Node* value); | 92 static void ReplaceValueInputs(Node* node, Node* value); |
| 93 | 93 |
| 94 // 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 |
| 95 // merge node or expanding an existing merge node if necessary. | 95 // merge node or expanding an existing merge node if necessary. |
| 96 static void MergeControlToEnd(Graph* graph, CommonOperatorBuilder* common, | 96 static void MergeControlToEnd(Graph* graph, CommonOperatorBuilder* common, |
| 97 Node* node); | 97 Node* node); |
| 98 | 98 |
| 99 // 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 |
| 100 // use kinds need to be replaced, {NULL} is only valid if a use kind is | 100 // use kinds need to be replaced, {nullptr} is only valid if a use kind is |
| 101 // guaranteed not to exist. | 101 // guaranteed not to exist. |
| 102 static void ReplaceUses(Node* node, Node* value, Node* effect = nullptr, | 102 static void ReplaceUses(Node* node, Node* value, Node* effect = nullptr, |
| 103 Node* success = nullptr, Node* exception = nullptr); | 103 Node* success = nullptr, Node* exception = nullptr); |
| 104 | 104 |
| 105 // Safe wrapper to mutate the operator of a node. Checks that the node is | 105 // Safe wrapper to mutate the operator of a node. Checks that the node is |
| 106 // currently in a state that satisfies constraints of the new operator. | 106 // currently in a state that satisfies constraints of the new operator. |
| 107 static void ChangeOp(Node* node, const Operator* new_op); | 107 static void ChangeOp(Node* node, const Operator* new_op); |
| 108 | 108 |
| 109 // --------------------------------------------------------------------------- | 109 // --------------------------------------------------------------------------- |
| 110 // Miscellaneous utilities. | 110 // Miscellaneous utilities. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 static inline bool IsInputRange(Edge edge, int first, int count); | 159 static inline bool IsInputRange(Edge edge, int first, int count); |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } // namespace compiler | 162 } // namespace compiler |
| 163 } // namespace internal | 163 } // namespace internal |
| 164 } // namespace v8 | 164 } // namespace v8 |
| 165 | 165 |
| 166 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 166 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
| OLD | NEW |