Index: src/prettyprinter.cc |
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc |
index 211f3f63602fa8ed46d590e46815a9ab2d4fb998..dda7abbb3f6de1641abaf27a76f0c5c13e969960 100644 |
--- a/src/prettyprinter.cc |
+++ b/src/prettyprinter.cc |
@@ -297,13 +297,13 @@ void PrettyPrinter::VisitSlot(Slot* node) { |
Print("parameter[%d]", node->index()); |
break; |
case Slot::LOCAL: |
- Print("frame[%d]", node->index()); |
+ Print("local[%d]", node->index()); |
break; |
case Slot::CONTEXT: |
- Print(".context[%d]", node->index()); |
+ Print("context[%d]", node->index()); |
break; |
case Slot::LOOKUP: |
- Print(".context["); |
+ Print("lookup["); |
PrintLiteral(node->var()->name(), false); |
Print("]"); |
break; |
@@ -999,24 +999,7 @@ void AstPrinter::VisitCatchExtensionObject(CatchExtensionObject* node) { |
void AstPrinter::VisitSlot(Slot* node) { |
PrintIndented("SLOT "); |
- switch (node->type()) { |
- case Slot::PARAMETER: |
- Print("parameter[%d]", node->index()); |
- break; |
- case Slot::LOCAL: |
- Print("frame[%d]", node->index()); |
- break; |
- case Slot::CONTEXT: |
- Print(".context[%d]", node->index()); |
- break; |
- case Slot::LOOKUP: |
- Print(".context["); |
- PrintLiteral(node->var()->name(), false); |
- Print("]"); |
- break; |
- default: |
- UNREACHABLE(); |
- } |
+ PrettyPrinter::VisitSlot(node); |
Print("\n"); |
} |