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

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

Issue 1882553003: S390: [generators] Store the resume mode in the generator object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: correct a comment 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/s390/full-codegen-s390.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/builtins-s390.cc
diff --git a/src/s390/builtins-s390.cc b/src/s390/builtins-s390.cc
index d6dcee6c2ace58a4a2b00c7030a083b907530de7..98c7a1e18f256df30875a3c5180ab458b55a5de5 100644
--- a/src/s390/builtins-s390.cc
+++ b/src/s390/builtins-s390.cc
@@ -708,6 +708,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(r3, JSGeneratorObject::kInputOffset, r2, r5,
kLRHasNotBeenSaved, kDontSaveFPRegs);
+ // Store resume mode into generator object.
+ __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset));
+
// Load suspended function and context.
__ LoadP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset));
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
@@ -791,17 +794,11 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&done_loop);
}
- // Push resume mode (consumed in continuation).
- __ Push(r4);
-
// Reset operand stack so we don't leak.
__ LoadRoot(ip, Heap::kEmptyFixedArrayRootIndex);
__ StoreP(ip, FieldMemOperand(r3, JSGeneratorObject::kOperandStackOffset),
r0);
- // Restore value.
- __ LoadP(r2, FieldMemOperand(r3, JSGeneratorObject::kInputOffset));
-
// Resume the generator function at the continuation.
__ LoadP(r5, FieldMemOperand(r6, JSFunction::kSharedFunctionInfoOffset));
__ LoadP(r5, FieldMemOperand(r5, SharedFunctionInfo::kCodeOffset));
@@ -814,6 +811,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ LoadSmiLiteral(r4, Smi::FromInt(JSGeneratorObject::kGeneratorExecuting));
__ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kContinuationOffset),
r0);
+ __ LoadRR(r2, r3); // Continuation expects generator object in r2.
__ Jump(r5);
}
}
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698