| Index: src/prettyprinter.cc
|
| diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
|
| index 043ad1ca48ab86b6be30939ca213e1fae9980a36..f2f7fad4d7fca89bfd636fdd78a3fba4b70e6e44 100644
|
| --- a/src/prettyprinter.cc
|
| +++ b/src/prettyprinter.cc
|
| @@ -609,16 +609,6 @@ class IndentedScope BASE_EMBEDDED {
|
| IndentedScope(AstPrinter* printer, const char* txt, AstNode* node = NULL)
|
| : ast_printer_(printer) {
|
| ast_printer_->PrintIndented(txt);
|
| - if (node != NULL && node->AsExpression() != NULL) {
|
| - Expression* expr = node->AsExpression();
|
| - bool printed_first = false;
|
| - if ((expr->type() != NULL) && (expr->type()->IsKnown())) {
|
| - ast_printer_->Print(" (type = ");
|
| - ast_printer_->Print(StaticType::Type2String(expr->type()));
|
| - printed_first = true;
|
| - }
|
| - if (printed_first) ast_printer_->Print(")");
|
| - }
|
| ast_printer_->Print("\n");
|
| ast_printer_->inc_indent();
|
| }
|
| @@ -664,18 +654,13 @@ void AstPrinter::PrintLiteralIndented(const char* info,
|
|
|
| void AstPrinter::PrintLiteralWithModeIndented(const char* info,
|
| Variable* var,
|
| - Handle<Object> value,
|
| - StaticType* type) {
|
| + Handle<Object> value) {
|
| if (var == NULL) {
|
| PrintLiteralIndented(info, value, true);
|
| } else {
|
| EmbeddedVector<char, 256> buf;
|
| int pos = OS::SNPrintF(buf, "%s (mode = %s", info,
|
| Variable::Mode2String(var->mode()));
|
| - if (type->IsKnown()) {
|
| - pos += OS::SNPrintF(buf + pos, ", type = %s",
|
| - StaticType::Type2String(type));
|
| - }
|
| OS::SNPrintF(buf + pos, ")");
|
| PrintLiteralIndented(buf.start(), value, true);
|
| }
|
| @@ -732,8 +717,7 @@ void AstPrinter::PrintParameters(Scope* scope) {
|
| IndentedScope indent(this, "PARAMS");
|
| for (int i = 0; i < scope->num_parameters(); i++) {
|
| PrintLiteralWithModeIndented("VAR", scope->parameter(i),
|
| - scope->parameter(i)->name(),
|
| - scope->parameter(i)->type());
|
| + scope->parameter(i)->name());
|
| }
|
| }
|
| }
|
| @@ -777,8 +761,7 @@ void AstPrinter::VisitDeclaration(Declaration* node) {
|
| // var or const declarations
|
| PrintLiteralWithModeIndented(Variable::Mode2String(node->mode()),
|
| node->proxy()->AsVariable(),
|
| - node->proxy()->name(),
|
| - node->proxy()->AsVariable()->type());
|
| + node->proxy()->name());
|
| } else {
|
| // function declarations
|
| PrintIndented("FUNCTION ");
|
| @@ -996,8 +979,7 @@ void AstPrinter::VisitSlot(Slot* node) {
|
|
|
|
|
| void AstPrinter::VisitVariableProxy(VariableProxy* node) {
|
| - PrintLiteralWithModeIndented("VAR PROXY", node->AsVariable(), node->name(),
|
| - node->type());
|
| + PrintLiteralWithModeIndented("VAR PROXY", node->AsVariable(), node->name());
|
| Variable* var = node->var();
|
| if (var != NULL && var->rewrite() != NULL) {
|
| IndentedScope indent(this);
|
| @@ -1063,15 +1045,8 @@ void AstPrinter::VisitIncrementOperation(IncrementOperation* node) {
|
|
|
| void AstPrinter::VisitCountOperation(CountOperation* node) {
|
| EmbeddedVector<char, 128> buf;
|
| - if (node->type()->IsKnown()) {
|
| - OS::SNPrintF(buf, "%s %s (type = %s)",
|
| - (node->is_prefix() ? "PRE" : "POST"),
|
| - Token::Name(node->op()),
|
| - StaticType::Type2String(node->type()));
|
| - } else {
|
| - OS::SNPrintF(buf, "%s %s", (node->is_prefix() ? "PRE" : "POST"),
|
| - Token::Name(node->op()));
|
| - }
|
| + OS::SNPrintF(buf, "%s %s", (node->is_prefix() ? "PRE" : "POST"),
|
| + Token::Name(node->op()));
|
| PrintIndentedVisit(buf.start(), node->expression());
|
| }
|
|
|
|
|