| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |