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) {
}
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());
......
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