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

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

Issue 1026963002: Fix generation of context level descriptors (issue 22391). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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/scopes.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_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 12 matching lines...) Expand all
23 node->VisitChildren(this); 23 node->VisitChildren(this);
24 ISL_Print(")"); 24 ISL_Print(")");
25 } 25 }
26 26
27 27
28 void AstPrinter::VisitSequenceNode(SequenceNode* node) { 28 void AstPrinter::VisitSequenceNode(SequenceNode* node) {
29 indent_++; 29 indent_++;
30 LocalScope* scope = node->scope(); 30 LocalScope* scope = node->scope();
31 ISL_Print("(%s (scope \"%p\"", node->PrettyName(), scope); 31 ISL_Print("(%s (scope \"%p\"", node->PrettyName(), scope);
32 if (scope != NULL) { 32 if (scope != NULL) {
33 ISL_Print(" loop %d", scope->loop_level()); 33 ISL_Print(" (%d-%d) loop %d",
34 scope->begin_token_pos(),
35 scope->end_token_pos(),
36 scope->loop_level());
34 if (scope->HasContextLevel()) { 37 if (scope->HasContextLevel()) {
35 ISL_Print(" context %d captures %d", 38 ISL_Print(" context %d captures %d",
36 scope->context_level(), 39 scope->context_level(),
37 scope->num_context_variables()); 40 scope->num_context_variables());
38 } else { 41 } else {
39 ASSERT(scope->num_context_variables() == 0); 42 ASSERT(scope->num_context_variables() == 0);
40 } 43 }
41 } 44 }
42 ISL_Print(")"); 45 ISL_Print(")");
43 for (int i = 0; i < node->length(); ++i) { 46 for (int i = 0; i < node->length(); ++i) {
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 ASSERT(node_sequence != NULL); 562 ASSERT(node_sequence != NULL);
560 AstPrinter ast_printer; 563 AstPrinter ast_printer;
561 const char* function_name = 564 const char* function_name =
562 parsed_function.function().ToFullyQualifiedCString(); 565 parsed_function.function().ToFullyQualifiedCString();
563 ISL_Print("Ast for function '%s' {\n", function_name); 566 ISL_Print("Ast for function '%s' {\n", function_name);
564 node_sequence->Visit(&ast_printer); 567 node_sequence->Visit(&ast_printer);
565 ISL_Print("}\n"); 568 ISL_Print("}\n");
566 } 569 }
567 570
568 } // namespace dart 571 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698