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

Side by Side Diff: runtime/vm/ast.h

Issue 75713002: Distinguish between malformed and malbounded types more efficiently using the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_AST_H_ 5 #ifndef VM_AST_H_
6 #define VM_AST_H_ 6 #define VM_AST_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 ASSERT(type_.IsZoneHandle()); 370 ASSERT(type_.IsZoneHandle());
371 ASSERT(!type_.IsNull()); 371 ASSERT(!type_.IsNull());
372 ASSERT(type_.IsFinalized()); 372 ASSERT(type_.IsFinalized());
373 } 373 }
374 374
375 const AbstractType& type() const { return type_; } 375 const AbstractType& type() const { return type_; }
376 376
377 const char* TypeName() const; 377 const char* TypeName() const;
378 378
379 virtual const Instance* EvalConstExpr() const { 379 virtual const Instance* EvalConstExpr() const {
380 if (!type_.IsInstantiated() || 380 if (!type_.IsInstantiated() || type_.IsMalformedOrMalbounded()) {
381 type_.IsMalformed() || type_.IsMalbounded()) {
382 return NULL; 381 return NULL;
383 } 382 }
384 return &type(); 383 return &type();
385 } 384 }
386 385
387 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 386 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
388 387
389 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode); 388 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode);
390 389
391 private: 390 private:
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 const intptr_t try_index_; 1769 const intptr_t try_index_;
1771 1770
1772 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1771 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1773 }; 1772 };
1774 1773
1775 } // namespace dart 1774 } // namespace dart
1776 1775
1777 #undef DECLARE_COMMON_NODE_FUNCTIONS 1776 #undef DECLARE_COMMON_NODE_FUNCTIONS
1778 1777
1779 #endif // VM_AST_H_ 1778 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698