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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 : AstNode(token_pos), literal_(literal) { | 437 : AstNode(token_pos), literal_(literal) { |
438 ASSERT(literal_.IsNotTemporaryScopedHandle()); | 438 ASSERT(literal_.IsNotTemporaryScopedHandle()); |
439 ASSERT(literal_.IsSmi() || literal_.IsOld()); | 439 ASSERT(literal_.IsSmi() || literal_.IsOld()); |
440 #if defined(DEBUG) | 440 #if defined(DEBUG) |
441 if (literal_.IsString()) { | 441 if (literal_.IsString()) { |
442 ASSERT(String::Cast(literal_).IsSymbol()); | 442 ASSERT(String::Cast(literal_).IsSymbol()); |
443 } | 443 } |
444 #endif // defined(DEBUG) | 444 #endif // defined(DEBUG) |
445 ASSERT(literal_.IsNull() || | 445 ASSERT(literal_.IsNull() || |
446 Class::Handle(literal_.clazz()).is_finalized() || | 446 Class::Handle(literal_.clazz()).is_finalized() || |
447 Class::Handle(literal_.clazz()).is_prefinalized()); | 447 Class::Handle(literal_.clazz()).is_prefinalized() || |
| 448 // TODO(regis): Remove next line once fixed. |
| 449 Class::Handle(literal_.clazz()).is_refinalize_after_patch()); |
448 } | 450 } |
449 | 451 |
450 const Instance& literal() const { return literal_; } | 452 const Instance& literal() const { return literal_; } |
451 | 453 |
452 virtual bool IsPotentiallyConst() const; | 454 virtual bool IsPotentiallyConst() const; |
453 virtual const Instance* EvalConstExpr() const { | 455 virtual const Instance* EvalConstExpr() const { |
454 return &literal(); | 456 return &literal(); |
455 } | 457 } |
456 | 458 |
457 virtual void VisitChildren(AstNodeVisitor* visitor) const { } | 459 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2019 const intptr_t try_index_; | 2021 const intptr_t try_index_; |
2020 | 2022 |
2021 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 2023 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
2022 }; | 2024 }; |
2023 | 2025 |
2024 } // namespace dart | 2026 } // namespace dart |
2025 | 2027 |
2026 #undef DECLARE_COMMON_NODE_FUNCTIONS | 2028 #undef DECLARE_COMMON_NODE_FUNCTIONS |
2027 | 2029 |
2028 #endif // VM_AST_H_ | 2030 #endif // VM_AST_H_ |
OLD | NEW |