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

Unified Diff: src/arm64/builtins-arm64.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/arm/builtins-arm.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/builtins-arm64.cc
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
index d139cd8e6603755aa58997fbf882a4b5c6bfccf1..4ed33a0072a6ae8628fce88646a1fe49bcae12c0 100644
--- a/src/arm64/builtins-arm64.cc
+++ b/src/arm64/builtins-arm64.cc
@@ -726,6 +726,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(x1, JSGeneratorObject::kInputOffset, x0, x3,
kLRHasNotBeenSaved, kDontSaveFPRegs);
+ // Store resume mode into generator object.
+ __ Str(x2, FieldMemOperand(x1, JSGeneratorObject::kResumeModeOffset));
+
// Load suspended function and context.
__ Ldr(cp, FieldMemOperand(x1, JSGeneratorObject::kContextOffset));
__ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset));
@@ -797,16 +800,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Bind(&done_loop);
}
- // Push resume mode (consumed in continuation).
- __ Push(x2);
-
// Reset operand stack so we don't leak.
__ LoadRoot(x10, Heap::kEmptyFixedArrayRootIndex);
__ Str(x10, FieldMemOperand(x1, JSGeneratorObject::kOperandStackOffset));
- // Restore value.
- __ Ldr(x0, FieldMemOperand(x1, JSGeneratorObject::kInputOffset));
-
// Resume the generator function at the continuation.
__ Ldr(x10, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset));
__ Ldr(x10, FieldMemOperand(x10, SharedFunctionInfo::kCodeOffset));
@@ -816,6 +813,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Add(x10, x10, x11);
__ Mov(x12, Smi::FromInt(JSGeneratorObject::kGeneratorExecuting));
__ Str(x12, FieldMemOperand(x1, JSGeneratorObject::kContinuationOffset));
+ __ Move(x0, x1); // Continuation expects generator object in x0.
__ Br(x10);
}
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698