| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |