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

Unified Diff: src/x87/builtins-x87.cc

Issue 1893943002: X87: [generators] Store the resume mode in the generator object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months 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/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
index 4a49dfaa2c7d90f6159f16284ecf03313bf1a70e..83a567ac046bba6a80b5412a78ea10efd47c1f8b 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/x87/builtins-x87.cc
@@ -407,6 +407,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(ebx, JSGeneratorObject::kInputOffset, eax, ecx,
kDontSaveFPRegs);
+ // Store resume mode into generator object.
+ __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx);
+
// Load suspended function and context.
__ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset));
__ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset));
@@ -485,16 +488,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&done_loop);
}
- // Push resume mode (consumed in continuation).
- __ Push(edx);
-
// Reset operand stack so we don't leak.
__ mov(FieldOperand(ebx, JSGeneratorObject::kOperandStackOffset),
Immediate(masm->isolate()->factory()->empty_fixed_array()));
- // Restore value.
- __ mov(eax, FieldOperand(ebx, JSGeneratorObject::kInputOffset));
-
// Resume the generator function at the continuation.
__ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
__ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset));
@@ -503,6 +500,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ lea(edx, FieldOperand(edx, ecx, times_1, Code::kHeaderSize));
__ mov(FieldOperand(ebx, JSGeneratorObject::kContinuationOffset),
Immediate(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)));
+ __ mov(eax, ebx); // Continuation expects generator object in eax.
__ jmp(edx);
}
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698