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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 117 } |
118 static Bounds GetBounds(Node* node) { | 118 static Bounds GetBounds(Node* node) { |
119 DCHECK(IsTyped(node)); | 119 DCHECK(IsTyped(node)); |
120 return node->bounds(); | 120 return node->bounds(); |
121 } | 121 } |
122 static void SetBounds(Node* node, Bounds bounds) { | 122 static void SetBounds(Node* node, Bounds bounds) { |
123 DCHECK_NOT_NULL(bounds.lower); | 123 DCHECK_NOT_NULL(bounds.lower); |
124 DCHECK_NOT_NULL(bounds.upper); | 124 DCHECK_NOT_NULL(bounds.upper); |
125 node->set_bounds(bounds); | 125 node->set_bounds(bounds); |
126 } | 126 } |
| 127 static void CopyBounds(Node* dst, Node* src) { |
| 128 dst->set_bounds(src->bounds()); |
| 129 } |
127 static void RemoveBounds(Node* node) { node->set_bounds(Bounds()); } | 130 static void RemoveBounds(Node* node) { node->set_bounds(Bounds()); } |
128 static bool AllValueInputsAreTyped(Node* node); | 131 static bool AllValueInputsAreTyped(Node* node); |
129 | 132 |
130 private: | 133 private: |
131 static inline bool IsInputRange(Edge edge, int first, int count); | 134 static inline bool IsInputRange(Edge edge, int first, int count); |
132 }; | 135 }; |
133 | 136 |
134 } // namespace compiler | 137 } // namespace compiler |
135 } // namespace internal | 138 } // namespace internal |
136 } // namespace v8 | 139 } // namespace v8 |
137 | 140 |
138 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 141 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
OLD | NEW |