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

Unified Diff: src/ast/ast-numbering.cc

Issue 2302643002: Split the AST representation of class properties from object properties (Closed)
Patch Set: rebase Created 4 years, 3 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/ast/ast-literal-reindexer.cc ('k') | src/ast/ast-traversal-visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-numbering.cc
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
index 96f138241f0c2dce36472543c3487ee08836a370..d0101828d6897f99c91e069024460c4aae10ebf6 100644
--- a/src/ast/ast-numbering.cc
+++ b/src/ast/ast-numbering.cc
@@ -39,7 +39,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
void VisitStatements(ZoneList<Statement*>* statements);
void VisitDeclarations(ZoneList<Declaration*>* declarations);
void VisitArguments(ZoneList<Expression*>* arguments);
- void VisitObjectLiteralProperty(ObjectLiteralProperty* property);
+ void VisitLiteralProperty(LiteralProperty* property);
int ReserveIdRange(int n) {
int tmp = next_id_;
@@ -464,7 +464,7 @@ void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) {
VisitVariableProxy(node->class_variable_proxy());
}
for (int i = 0; i < node->properties()->length(); i++) {
- VisitObjectLiteralProperty(node->properties()->at(i));
+ VisitLiteralProperty(node->properties()->at(i));
}
ReserveFeedbackSlots(node);
}
@@ -474,7 +474,7 @@ void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(node->num_ids()));
for (int i = 0; i < node->properties()->length(); i++) {
- VisitObjectLiteralProperty(node->properties()->at(i));
+ VisitLiteralProperty(node->properties()->at(i));
}
node->BuildConstantProperties(isolate_);
// Mark all computed expressions that are bound to a key that
@@ -484,15 +484,12 @@ void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
ReserveFeedbackSlots(node);
}
-
-void AstNumberingVisitor::VisitObjectLiteralProperty(
- ObjectLiteralProperty* node) {
+void AstNumberingVisitor::VisitLiteralProperty(LiteralProperty* node) {
if (node->is_computed_name()) DisableCrankshaft(kComputedPropertyName);
Visit(node->key());
Visit(node->value());
}
-
void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(node->num_ids()));
« no previous file with comments | « src/ast/ast-literal-reindexer.cc ('k') | src/ast/ast-traversal-visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698