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

Unified Diff: runtime/vm/ast_printer.cc

Issue 9392020: Fix context unchaining (issue 5991015). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/code_generator_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast_printer.cc
===================================================================
--- runtime/vm/ast_printer.cc (revision 4199)
+++ runtime/vm/ast_printer.cc (working copy)
@@ -30,7 +30,9 @@
// CodeGeneratorContext.
ASSERT(node_sequence != NULL);
for (int i = 0; i < node_sequence->length(); i++) {
- OS::Print("id %d: ", node_sequence->NodeAt(i)->id());
+ OS::Print("id %d, scope 0x%x: ",
+ node_sequence->NodeAt(i)->id(),
+ node_sequence->scope());
node_sequence->NodeAt(i)->Visit(this);
OS::Print("\n");
}
@@ -239,7 +241,10 @@
void AstPrinter::VisitJumpNode(JumpNode* node) {
- OS::Print("(%s %s)", node->Name(), node->label()->name().ToCString());
+ OS::Print("(%s %s in scope 0x%x)",
+ node->Name(),
+ node->label()->name().ToCString(),
+ node->label()->owner());
}
@@ -421,7 +426,13 @@
}
const LocalScope* child = scope->child();
while (child != NULL) {
- OS::Print("{scope ");
+ OS::Print("{scope 0x%x ", child);
+ if (child->HasContextLevel()) {
+ OS::Print("ctx %d numctxvar %d ",
+ child->context_level(),
+ child->num_context_variables());
+ }
+ OS::Print("llev %d ", child->loop_level());
PrintLocalScope(child, 0);
OS::Print("}");
child = child->sibling();
@@ -439,7 +450,13 @@
const LocalScope* scope = node_sequence->scope();
ASSERT(scope != NULL);
const char* function_name = function.ToFullyQualifiedCString();
- OS::Print("Scope for function '%s' {\n", function_name);
+ OS::Print("Scope for function '%s' {scope 0x%x ", function_name, scope);
+ if (scope->HasContextLevel()) {
+ OS::Print("ctx %d numctxvar %d ",
+ scope->context_level(),
+ scope->num_context_variables());
+ }
+ OS::Print("llev %d ", scope->loop_level());
const int num_fixed_params = function.num_fixed_parameters();
const int num_opt_params = function.num_optional_parameters();
const int num_params = num_fixed_params + num_opt_params;
« no previous file with comments | « no previous file | runtime/vm/code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698