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

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

Issue 23190035: Distinguish between malformed and malbounded types (fix issues 12552 and 12554). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 ASSERT(type_.IsZoneHandle()); 355 ASSERT(type_.IsZoneHandle());
356 ASSERT(!type_.IsNull()); 356 ASSERT(!type_.IsNull());
357 ASSERT(type_.IsFinalized()); 357 ASSERT(type_.IsFinalized());
358 } 358 }
359 359
360 const AbstractType& type() const { return type_; } 360 const AbstractType& type() const { return type_; }
361 361
362 virtual const char* Name() const; 362 virtual const char* Name() const;
363 363
364 virtual const Instance* EvalConstExpr() const { 364 virtual const Instance* EvalConstExpr() const {
365 // TODO(regis): What if the type is malbounded?
365 if (!type_.IsInstantiated() || type_.IsMalformed()) { 366 if (!type_.IsInstantiated() || type_.IsMalformed()) {
366 return NULL; 367 return NULL;
367 } 368 }
368 return &type(); 369 return &type();
369 } 370 }
370 371
371 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 372 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
372 373
373 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode); 374 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode);
374 375
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 const intptr_t try_index_; 1753 const intptr_t try_index_;
1753 1754
1754 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1755 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1755 }; 1756 };
1756 1757
1757 } // namespace dart 1758 } // namespace dart
1758 1759
1759 #undef DECLARE_COMMON_NODE_FUNCTIONS 1760 #undef DECLARE_COMMON_NODE_FUNCTIONS
1760 1761
1761 #endif // VM_AST_H_ 1762 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698