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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 static bool IsTyped(Node* node) { | 97 static bool IsTyped(Node* node) { |
98 Bounds const bounds = node->bounds(); | 98 Bounds const bounds = node->bounds(); |
99 DCHECK(!bounds.lower == !bounds.upper); | 99 DCHECK(!bounds.lower == !bounds.upper); |
100 return bounds.upper; | 100 return bounds.upper; |
101 } | 101 } |
102 static Bounds GetBounds(Node* node) { | 102 static Bounds GetBounds(Node* node) { |
103 DCHECK(IsTyped(node)); | 103 DCHECK(IsTyped(node)); |
104 return node->bounds(); | 104 return node->bounds(); |
105 } | 105 } |
106 static void SetBounds(Node* node, Bounds bounds) { | 106 static void SetBounds(Node* node, Bounds bounds) { |
107 DCHECK_NOT_NULL(bounds.lower); | 107 DCHECK(bounds.lower); |
108 DCHECK_NOT_NULL(bounds.upper); | 108 DCHECK(bounds.upper); |
109 node->set_bounds(bounds); | 109 node->set_bounds(bounds); |
110 } | 110 } |
111 static void RemoveBounds(Node* node) { node->set_bounds(Bounds()); } | 111 static void RemoveBounds(Node* node) { node->set_bounds(Bounds()); } |
112 static bool AllValueInputsAreTyped(Node* node); | 112 static bool AllValueInputsAreTyped(Node* node); |
113 | 113 |
114 private: | 114 private: |
115 static inline bool IsInputRange(Edge edge, int first, int count); | 115 static inline bool IsInputRange(Edge edge, int first, int count); |
116 }; | 116 }; |
117 | 117 |
118 } // namespace compiler | 118 } // namespace compiler |
119 } // namespace internal | 119 } // namespace internal |
120 } // namespace v8 | 120 } // namespace v8 |
121 | 121 |
122 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 122 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
OLD | NEW |