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

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

Issue 1308163006: Reduce the number of captured variables in async code, by only capturing local (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 3 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
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_transformer.h » ('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_printer.h" 5 #include "vm/ast_printer.h"
6 6
7 #include "vm/handles.h" 7 #include "vm/handles.h"
8 #include "vm/log.h" 8 #include "vm/log.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 ISL_Print("(%s (type \"%s\") (of \"%s\") ", 184 ISL_Print("(%s (type \"%s\") (of \"%s\") ",
185 node->PrettyName(), 185 node->PrettyName(),
186 String::Handle(type.Name()).ToCString(), 186 String::Handle(type.Name()).ToCString(),
187 dst_name.ToCString()); 187 dst_name.ToCString());
188 node->VisitChildren(this); 188 node->VisitChildren(this);
189 ISL_Print(")"); 189 ISL_Print(")");
190 } 190 }
191 191
192 192
193 void AstPrinter::VisitAwaitNode(AwaitNode* node) { 193 void AstPrinter::VisitAwaitNode(AwaitNode* node) {
194 VisitGenericAstNode(node); 194 ISL_Print("(*****%s***** (scope \"%p\") ", node->PrettyName(), node->scope());
195 node->VisitChildren(this);
196 ISL_Print(")");
195 } 197 }
196 198
197 199
198 void AstPrinter::VisitAwaitMarkerNode(AwaitMarkerNode* node) { 200 void AstPrinter::VisitAwaitMarkerNode(AwaitMarkerNode* node) {
199 VisitGenericAstNode(node); 201 ISL_Print("(%s (async_scope \"%p\" await_scope \"%p\"))",
202 node->PrettyName(),
203 node->async_scope(),
204 node->await_scope());
200 } 205 }
201 206
202 207
203 void AstPrinter::VisitPrimaryNode(PrimaryNode* node) { 208 void AstPrinter::VisitPrimaryNode(PrimaryNode* node) {
204 ISL_Print("*****%s***** \"%s\")", 209 ISL_Print("(*****%s***** \"%s\")",
205 node->PrettyName(), 210 node->PrettyName(),
206 node->primary().ToCString()); 211 node->primary().ToCString());
207 } 212 }
208 213
209 214
210 void AstPrinter::VisitComparisonNode(ComparisonNode* node) { 215 void AstPrinter::VisitComparisonNode(ComparisonNode* node) {
211 ISL_Print("(%s %s ", node->PrettyName(), node->TokenName()); 216 ISL_Print("(%s %s ", node->PrettyName(), node->TokenName());
212 node->VisitChildren(this); 217 node->VisitChildren(this);
213 ISL_Print(")"); 218 ISL_Print(")");
214 } 219 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 ASSERT(node_sequence != NULL); 568 ASSERT(node_sequence != NULL);
564 AstPrinter ast_printer; 569 AstPrinter ast_printer;
565 const char* function_name = 570 const char* function_name =
566 parsed_function.function().ToFullyQualifiedCString(); 571 parsed_function.function().ToFullyQualifiedCString();
567 ISL_Print("Ast for function '%s' {\n", function_name); 572 ISL_Print("Ast for function '%s' {\n", function_name);
568 node_sequence->Visit(&ast_printer); 573 node_sequence->Visit(&ast_printer);
569 ISL_Print("}\n"); 574 ISL_Print("}\n");
570 } 575 }
571 576
572 } // namespace dart 577 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_transformer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698