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) { | |
Jarin
2014/09/15 13:37:51
Perhaps an assert here that the node indeed has fr
sigurds
2014/09/16 08:39:03
Done.
| |
167 node->ReplaceInput(FirstFrameStateIndex(node), frame_state); | |
168 } | |
169 | |
165 inline void NodeProperties::RemoveNonValueInputs(Node* node) { | 170 inline void NodeProperties::RemoveNonValueInputs(Node* node) { |
166 node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); | 171 node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op())); |
167 } | 172 } |
168 | 173 |
169 | 174 |
170 // Replace value uses of {node} with {value} and effect uses of {node} with | 175 // 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}. | 176 // {effect}. If {effect == NULL}, then use the effect input to {node}. |
172 inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, | 177 inline void NodeProperties::ReplaceWithValue(Node* node, Node* value, |
173 Node* effect) { | 178 Node* effect) { |
174 DCHECK(!OperatorProperties::HasControlOutput(node->op())); | 179 DCHECK(!OperatorProperties::HasControlOutput(node->op())); |
(...skipping 22 matching lines...) Expand all Loading... | |
197 inline void NodeProperties::SetBounds(Node* node, Bounds b) { | 202 inline void NodeProperties::SetBounds(Node* node, Bounds b) { |
198 node->set_bounds(b); | 203 node->set_bounds(b); |
199 } | 204 } |
200 | 205 |
201 | 206 |
202 } | 207 } |
203 } | 208 } |
204 } // namespace v8::internal::compiler | 209 } // namespace v8::internal::compiler |
205 | 210 |
206 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ | 211 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ |
OLD | NEW |