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

Unified Diff: src/prettyprinter.cc

Issue 11093074: Get rid of static module allocation, do it in code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comments; added other back-ends Created 8 years, 1 month 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/property-details.h » ('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 0d8dadce1a0257f7eef04fe12ade67cd157dd62c..602fbb40b9840178da9da9c48c24483f72daa26f 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -122,6 +122,14 @@ void PrettyPrinter::VisitModuleUrl(ModuleUrl* node) {
}
+void PrettyPrinter::VisitModuleStatement(ModuleStatement* node) {
+ Print("module ");
+ PrintLiteral(node->proxy()->name(), false);
+ Print(" ");
+ Visit(node->body());
+}
+
+
void PrettyPrinter::VisitExpressionStatement(ExpressionStatement* node) {
Visit(node->expression());
Print(";");
@@ -822,6 +830,13 @@ void AstPrinter::VisitModuleUrl(ModuleUrl* node) {
}
+void AstPrinter::VisitModuleStatement(ModuleStatement* node) {
+ IndentedScope indent(this, "MODULE");
+ PrintLiteralIndented("NAME", node->proxy()->name(), true);
+ PrintStatements(node->body()->statements());
+}
+
+
void AstPrinter::VisitExpressionStatement(ExpressionStatement* node) {
Visit(node->expression());
}
« no previous file with comments | « src/parser.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698