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

Unified Diff: src/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index b086780ae36cd42488da953633efc232e18c29ba..6049c430c0b1cf941e71efca7f3b45d227edfbd7 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -705,6 +705,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(a1, JSGeneratorObject::kInputOffset, v0, a3,
kRAHasNotBeenSaved, kDontSaveFPRegs);
+ // Store resume mode into generator object.
+ __ sd(a2, FieldMemOperand(a1, JSGeneratorObject::kResumeModeOffset));
+
// Load suspended function and context.
__ ld(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset));
__ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
@@ -779,16 +782,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(a5, Heap::kEmptyFixedArrayRootIndex);
__ sd(a5, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset));
- // Restore value.
- __ ld(v0, FieldMemOperand(a1, JSGeneratorObject::kInputOffset));
-
// Resume the generator function at the continuation.
__ ld(a3, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset));
__ ld(a3, FieldMemOperand(a3, SharedFunctionInfo::kCodeOffset));
@@ -798,6 +795,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Daddu(a3, a3, Operand(a2));
__ li(a2, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)));
__ sd(a2, FieldMemOperand(a1, JSGeneratorObject::kContinuationOffset));
+ __ Move(v0, a1); // Continuation expects generator object in v0.
__ Jump(a3);
}
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698