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

Unified Diff: src/prettyprinter.cc

Issue 7618007: Simplify handling of exits from with and catch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporate review comments Created 9 years, 4 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/parser.cc ('k') | src/rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/prettyprinter.cc
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
index f18b3203edc098ba4630c47006511ebb39e43d81..b03429341e3817ed0a4c85af813b858b07ef7836 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -123,11 +123,11 @@ void PrettyPrinter::VisitReturnStatement(ReturnStatement* node) {
}
-void PrettyPrinter::VisitEnterWithContextStatement(
- EnterWithContextStatement* node) {
- Print("<enter with context> (");
+void PrettyPrinter::VisitWithStatement(WithStatement* node) {
+ Print("with (");
Visit(node->expression());
Print(") ");
+ Visit(node->statement());
}
@@ -798,9 +798,10 @@ void AstPrinter::VisitReturnStatement(ReturnStatement* node) {
}
-void AstPrinter::VisitEnterWithContextStatement(
- EnterWithContextStatement* node) {
- PrintIndentedVisit("ENTER WITH CONTEXT", node->expression());
+void AstPrinter::VisitWithStatement(WithStatement* node) {
+ IndentedScope indent(this, "WITH");
+ PrintIndentedVisit("OBJECT", node->expression());
+ PrintIndentedVisit("BODY", node->statement());
}
@@ -1194,10 +1195,10 @@ void JsonAstBuilder::VisitReturnStatement(ReturnStatement* stmt) {
}
-void JsonAstBuilder::VisitEnterWithContextStatement(
- EnterWithContextStatement* stmt) {
- TagScope tag(this, "EnterWithContextStatement");
+void JsonAstBuilder::VisitWithStatement(WithStatement* stmt) {
+ TagScope tag(this, "WithStatement");
Visit(stmt->expression());
+ Visit(stmt->statement());
}
« no previous file with comments | « src/parser.cc ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698