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

Unified Diff: src/parsing/parser.cc

Issue 1864553002: [destructuring] don't attempt to visit contents of FunctionLiterals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: and add a comment explaining why Created 4 years, 8 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/es6/regress/regress-594084.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 338d5dccdc761bfde44941b89fc060bd31368dd4..09f405704b1525093c4b36d3f756bc5443d8181a 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -4394,7 +4394,7 @@ class InitializerRewriter : public AstExpressionVisitor {
scope_(scope) {}
private:
- void VisitExpression(Expression* expr) {
+ void VisitExpression(Expression* expr) override {
RewritableExpression* to_rewrite = expr->AsRewritableExpression();
if (to_rewrite == nullptr || to_rewrite->is_rewritten()) return;
@@ -4402,6 +4402,10 @@ class InitializerRewriter : public AstExpressionVisitor {
scope_);
}
+ // Code in function literals does not need to be eagerly rewritten, it will be
+ // rewritten when scheduled.
+ void VisitFunctionLiteral(FunctionLiteral* expr) override {}
+
private:
Parser* parser_;
Scope* scope_;
« no previous file with comments | « no previous file | test/mjsunit/es6/regress/regress-594084.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698