| 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_INL_H_ | 5 #ifndef V8_COMPILER_NODE_PROPERTIES_INL_H_ |
| 6 #define V8_COMPILER_NODE_PROPERTIES_INL_H_ | 6 #define V8_COMPILER_NODE_PROPERTIES_INL_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 inline void NodeProperties::ReplaceControlInput(Node* node, Node* control) { | 155 inline void NodeProperties::ReplaceControlInput(Node* node, Node* control) { |
| 156 node->ReplaceInput(FirstControlIndex(node), control); | 156 node->ReplaceInput(FirstControlIndex(node), control); |
| 157 } | 157 } |
| 158 | 158 |
| 159 inline void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, | 159 inline void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, |
| 160 int index) { | 160 int index) { |
| 161 DCHECK(index < OperatorProperties::GetEffectInputCount(node->op())); | 161 DCHECK(index < OperatorProperties::GetEffectInputCount(node->op())); |
| 162 return node->ReplaceInput(FirstEffectIndex(node) + index, effect); | 162 return node->ReplaceInput(FirstEffectIndex(node) + index, effect); |
| 163 } | 163 } |
| 164 | 164 |
| 165 inline void NodeProperties::ReplaceFrameStateInput(Node* node, | |
| 166 Node* frame_state) { | |
| 167 DCHECK(OperatorProperties::HasFrameStateInput(node->op())); | |
| 168 node->ReplaceInput(FirstFrameStateIndex(node), frame_state); | |
| 169 } | |
| 170 | |
| 171 inline void NodeProperties::RemoveNonValueInputs(Node* node) { | 165 inline void NodeProperties::RemoveNonValueInputs(Node* node) { |
| 172 node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); | 166 node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); |
| 173 } | 167 } |
| 174 | 168 |
| 175 | 169 |
| 176 // Replace value uses of {node} with {value} and effect uses of {node} with | 170 // Replace value uses of {node} with {value} and effect uses of {node} with |
| 177 // {effect}. If {effect == NULL}, then use the effect input to {node}. | 171 // {effect}. If {effect == NULL}, then use the effect input to {node}. |
| 178 inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, | 172 inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, |
| 179 Node* effect) { | 173 Node* effect) { |
| 180 DCHECK(!OperatorProperties::HasControlOutput(node->op())); | 174 DCHECK(!OperatorProperties::HasControlOutput(node->op())); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 203 inline void NodeProperties::SetBounds(Node* node, Bounds b) { | 197 inline void NodeProperties::SetBounds(Node* node, Bounds b) { |
| 204 node->set_bounds(b); | 198 node->set_bounds(b); |
| 205 } | 199 } |
| 206 | 200 |
| 207 | 201 |
| 208 } | 202 } |
| 209 } | 203 } |
| 210 } // namespace v8::internal::compiler | 204 } // namespace v8::internal::compiler |
| 211 | 205 |
| 212 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ | 206 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ |
| OLD | NEW |