Index: src/ast/ast-numbering.cc |
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc |
index 4f9ffb2133ff54954c1a1819e1be6c296061c54e..dd6ce4a6027214f59a0c83a49f74535c66060b8b 100644 |
--- a/src/ast/ast-numbering.cc |
+++ b/src/ast/ast-numbering.cc |
@@ -220,7 +220,6 @@ void AstNumberingVisitor::VisitYield(Yield* node) { |
node->set_yield_id(yield_count_); |
yield_count_++; |
IncrementNodeCount(); |
- DisableOptimization(kYield); |
ReserveFeedbackSlots(node); |
node->set_base_id(ReserveIdRange(Yield::num_ids())); |
Visit(node->generator_object()); |
@@ -580,6 +579,9 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { |
} |
if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) { |
+ // TODO(neis): We may want to allow Turbofan optimization here if |
+ // --turbo-from-bytecode is set and we know that Ignition is used. |
+ // Unfortunately we can't express that here. |
DisableOptimization(kGenerator); |
} |