| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 LiteralNode(intptr_t token_index, const Instance& literal) | 303 LiteralNode(intptr_t token_index, const Instance& literal) |
| 304 : AstNode(token_index), literal_(literal) { | 304 : AstNode(token_index), literal_(literal) { |
| 305 ASSERT(literal.IsZoneHandle()); | 305 ASSERT(literal.IsZoneHandle()); |
| 306 #if defined(DEBUG) | 306 #if defined(DEBUG) |
| 307 if (literal.IsString()) { | 307 if (literal.IsString()) { |
| 308 String& str = String::Handle(); | 308 String& str = String::Handle(); |
| 309 str ^= literal.raw(); | 309 str ^= literal.raw(); |
| 310 ASSERT(str.IsSymbol()); | 310 ASSERT(str.IsSymbol()); |
| 311 } | 311 } |
| 312 #endif // defined(DEBUG) | 312 #endif // defined(DEBUG) |
| 313 ASSERT(literal.IsNull() || Class::Handle(literal.clazz()).is_finalized()); | 313 ASSERT(literal.IsNull() || |
| 314 Class::Handle(literal.clazz()).is_finalized() || |
| 315 Class::Handle(literal.clazz()).is_prefinalized()); |
| 314 } | 316 } |
| 315 | 317 |
| 316 const Instance& literal() const { return literal_; } | 318 const Instance& literal() const { return literal_; } |
| 317 | 319 |
| 318 virtual const Instance* EvalConstExpr() const { | 320 virtual const Instance* EvalConstExpr() const { |
| 319 return &literal(); | 321 return &literal(); |
| 320 } | 322 } |
| 321 | 323 |
| 322 virtual void VisitChildren(AstNodeVisitor* visitor) const { } | 324 virtual void VisitChildren(AstNodeVisitor* visitor) const { } |
| 323 | 325 |
| (...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 const LocalVariable& context_var_; | 1866 const LocalVariable& context_var_; |
| 1865 | 1867 |
| 1866 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1868 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1867 }; | 1869 }; |
| 1868 | 1870 |
| 1869 } // namespace dart | 1871 } // namespace dart |
| 1870 | 1872 |
| 1871 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1873 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1872 | 1874 |
| 1873 #endif // VM_AST_H_ | 1875 #endif // VM_AST_H_ |
| OLD | NEW |