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

Unified Diff: runtime/vm/ast_printer.cc

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/class_finalizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast_printer.cc
diff --git a/runtime/vm/ast_printer.cc b/runtime/vm/ast_printer.cc
index 70c5f84f3076d0e68495a1216a04dd72665949b2..b38b6108ee21fbb04508714a51310166a3e5424f 100644
--- a/runtime/vm/ast_printer.cc
+++ b/runtime/vm/ast_printer.cc
@@ -30,7 +30,7 @@ void AstPrinter::VisitSequenceNode(SequenceNode* node_sequence) {
// CodeGeneratorContext.
ASSERT(node_sequence != NULL);
for (int i = 0; i < node_sequence->length(); i++) {
- OS::Print("scope 0x%x: ",
+ OS::Print("scope %p: ",
node_sequence->scope());
node_sequence->NodeAt(i)->Visit(this);
OS::Print("\n");
@@ -50,7 +50,7 @@ void AstPrinter::VisitArgumentListNode(ArgumentListNode* arguments) {
void AstPrinter::VisitArgumentDefinitionTestNode(
ArgumentDefinitionTestNode* node) {
- OS::Print("(%s ?%s @%d)",
+ OS::Print("(%s ?%s @%"Pd")",
node->Name(),
node->formal_parameter_name().ToCString(),
node->formal_parameter_index());
@@ -244,7 +244,7 @@ void AstPrinter::VisitDoWhileNode(DoWhileNode* node) {
void AstPrinter::VisitJumpNode(JumpNode* node) {
- OS::Print("(%s %s in scope 0x%x)",
+ OS::Print("(%s %s in scope %p)",
node->Name(),
node->label()->name().ToCString(),
node->label()->owner());
@@ -405,11 +405,13 @@ void AstPrinter::PrintLocalScope(const LocalScope* scope,
} else if (var->owner()->function_level() != 0) {
OS::Print(" lev %d", var->owner()->function_level());
}
- OS::Print(" valid %d-%d)", var->token_pos(), scope->end_token_pos());
+ OS::Print(" valid %"Pd"-%"Pd")",
+ var->token_pos(),
+ scope->end_token_pos());
}
const LocalScope* child = scope->child();
while (child != NULL) {
- OS::Print("{scope 0x%x ", child);
+ OS::Print("{scope %p ", child);
if (child->HasContextLevel()) {
OS::Print("ctx %d numctxvar %d ",
child->context_level(),
@@ -433,7 +435,7 @@ void AstPrinter::PrintFunctionScope(const ParsedFunction& parsed_function) {
const LocalScope* scope = node_sequence->scope();
ASSERT(scope != NULL);
const char* function_name = function.ToFullyQualifiedCString();
- OS::Print("Scope for function '%s' {scope 0x%x ", function_name, scope);
+ OS::Print("Scope for function '%s' {scope %p ", function_name, scope);
if (scope->HasContextLevel()) {
OS::Print("ctx %d numctxvar %d ",
scope->context_level(),
@@ -465,7 +467,9 @@ void AstPrinter::PrintFunctionScope(const ParsedFunction& parsed_function) {
OS::Print(" ctx %d", param->owner()->context_level());
}
}
- OS::Print(" valid %d-%d)", param->token_pos(), scope->end_token_pos());
+ OS::Print(" valid %"Pd"-%"Pd")",
+ param->token_pos(),
+ scope->end_token_pos());
pos++;
}
// Visit remaining non-parameter variables and children scopes.
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/class_finalizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698