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

Unified Diff: src/ast/prettyprinter.cc

Issue 2142333002: Refactor class declaration logic to the parser and runtime Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup per Adam Created 4 years, 5 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
Index: src/ast/prettyprinter.cc
diff --git a/src/ast/prettyprinter.cc b/src/ast/prettyprinter.cc
index 4cf23c980cb0bb6de77bc415ab796e8be1410a98..85864dc782ad426fdafac96992d0f145193de5cd 100644
--- a/src/ast/prettyprinter.cc
+++ b/src/ast/prettyprinter.cc
@@ -218,14 +218,6 @@ void CallPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
}
-void CallPrinter::VisitClassLiteral(ClassLiteral* node) {
- if (node->extends()) Find(node->extends());
- for (int i = 0; i < node->properties()->length(); i++) {
- Find(node->properties()->at(i)->value());
- }
-}
-
-
void CallPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {}
@@ -735,21 +727,6 @@ void PrettyPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
}
-void PrettyPrinter::VisitClassLiteral(ClassLiteral* node) {
- Print("(class ");
- PrintLiteral(node->constructor()->name(), false);
- if (node->extends()) {
- Print(" extends ");
- Visit(node->extends());
- }
- Print(" { ");
- for (int i = 0; i < node->properties()->length(); i++) {
- PrintObjectLiteralProperty(node->properties()->at(i));
- }
- Print(" })");
-}
-
-
void PrettyPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {
Print("(");
PrintLiteral(node->name(), false);
@@ -1468,16 +1445,6 @@ void AstPrinter::VisitFunctionLiteral(FunctionLiteral* node) {
}
-void AstPrinter::VisitClassLiteral(ClassLiteral* node) {
- IndentedScope indent(this, "CLASS LITERAL", node->position());
- PrintLiteralIndented("NAME", node->constructor()->name(), false);
- if (node->extends() != nullptr) {
- PrintIndentedVisit("EXTENDS", node->extends());
- }
- PrintProperties(node->properties());
-}
-
-
void AstPrinter::PrintProperties(
ZoneList<ObjectLiteral::Property*>* properties) {
for (int i = 0; i < properties->length(); i++) {
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/bailout-reason.h » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698