Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: runtime/vm/ast.h

Issue 10693071: Use VM type cast and save handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 }; 305 };
306 306
307 307
308 class LiteralNode : public AstNode { 308 class LiteralNode : public AstNode {
309 public: 309 public:
310 LiteralNode(intptr_t token_pos, const Instance& literal) 310 LiteralNode(intptr_t token_pos, const Instance& literal)
311 : AstNode(token_pos), literal_(literal) { 311 : AstNode(token_pos), literal_(literal) {
312 ASSERT(literal.IsZoneHandle()); 312 ASSERT(literal.IsZoneHandle());
313 #if defined(DEBUG) 313 #if defined(DEBUG)
314 if (literal.IsString()) { 314 if (literal.IsString()) {
315 String& str = String::Handle(); 315 ASSERT(String::Cast(literal).IsSymbol());
316 str ^= literal.raw();
317 ASSERT(str.IsSymbol());
318 } 316 }
319 #endif // defined(DEBUG) 317 #endif // defined(DEBUG)
320 ASSERT(literal.IsNull() || 318 ASSERT(literal.IsNull() ||
321 Class::Handle(literal.clazz()).is_finalized() || 319 Class::Handle(literal.clazz()).is_finalized() ||
322 Class::Handle(literal.clazz()).is_prefinalized()); 320 Class::Handle(literal.clazz()).is_prefinalized());
323 } 321 }
324 322
325 const Instance& literal() const { return literal_; } 323 const Instance& literal() const { return literal_; }
326 324
327 virtual const Instance* EvalConstExpr() const { 325 virtual const Instance* EvalConstExpr() const {
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 const LocalVariable& context_var_; 1674 const LocalVariable& context_var_;
1677 1675
1678 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1676 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1679 }; 1677 };
1680 1678
1681 } // namespace dart 1679 } // namespace dart
1682 1680
1683 #undef DECLARE_COMMON_NODE_FUNCTIONS 1681 #undef DECLARE_COMMON_NODE_FUNCTIONS
1684 1682
1685 #endif // VM_AST_H_ 1683 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698