Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1380)

Side by Side Diff: src/compiler/node-properties-inl.h

Issue 509343002: Better typing and type verification (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Drop typedness from graph Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } else { 185 } else {
186 iter = iter.UpdateToAndIncrement(value); 186 iter = iter.UpdateToAndIncrement(value);
187 } 187 }
188 } 188 }
189 } 189 }
190 190
191 191
192 // ----------------------------------------------------------------------------- 192 // -----------------------------------------------------------------------------
193 // Type Bounds. 193 // Type Bounds.
194 194
195 inline Bounds NodeProperties::GetBounds(Node* node) { return node->bounds(); } 195 inline bool NodeProperties::IsTyped(Node* node) {
196 Bounds bounds = node->bounds();
197 DCHECK((bounds.lower == NULL) == (bounds.upper == NULL));
198 return bounds.upper != NULL;
199 }
200
201 inline Bounds NodeProperties::GetBounds(Node* node) {
202 DCHECK(IsTyped(node));
203 return node->bounds();
204 }
196 205
197 inline void NodeProperties::SetBounds(Node* node, Bounds b) { 206 inline void NodeProperties::SetBounds(Node* node, Bounds b) {
198 node->set_bounds(b); 207 node->set_bounds(b);
199 } 208 }
200 209
201 210
202 } 211 }
203 } 212 }
204 } // namespace v8::internal::compiler 213 } // namespace v8::internal::compiler
205 214
206 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_ 215 #endif // V8_COMPILER_NODE_PROPERTIES_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698