Commit b88df1c9 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Ship generators if --turbo-from-bytecode set.

This makes sure generator functions are marked as optimizable for all
configurations where the BytecodeGraphBuilder is used. Note that as
usual AstNumbering is just a heuristic and the underlying compiler can
still bailout from optimization when the compilation pipeline chooses
another compiler that does not support generator functions.

R=bmeurer@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2353793003
Cr-Commit-Position: refs/heads/master@{#39553}
parent 10b023c1
...@@ -592,10 +592,12 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { ...@@ -592,10 +592,12 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
} }
if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) { if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) {
// TODO(neis): We may want to allow Turbofan optimization here if // Generators can be optimized if --turbo-from-bytecode is set.
// --turbo-from-bytecode is set and we know that Ignition is used. if (FLAG_turbo_from_bytecode) {
// Unfortunately we can't express that here. DisableCrankshaft(kGenerator);
DisableOptimization(kGenerator); } else {
DisableOptimization(kGenerator);
}
} }
VisitDeclarations(scope->declarations()); VisitDeclarations(scope->declarations());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment