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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } else { | 191 } else { |
192 iter = iter.UpdateToAndIncrement(value); | 192 iter = iter.UpdateToAndIncrement(value); |
193 } | 193 } |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 | 197 |
198 // ----------------------------------------------------------------------------- | 198 // ----------------------------------------------------------------------------- |
199 // Type Bounds. | 199 // Type Bounds. |
200 | 200 |
201 inline Bounds NodeProperties::GetBounds(Node* node) { return node->bounds(); } | 201 inline bool NodeProperties::IsTyped(Node* node) { |
| 202 Bounds bounds = node->bounds(); |
| 203 DCHECK((bounds.lower == NULL) == (bounds.upper == NULL)); |
| 204 return bounds.upper != NULL; |
| 205 } |
| 206 |
| 207 inline Bounds NodeProperties::GetBounds(Node* node) { |
| 208 DCHECK(IsTyped(node)); |
| 209 return node->bounds(); |
| 210 } |
202 | 211 |
203 inline void NodeProperties::SetBounds(Node* node, Bounds b) { | 212 inline void NodeProperties::SetBounds(Node* node, Bounds b) { |
| 213 DCHECK(b.lower != NULL && b.upper != NULL); |
204 node->set_bounds(b); | 214 node->set_bounds(b); |
205 } | 215 } |
206 | 216 |
| 217 inline bool NodeProperties::AllValueInputsAreTyped(Node* node) { |
| 218 int input_count = OperatorProperties::GetValueInputCount(node->op()); |
| 219 for (int i = 0; i < input_count; ++i) { |
| 220 if (!IsTyped(GetValueInput(node, i))) return false; |
| 221 } |
| 222 return true; |
| 223 } |
| 224 |
207 | 225 |
208 } | 226 } |
209 } | 227 } |
210 } // namespace v8::internal::compiler | 228 } // namespace v8::internal::compiler |
211 | 229 |
212 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ | 230 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ |
OLD | NEW |