| Index: src/prettyprinter.cc
|
| diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
|
| index 233d7c2fabeeb21567e4124cb0ef19a34b9c6f2e..1ff7356cafcb1863f7b910d4ebf9428231c79eec 100644
|
| --- a/src/prettyprinter.cc
|
| +++ b/src/prettyprinter.cc
|
| @@ -309,6 +309,16 @@ void PrettyPrinter::VisitLiteral(Literal* node) {
|
| }
|
|
|
|
|
| +void PrettyPrinter::VisitStringLiteral(StringLiteral* node) {
|
| + VisitLiteral(node);
|
| +}
|
| +
|
| +
|
| +void PrettyPrinter::VisitNumberLiteral(NumberLiteral* node) {
|
| + VisitLiteral(node);
|
| +}
|
| +
|
| +
|
| void PrettyPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
|
| Print(" RegExp(");
|
| PrintLiteral(node->pattern(), false);
|
| @@ -368,8 +378,8 @@ void PrettyPrinter::VisitThrow(Throw* node) {
|
|
|
| void PrettyPrinter::VisitProperty(Property* node) {
|
| Expression* key = node->key();
|
| - Literal* literal = key->AsLiteral();
|
| - if (literal != NULL && literal->value()->IsInternalizedString()) {
|
| + StringLiteral* literal = key->AsStringLiteral();
|
| + if (literal != NULL) {
|
| Print("(");
|
| Visit(node->obj());
|
| Print(").");
|
| @@ -978,6 +988,16 @@ void AstPrinter::VisitLiteral(Literal* node) {
|
| }
|
|
|
|
|
| +void AstPrinter::VisitStringLiteral(StringLiteral* node) {
|
| + VisitLiteral(node);
|
| +}
|
| +
|
| +
|
| +void AstPrinter::VisitNumberLiteral(NumberLiteral* node) {
|
| + VisitLiteral(node);
|
| +}
|
| +
|
| +
|
| void AstPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
|
| IndentedScope indent(this, "REGEXP LITERAL");
|
| PrintLiteralIndented("PATTERN", node->pattern(), false);
|
| @@ -1076,8 +1096,8 @@ void AstPrinter::VisitThrow(Throw* node) {
|
| void AstPrinter::VisitProperty(Property* node) {
|
| IndentedScope indent(this, "PROPERTY");
|
| Visit(node->obj());
|
| - Literal* literal = node->key()->AsLiteral();
|
| - if (literal != NULL && literal->value()->IsInternalizedString()) {
|
| + StringLiteral* literal = node->key()->AsStringLiteral();
|
| + if (literal != NULL) {
|
| PrintLiteralIndented("NAME", literal->value(), false);
|
| } else {
|
| PrintIndentedVisit("KEY", node->key());
|
|
|