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

Unified Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 2504223002: [fullcodegen] Remove deprecated generator implementation. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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 | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x87/full-codegen-x87.cc
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
index 26027c3a0b589d2613223d3ccfcd8fc47ebe4b7e..95167516b8e77b71a162864fdd67323ad5da61d1 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -1669,56 +1669,8 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
void FullCodeGenerator::VisitYield(Yield* expr) {
- Comment cmnt(masm_, "[ Yield");
- SetExpressionPosition(expr);
-
- // Evaluate yielded value first; the initial iterator definition depends on
- // this. It stays on the stack while we update the iterator.
- VisitForStackValue(expr->expression());
-
- Label suspend, continuation, post_runtime, resume, exception;
-
- __ jmp(&suspend);
- __ bind(&continuation);
- // When we arrive here, eax holds the generator object.
- __ RecordGeneratorContinuation();
- __ mov(ebx, FieldOperand(eax, JSGeneratorObject::kResumeModeOffset));
- __ mov(eax, FieldOperand(eax, JSGeneratorObject::kInputOrDebugPosOffset));
- STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn);
- STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn);
- __ cmp(ebx, Immediate(Smi::FromInt(JSGeneratorObject::kReturn)));
- __ j(less, &resume);
- __ Push(result_register());
- __ j(greater, &exception);
- EmitCreateIteratorResult(true);
- EmitUnwindAndReturn();
-
- __ bind(&exception);
- __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow
- : Runtime::kThrow);
-
- __ bind(&suspend);
- OperandStackDepthIncrement(1); // Not popped on this path.
- VisitForAccumulatorValue(expr->generator_object());
- DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
- __ mov(FieldOperand(eax, JSGeneratorObject::kContinuationOffset),
- Immediate(Smi::FromInt(continuation.pos())));
- __ mov(FieldOperand(eax, JSGeneratorObject::kContextOffset), esi);
- __ mov(ecx, esi);
- __ RecordWriteField(eax, JSGeneratorObject::kContextOffset, ecx, edx,
- kDontSaveFPRegs);
- __ lea(ebx, Operand(ebp, StandardFrameConstants::kExpressionsOffset));
- __ cmp(esp, ebx);
- __ j(equal, &post_runtime);
- __ push(eax); // generator object
- __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
- RestoreContext();
- __ bind(&post_runtime);
- PopOperand(result_register());
- EmitReturnSequence();
-
- __ bind(&resume);
- context()->Plug(result_register());
+ // Resumable functions are not supported.
+ UNREACHABLE();
}
void FullCodeGenerator::PushOperand(MemOperand operand) {
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698