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

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

Issue 66033006: Check type bounds of redirecting factories (issue 14699). (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 | « runtime/lib/mirrors.cc ('k') | 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 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 // TODO(regis): What if the type is malbounded? 380 if (!type_.IsInstantiated() ||
381 if (!type_.IsInstantiated() || type_.IsMalformed()) { 381 type_.IsMalformed() || type_.IsMalbounded()) {
382 return NULL; 382 return NULL;
383 } 383 }
384 return &type(); 384 return &type();
385 } 385 }
386 386
387 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 387 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
388 388
389 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode); 389 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode);
390 390
391 private: 391 private:
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 const intptr_t try_index_; 1778 const intptr_t try_index_;
1779 1779
1780 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1780 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1781 }; 1781 };
1782 1782
1783 } // namespace dart 1783 } // namespace dart
1784 1784
1785 #undef DECLARE_COMMON_NODE_FUNCTIONS 1785 #undef DECLARE_COMMON_NODE_FUNCTIONS
1786 1786
1787 #endif // VM_AST_H_ 1787 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698