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

Unified Diff: src/ast/ast-numbering.cc

Issue 2353793003: [turbofan] Ship generators if --turbo-from-bytecode set. (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-numbering.cc
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
index 6de950161867257d0006407550fab84c35e6849a..e1b11f655a844f2f92f9557db9c85bd7215a8e4d 100644
--- a/src/ast/ast-numbering.cc
+++ b/src/ast/ast-numbering.cc
@@ -592,10 +592,12 @@ 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);
+ // Generators can be optimized if --turbo-from-bytecode is set.
+ if (FLAG_turbo_from_bytecode) {
+ DisableCrankshaft(kGenerator);
+ } else {
+ DisableOptimization(kGenerator);
+ }
}
VisitDeclarations(scope->declarations());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698