Index: src/prettyprinter.cc |
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc |
index 60288a969b59e1dfeee1b762a7843fff37bccce4..0149ed51e29b40c47586c744628a147755a05234 100644 |
--- a/src/prettyprinter.cc |
+++ b/src/prettyprinter.cc |
@@ -1,4 +1,4 @@ |
-// Copyright 2006-2008 the V8 project authors. All rights reserved. |
+// Copyright 2011 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -201,7 +201,8 @@ void PrettyPrinter::VisitTryCatchStatement(TryCatchStatement* node) { |
Print("try "); |
Visit(node->try_block()); |
Print(" catch ("); |
- Visit(node->catch_var()); |
+ const bool quote = false; |
+ PrintLiteral(node->name(), quote); |
Print(") "); |
Visit(node->catch_block()); |
} |
@@ -282,15 +283,6 @@ void PrettyPrinter::VisitArrayLiteral(ArrayLiteral* node) { |
} |
-void PrettyPrinter::VisitCatchExtensionObject(CatchExtensionObject* node) { |
- Print("{ "); |
- Visit(node->key()); |
- Print(": "); |
- Visit(node->value()); |
- Print(" }"); |
-} |
- |
- |
void PrettyPrinter::VisitSlot(Slot* node) { |
switch (node->type()) { |
case Slot::PARAMETER: |
@@ -862,7 +854,8 @@ void AstPrinter::VisitForInStatement(ForInStatement* node) { |
void AstPrinter::VisitTryCatchStatement(TryCatchStatement* node) { |
IndentedScope indent(this, "TRY CATCH"); |
PrintIndentedVisit("TRY", node->try_block()); |
- PrintIndentedVisit("CATCHVAR", node->catch_var()); |
+ const bool quote = false; |
+ PrintLiteralIndented("CATCHVAR", node->name(), quote); |
PrintIndentedVisit("CATCH", node->catch_block()); |
} |
@@ -962,13 +955,6 @@ void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) { |
} |
-void AstPrinter::VisitCatchExtensionObject(CatchExtensionObject* node) { |
- IndentedScope indent(this, "CatchExtensionObject"); |
- PrintIndentedVisit("KEY", node->key()); |
- PrintIndentedVisit("VALUE", node->value()); |
-} |
- |
- |
void AstPrinter::VisitSlot(Slot* node) { |
PrintIndented("SLOT "); |
PrettyPrinter::VisitSlot(node); |
@@ -1254,8 +1240,10 @@ void JsonAstBuilder::VisitForInStatement(ForInStatement* stmt) { |
void JsonAstBuilder::VisitTryCatchStatement(TryCatchStatement* stmt) { |
TagScope tag(this, "TryCatchStatement"); |
+ { AttributesScope attributes(this); |
+ AddAttribute("variable", stmt->name()); |
+ } |
Visit(stmt->try_block()); |
- Visit(stmt->catch_var()); |
Visit(stmt->catch_block()); |
} |
@@ -1360,13 +1348,6 @@ void JsonAstBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
} |
-void JsonAstBuilder::VisitCatchExtensionObject(CatchExtensionObject* expr) { |
- TagScope tag(this, "CatchExtensionObject"); |
- Visit(expr->key()); |
- Visit(expr->value()); |
-} |
- |
- |
void JsonAstBuilder::VisitAssignment(Assignment* expr) { |
TagScope tag(this, "Assignment"); |
{ |