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

Unified Diff: src/prettyprinter.cc

Issue 335293004: New try: Parser: Delay internalizing strings and values (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased (trivial) Created 6 years, 6 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') | 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 ecfb01541374b6734bf3cae93596db43119ec395..c0961f2c80fd90e70ce1ef5f27e044206fecd1f2 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -6,6 +6,7 @@
#include "src/v8.h"
+#include "src/ast-value-factory.h"
#include "src/platform.h"
#include "src/prettyprinter.h"
#include "src/scopes.h"
@@ -133,7 +134,7 @@ void PrettyPrinter::VisitIfStatement(IfStatement* node) {
void PrettyPrinter::VisitContinueStatement(ContinueStatement* node) {
Print("continue");
- ZoneStringList* labels = node->target()->labels();
+ ZoneList<const AstRawString*>* labels = node->target()->labels();
if (labels != NULL) {
Print(" ");
ASSERT(labels->length() > 0); // guaranteed to have at least one entry
@@ -145,7 +146,7 @@ void PrettyPrinter::VisitContinueStatement(ContinueStatement* node) {
void PrettyPrinter::VisitBreakStatement(BreakStatement* node) {
Print("break");
- ZoneStringList* labels = node->target()->labels();
+ ZoneList<const AstRawString*>* labels = node->target()->labels();
if (labels != NULL) {
Print(" ");
ASSERT(labels->length() > 0); // guaranteed to have at least one entry
@@ -524,7 +525,7 @@ void PrettyPrinter::PrintStatements(ZoneList<Statement*>* statements) {
}
-void PrettyPrinter::PrintLabels(ZoneStringList* labels) {
+void PrettyPrinter::PrintLabels(ZoneList<const AstRawString*>* labels) {
if (labels != NULL) {
for (int i = 0; i < labels->length(); i++) {
PrintLiteral(labels->at(i), false);
@@ -582,6 +583,11 @@ void PrettyPrinter::PrintLiteral(Handle<Object> value, bool quote) {
}
+void PrettyPrinter::PrintLiteral(const AstRawString* value, bool quote) {
+ PrintLiteral(value->string(), quote);
+}
+
+
void PrettyPrinter::PrintParameters(Scope* scope) {
Print("(");
for (int i = 0; i < scope->num_parameters(); i++) {
@@ -676,7 +682,7 @@ void AstPrinter::PrintLiteralWithModeIndented(const char* info,
}
-void AstPrinter::PrintLabelsIndented(ZoneStringList* labels) {
+void AstPrinter::PrintLabelsIndented(ZoneList<const AstRawString*>* labels) {
if (labels == NULL || labels->length() == 0) return;
PrintIndented("LABELS ");
PrintLabels(labels);
« no previous file with comments | « src/prettyprinter.h ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698