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 |
165 inline void NodeProperties::RemoveNonValueInputs(Node* node) { | 171 inline void NodeProperties::RemoveNonValueInputs(Node* node) { |
166 node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); | 172 node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); |
167 } | 173 } |
168 | 174 |
169 | 175 |
170 // Replace value uses of {node} with {value} and effect uses of {node} with | 176 // Replace value uses of {node} with {value} and effect uses of {node} with |
171 // {effect}. If {effect == NULL}, then use the effect input to {node}. | 177 // {effect}. If {effect == NULL}, then use the effect input to {node}. |
172 inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, | 178 inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, |
173 Node* effect) { | 179 Node* effect) { |
174 DCHECK(!OperatorProperties::HasControlOutput(node->op())); | 180 DCHECK(!OperatorProperties::HasControlOutput(node->op())); |
(...skipping 22 matching lines...) Expand all Loading... |
197 inline void NodeProperties::SetBounds(Node* node, Bounds b) { | 203 inline void NodeProperties::SetBounds(Node* node, Bounds b) { |
198 node->set_bounds(b); | 204 node->set_bounds(b); |
199 } | 205 } |
200 | 206 |
201 | 207 |
202 } | 208 } |
203 } | 209 } |
204 } // namespace v8::internal::compiler | 210 } // namespace v8::internal::compiler |
205 | 211 |
206 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ | 212 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ |
OLD | NEW |