| Index: src/prettyprinter.cc
|
| diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
|
| index 233d7c2fabeeb21567e4124cb0ef19a34b9c6f2e..4608923ee0604cc8cfbe2d2a7afdd8b27217f09a 100644
|
| --- a/src/prettyprinter.cc
|
| +++ b/src/prettyprinter.cc
|
| @@ -133,7 +133,7 @@ void PrettyPrinter::VisitIfStatement(IfStatement* node) {
|
|
|
| void PrettyPrinter::VisitContinueStatement(ContinueStatement* node) {
|
| Print("continue");
|
| - ZoneStringList* labels = node->target()->labels();
|
| + ZoneList<ParserSymbolTable::Symbol*>* labels = node->target()->labels();
|
| if (labels != NULL) {
|
| Print(" ");
|
| ASSERT(labels->length() > 0); // guaranteed to have at least one entry
|
| @@ -145,7 +145,7 @@ void PrettyPrinter::VisitContinueStatement(ContinueStatement* node) {
|
|
|
| void PrettyPrinter::VisitBreakStatement(BreakStatement* node) {
|
| Print("break");
|
| - ZoneStringList* labels = node->target()->labels();
|
| + ZoneList<ParserSymbolTable::Symbol*>* labels = node->target()->labels();
|
| if (labels != NULL) {
|
| Print(" ");
|
| ASSERT(labels->length() > 0); // guaranteed to have at least one entry
|
| @@ -524,7 +524,7 @@ void PrettyPrinter::PrintStatements(ZoneList<Statement*>* statements) {
|
| }
|
|
|
|
|
| -void PrettyPrinter::PrintLabels(ZoneStringList* labels) {
|
| +void PrettyPrinter::PrintLabels(ZoneList<ParserSymbolTable::Symbol*>* labels) {
|
| if (labels != NULL) {
|
| for (int i = 0; i < labels->length(); i++) {
|
| PrintLiteral(labels->at(i), false);
|
| @@ -582,6 +582,13 @@ void PrettyPrinter::PrintLiteral(Handle<Object> value, bool quote) {
|
| }
|
|
|
|
|
| +void PrettyPrinter::PrintLiteral(ParserSymbolTable::Symbol* value, bool quote) {
|
| + if (quote) Print("\"");
|
| + Print("%.*s", value->literal_bytes.length(), value->literal_bytes.start());
|
| + if (quote) Print("\"");
|
| +}
|
| +
|
| +
|
| void PrettyPrinter::PrintParameters(Scope* scope) {
|
| Print("(");
|
| for (int i = 0; i < scope->num_parameters(); i++) {
|
| @@ -676,7 +683,7 @@ void AstPrinter::PrintLiteralWithModeIndented(const char* info,
|
| }
|
|
|
|
|
| -void AstPrinter::PrintLabelsIndented(ZoneStringList* labels) {
|
| +void AstPrinter::PrintLabelsIndented(ZoneList<ParserSymbolTable::Symbol*>* labels) {
|
| if (labels == NULL || labels->length() == 0) return;
|
| PrintIndented("LABELS ");
|
| PrintLabels(labels);
|
|
|