Index: src/ast/ast-numbering.cc |
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc |
index 8a3d9430d4b1e421f3b31311d45721180a1295ac..4f9ffb2133ff54954c1a1819e1be6c296061c54e 100644 |
--- a/src/ast/ast-numbering.cc |
+++ b/src/ast/ast-numbering.cc |
@@ -579,6 +579,10 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { |
DisableCrankshaft(kRestParameter); |
} |
+ if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) { |
+ DisableOptimization(kGenerator); |
+ } |
+ |
VisitDeclarations(scope->declarations()); |
VisitStatements(node->body()); |