Commit 552ba59e authored by neis's avatar neis Committed by Commit bot

[compiler] Remove bailout in ast-numbering's VisitYield.

It's sufficient to bailout when seeing that the function literal is a
generator or async function, as those are the only cases in which there can be
yields.

Also: add a comment on --turbo-from-bytecode and Ignition generators.

R=mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2060843002
Cr-Commit-Position: refs/heads/master@{#36930}
parent cdec5e8d
......@@ -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);
}
......
......@@ -267,8 +267,7 @@ namespace internal {
V(kWrongArgumentCountForInvokeIntrinsic, \
"Wrong number of arguments for intrinsic") \
V(kShouldNotDirectlyEnterOsrFunction, \
"Should not directly enter OSR-compiled function") \
V(kYield, "Yield")
"Should not directly enter OSR-compiled function")
#define ERROR_MESSAGES_CONSTANTS(C, T) C,
enum BailoutReason {
......
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