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

Unified Diff: src/prettyprinter.cc

Issue 1132005: Add iterative primitive type analysis.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/prettyprinter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/prettyprinter.cc
===================================================================
--- src/prettyprinter.cc (revision 4210)
+++ src/prettyprinter.cc (working copy)
@@ -668,7 +668,8 @@
Variable* var,
Handle<Object> value,
StaticType* type,
- int num) {
+ int num,
+ bool is_primitive) {
if (var == NULL) {
PrintLiteralIndented(info, value, true);
} else {
@@ -682,6 +683,8 @@
if (num != AstNode::kNoNumber) {
pos += OS::SNPrintF(buf + pos, ", num = %d", num);
}
+ pos += OS::SNPrintF(buf + pos,
+ is_primitive ? ", primitive" : ", non-primitive");
OS::SNPrintF(buf + pos, ")");
PrintLiteralIndented(buf.start(), value, true);
}
@@ -740,7 +743,8 @@
PrintLiteralWithModeIndented("VAR", scope->parameter(i),
scope->parameter(i)->name(),
scope->parameter(i)->type(),
- AstNode::kNoNumber);
+ AstNode::kNoNumber,
+ false);
}
}
}
@@ -786,7 +790,8 @@
node->proxy()->AsVariable(),
node->proxy()->name(),
node->proxy()->AsVariable()->type(),
- AstNode::kNoNumber);
+ AstNode::kNoNumber,
+ node->proxy()->IsPrimitive());
} else {
// function declarations
PrintIndented("FUNCTION ");
@@ -1022,7 +1027,7 @@
void AstPrinter::VisitVariableProxy(VariableProxy* node) {
PrintLiteralWithModeIndented("VAR PROXY", node->AsVariable(), node->name(),
- node->type(), node->num());
+ node->type(), node->num(), node->IsPrimitive());
Variable* var = node->var();
if (var != NULL && var->rewrite() != NULL) {
IndentedScope indent;
« no previous file with comments | « src/prettyprinter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698