Commit d692f5e6 authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[turbofan] Two simplifications in TF handling of generators

Mark Runtime::kInlineGeneratorGetContext as not needing a FrameState
(matching the other Generator field-loading intrinsics) and avoid
a call to PrepareEagerCheckpoint() in VisitResumeGenerator() (since
there should never be a deopt during resume).

Change-Id: I03a2d89914bc7de27bbfe6228ca115e635ea4c4e
Reviewed-on: https://chromium-review.googlesource.com/506815Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45382}
parent b4a68235
......@@ -2295,8 +2295,6 @@ void BytecodeGraphBuilder::VisitSuspendGenerator() {
}
void BytecodeGraphBuilder::VisitResumeGenerator() {
PrepareEagerCheckpoint();
Node* generator = environment()->LookupRegister(
bytecode_iterator().GetRegisterOperand(0));
......@@ -2310,7 +2308,7 @@ void BytecodeGraphBuilder::VisitResumeGenerator() {
Node* state =
NewNode(javascript()->GeneratorRestoreContinuation(), generator);
environment()->BindAccumulator(state, Environment::kAttachFrameState);
environment()->BindAccumulator(state);
}
void BytecodeGraphBuilder::VisitWide() {
......
......@@ -176,6 +176,7 @@ bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
case Runtime::kInlineFixedArrayGet:
case Runtime::kInlineFixedArraySet:
case Runtime::kInlineGeneratorClose:
case Runtime::kInlineGeneratorGetContext:
case Runtime::kInlineGeneratorGetInputOrDebugPos:
case Runtime::kInlineGeneratorGetResumeMode:
case Runtime::kInlineCreateJSGeneratorObject:
......
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