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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 DISALLOW_IMPLICIT_CONSTRUCTORS(ArrayNode); | 303 DISALLOW_IMPLICIT_CONSTRUCTORS(ArrayNode); |
304 }; | 304 }; |
305 | 305 |
306 | 306 |
307 class LiteralNode : public AstNode { | 307 class LiteralNode : public AstNode { |
308 public: | 308 public: |
309 LiteralNode(intptr_t token_pos, const Instance& literal) | 309 LiteralNode(intptr_t token_pos, const Instance& literal) |
310 : AstNode(token_pos), literal_(literal) { | 310 : AstNode(token_pos), literal_(literal) { |
311 ASSERT(literal.IsZoneHandle()); | 311 ASSERT(literal.IsZoneHandle()); |
| 312 ASSERT(literal.IsSmi() || literal.IsOld()); |
312 #if defined(DEBUG) | 313 #if defined(DEBUG) |
313 if (literal.IsString()) { | 314 if (literal.IsString()) { |
314 ASSERT(String::Cast(literal).IsSymbol()); | 315 ASSERT(String::Cast(literal).IsSymbol()); |
315 } | 316 } |
316 #endif // defined(DEBUG) | 317 #endif // defined(DEBUG) |
317 ASSERT(literal.IsNull() || | 318 ASSERT(literal.IsNull() || |
318 Class::Handle(literal.clazz()).is_finalized() || | 319 Class::Handle(literal.clazz()).is_finalized() || |
319 Class::Handle(literal.clazz()).is_prefinalized()); | 320 Class::Handle(literal.clazz()).is_prefinalized()); |
320 } | 321 } |
321 | 322 |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 const LocalVariable& context_var_; | 1654 const LocalVariable& context_var_; |
1654 | 1655 |
1655 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1656 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
1656 }; | 1657 }; |
1657 | 1658 |
1658 } // namespace dart | 1659 } // namespace dart |
1659 | 1660 |
1660 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1661 #undef DECLARE_COMMON_NODE_FUNCTIONS |
1661 | 1662 |
1662 #endif // VM_AST_H_ | 1663 #endif // VM_AST_H_ |
OLD | NEW |