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

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

Issue 23072026: fix cpp11 compile errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/allocation.cc ('k') | runtime/vm/ast_printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "vm/ast.h" 5 #include "vm/ast.h"
6 #include "vm/compiler.h" 6 #include "vm/compiler.h"
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/resolver.h" 10 #include "vm/resolver.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 LetNode::LetNode(intptr_t token_pos) 76 LetNode::LetNode(intptr_t token_pos)
77 : AstNode(token_pos), 77 : AstNode(token_pos),
78 vars_(1), 78 vars_(1),
79 initializers_(1), 79 initializers_(1),
80 nodes_(1) { } 80 nodes_(1) { }
81 81
82 82
83 LocalVariable* LetNode::AddInitializer(AstNode* node) { 83 LocalVariable* LetNode::AddInitializer(AstNode* node) {
84 initializers_.Add(node); 84 initializers_.Add(node);
85 char name[64]; 85 char name[64];
86 OS::SNPrint(name, sizeof(name), ":lt%"Pd"_%d", token_pos(), vars_.length()); 86 OS::SNPrint(name, sizeof(name), ":lt%" Pd "_%d", token_pos(), vars_.length());
87 LocalVariable* temp_var = 87 LocalVariable* temp_var =
88 new LocalVariable(token_pos(), 88 new LocalVariable(token_pos(),
89 String::ZoneHandle(Symbols::New(name)), 89 String::ZoneHandle(Symbols::New(name)),
90 Type::ZoneHandle(Type::DynamicType())); 90 Type::ZoneHandle(Type::DynamicType()));
91 vars_.Add(temp_var); 91 vars_.Add(temp_var);
92 return temp_var; 92 return temp_var;
93 } 93 }
94 94
95 95
96 void LetNode::VisitChildren(AstNodeVisitor* visitor) const { 96 void LetNode::VisitChildren(AstNodeVisitor* visitor) const {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 if (result.IsError() || result.IsNull()) { 555 if (result.IsError() || result.IsNull()) {
556 // TODO(turnidge): We could get better error messages by returning 556 // TODO(turnidge): We could get better error messages by returning
557 // the Error object directly to the parser. This will involve 557 // the Error object directly to the parser. This will involve
558 // replumbing all of the EvalConstExpr methods. 558 // replumbing all of the EvalConstExpr methods.
559 return NULL; 559 return NULL;
560 } 560 }
561 return &Instance::ZoneHandle(Instance::Cast(result).raw()); 561 return &Instance::ZoneHandle(Instance::Cast(result).raw());
562 } 562 }
563 563
564 } // namespace dart 564 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/ast_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698