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_; |