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

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

Issue 1867263002: [generators] Store the resume mode in the generator object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Other platforms 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/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index cb5655f0f1b576ff6884926b2892ca76cd9bd008..081c1af6722225a134982fcd2cc34a93ec2facbc 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -840,6 +840,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(a1, JSGeneratorObject::kInputOffset, v0, a3,
kRAHasNotBeenSaved, kDontSaveFPRegs);
+ // Store resume mode into generator object.
+ __ sw(a2, FieldMemOperand(a1, JSGeneratorObject::kResumeModeOffset));
+
// Load suspended function and context.
__ lw(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset));
__ lw(t0, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
@@ -913,16 +916,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&done_loop);
}
- // Push resume mode (consumed in continuation).
- __ Push(a2);
-
// Reset operand stack so we don't leak.
__ LoadRoot(t1, Heap::kEmptyFixedArrayRootIndex);
__ sw(t1, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset));
- // Restore value.
- __ lw(v0, FieldMemOperand(a1, JSGeneratorObject::kInputOffset));
-
// Resume the generator function at the continuation.
__ lw(a3, FieldMemOperand(t0, JSFunction::kSharedFunctionInfoOffset));
__ lw(a3, FieldMemOperand(a3, SharedFunctionInfo::kCodeOffset));
@@ -932,6 +929,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Addu(a3, a3, Operand(a2));
__ li(a2, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)));
__ sw(a2, FieldMemOperand(a1, JSGeneratorObject::kContinuationOffset));
+ __ Move(v0, a1); // Continuation expects generator object in v0.
__ Jump(a3);
}
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698