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

Unified Diff: src/ast-expression-visitor.cc

Issue 1414733005: [es6] Handle super properly when rewriting arrow parameter initializers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 2 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 | « no previous file | test/mjsunit/harmony/regress/regress-4395.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-expression-visitor.cc
diff --git a/src/ast-expression-visitor.cc b/src/ast-expression-visitor.cc
index 7656420614826359fe0722dd959f073348e62ef7..e38b444699bb01af8a9079a60767f40f8efe604d 100644
--- a/src/ast-expression-visitor.cc
+++ b/src/ast-expression-visitor.cc
@@ -378,10 +378,19 @@ void AstExpressionVisitor::VisitEmptyParentheses(EmptyParentheses* expr) {}
void AstExpressionVisitor::VisitSuperPropertyReference(
- SuperPropertyReference* expr) {}
+ SuperPropertyReference* expr) {
+ VisitExpression(expr);
+ RECURSE_EXPRESSION(VisitVariableProxy(expr->this_var()));
+ RECURSE_EXPRESSION(Visit(expr->home_object()));
+}
-void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) {}
+void AstExpressionVisitor::VisitSuperCallReference(SuperCallReference* expr) {
+ VisitExpression(expr);
+ RECURSE_EXPRESSION(VisitVariableProxy(expr->this_var()));
+ RECURSE_EXPRESSION(VisitVariableProxy(expr->new_target_var()));
+ RECURSE_EXPRESSION(VisitVariableProxy(expr->this_function_var()));
+}
} // namespace internal
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-4395.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698