Commit a087abb0 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[cleanup] Don't pass resume_mode to ResumeGenerator.

There's not really a point in passing the resume_mode as parameter to
the ResumeGenerator builtin. Instead we could as well just store the
mode to the generator object directly.

Drive-by-fix: On Intel allocate the generator to the new.target register
immediately so we don't need to move it there later.

Bug: v8:6344, v8:6354
Change-Id: I74e98cfffa2b3d72c43d8b6e9fdca03d01c9b4fa
Reviewed-on: https://chromium-review.googlesource.com/774259Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49401}
parent fcb3a715
......@@ -337,8 +337,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {
r0, // the value to pass to the generator
r1, // the JSGeneratorObject to resume
r2 // the resume mode (tagged)
r1 // the JSGeneratorObject to resume
};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
......
......@@ -348,8 +348,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {
x0, // the value to pass to the generator
x1, // the JSGeneratorObject to resume
x2 // the resume mode (tagged)
x1 // the JSGeneratorObject to resume
};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
......
......@@ -466,7 +466,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- r0 : the value to pass to the generator
// -- r1 : the JSGeneratorObject to resume
// -- r2 : the resume mode (tagged)
// -- lr : return address
// -----------------------------------
__ AssertGeneratorObject(r1);
......@@ -476,9 +475,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(r1, JSGeneratorObject::kInputOrDebugPosOffset, r0, r3,
kLRHasNotBeenSaved, kDontSaveFPRegs);
// Store resume mode into generator object.
__ str(r2, FieldMemOperand(r1, JSGeneratorObject::kResumeModeOffset));
// Load suspended function and context.
__ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset));
__ ldr(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
......@@ -517,7 +513,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- r1 : the JSGeneratorObject to resume
// -- r2 : the resume mode (tagged)
// -- r4 : generator function
// -- cp : generator context
// -- lr : return address
......@@ -567,9 +562,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_if_stepping);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r1, r2, r4);
__ Push(r1, r4);
__ CallRuntime(Runtime::kDebugOnFunctionCall);
__ Pop(r1, r2);
__ Pop(r1);
__ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset));
}
__ b(&stepping_prepared);
......@@ -577,9 +572,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_suspended_generator);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r1, r2);
__ Push(r1);
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
__ Pop(r1, r2);
__ Pop(r1);
__ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset));
}
__ b(&stepping_prepared);
......
......@@ -522,7 +522,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- x0 : the value to pass to the generator
// -- x1 : the JSGeneratorObject to resume
// -- x2 : the resume mode (tagged)
// -- lr : return address
// -----------------------------------
__ AssertGeneratorObject(x1);
......@@ -532,9 +531,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(x1, JSGeneratorObject::kInputOrDebugPosOffset, x0, x3,
kLRHasNotBeenSaved, kDontSaveFPRegs);
// Store resume mode into generator object.
__ Str(x2, FieldMemOperand(x1, JSGeneratorObject::kResumeModeOffset));
// Load suspended function and context.
__ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset));
__ Ldr(cp, FieldMemOperand(x4, JSFunction::kContextOffset));
......@@ -578,7 +574,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- x1 : the JSGeneratorObject to resume
// -- x2 : the resume mode (tagged)
// -- x4 : generator function
// -- x10 : argument count
// -- cp : generator context
......@@ -629,10 +624,10 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Bind(&prepare_step_in_if_stepping);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(x1, x2);
__ Push(x1);
__ PushArgument(x4);
__ CallRuntime(Runtime::kDebugOnFunctionCall);
__ Pop(x2, x1);
__ Pop(x1);
__ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset));
}
__ B(&stepping_prepared);
......@@ -640,9 +635,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Bind(&prepare_step_in_suspended_generator);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(x1, x2);
__ Push(x1);
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
__ Pop(x2, x1);
__ Pop(x1);
__ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset));
}
__ B(&stepping_prepared);
......
......@@ -59,9 +59,14 @@ void AsyncFunctionBuiltinsAssembler::AsyncFunctionAwaitResumeClosure(
LoadObjectField(generator, JSGeneratorObject::kContinuationOffset),
SmiConstant(JSGeneratorObject::kGeneratorClosed)));
// Remember the {resume_mode} for the {generator}.
StoreObjectFieldNoWriteBarrier(generator,
JSGeneratorObject::kResumeModeOffset,
SmiConstant(resume_mode));
// Resume the {receiver} using our trampoline.
Callable callable = CodeFactory::ResumeGenerator(isolate());
CallStub(callable, context, sent_value, generator, SmiConstant(resume_mode));
CallStub(callable, context, sent_value, generator);
// The resulting Promise is a throwaway, so it doesn't matter what it
// resolves to. What is important is that we don't end up keeping the
......
......@@ -237,8 +237,12 @@ void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwaitResumeClosure(
CSA_SLOW_ASSERT(this, IsGeneratorSuspended(generator));
CallStub(CodeFactory::ResumeGenerator(isolate()), context, value, generator,
SmiConstant(resume_mode));
// Remember the {resume_mode} for the {generator}.
StoreObjectFieldNoWriteBarrier(generator,
JSGeneratorObject::kResumeModeOffset,
SmiConstant(resume_mode));
CallStub(CodeFactory::ResumeGenerator(isolate()), context, value, generator);
TailCallBuiltin(Builtins::kAsyncGeneratorResumeNext, context, generator);
}
......@@ -489,8 +493,11 @@ TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) {
BIND(&resume_generator);
{
// Remember the {resume_type} for the {generator}.
StoreObjectFieldNoWriteBarrier(
generator, JSGeneratorObject::kResumeModeOffset, resume_type);
CallStub(CodeFactory::ResumeGenerator(isolate()), context,
LoadValueFromAsyncGeneratorRequest(next), generator, resume_type);
LoadValueFromAsyncGeneratorRequest(next), generator);
var_state.Bind(LoadGeneratorState(generator));
var_next.Bind(LoadFirstAsyncGeneratorRequestFromQueue(generator));
Goto(&start);
......
......@@ -45,11 +45,15 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
JSGeneratorObject::kGeneratorClosed);
GotoIf(SmiLessThan(receiver_continuation, closed), &if_receiverisrunning);
// Remember the {resume_mode} for the {receiver}.
StoreObjectFieldNoWriteBarrier(receiver, JSGeneratorObject::kResumeModeOffset,
SmiConstant(resume_mode));
// Resume the {receiver} using our trampoline.
VARIABLE(var_exception, MachineRepresentation::kTagged, UndefinedConstant());
Label if_exception(this, Label::kDeferred), if_final_return(this);
Node* result = CallStub(CodeFactory::ResumeGenerator(isolate()), context,
value, receiver, SmiConstant(resume_mode));
value, receiver);
// Make sure we close the generator if there was an exception.
GotoIfException(result, &if_exception, &var_exception);
......
......@@ -501,22 +501,18 @@ void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- eax : the value to pass to the generator
// -- ebx : the JSGeneratorObject to resume
// -- edx : the resume mode (tagged)
// -- edx : the JSGeneratorObject to resume
// -- esp[0] : return address
// -----------------------------------
__ AssertGeneratorObject(ebx);
__ AssertGeneratorObject(edx);
// Store input value into generator object.
__ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax);
__ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx,
__ mov(FieldOperand(edx, JSGeneratorObject::kInputOrDebugPosOffset), eax);
__ RecordWriteField(edx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx,
kDontSaveFPRegs);
// Store resume mode into generator object.
__ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx);
// Load suspended function and context.
__ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset));
__ mov(edi, FieldOperand(edx, JSGeneratorObject::kFunctionOffset));
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
// Flood function if we are stepping.
......@@ -530,7 +526,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// Flood function if we need to continue stepping in the suspended generator.
ExternalReference debug_suspended_generator =
ExternalReference::debug_suspended_generator_address(masm->isolate());
__ cmp(ebx, Operand::StaticVariable(debug_suspended_generator));
__ cmp(edx, Operand::StaticVariable(debug_suspended_generator));
__ j(equal, &prepare_step_in_suspended_generator);
__ bind(&stepping_prepared);
......@@ -544,12 +540,11 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ PopReturnAddressTo(eax);
// Push receiver.
__ Push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset));
__ Push(FieldOperand(edx, JSGeneratorObject::kReceiverOffset));
// ----------- S t a t e -------------
// -- eax : return address
// -- ebx : the JSGeneratorObject to resume
// -- edx : the resume mode (tagged)
// -- edx : the JSGeneratorObject to resume
// -- edi : generator function
// -- esi : generator context
// -- esp[0] : generator receiver
......@@ -589,7 +584,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// We abuse new.target both to indicate that this is a resume call and to
// pass in the generator object. In ordinary calls, new.target is always
// undefined because generator functions are non-constructable.
__ mov(edx, ebx);
__ mov(ecx, FieldOperand(edi, JSFunction::kCodeOffset));
__ add(ecx, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ jmp(ecx);
......@@ -598,25 +592,21 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_if_stepping);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(ebx);
__ Push(edx);
__ Push(edi);
__ CallRuntime(Runtime::kDebugOnFunctionCall);
__ Pop(edx);
__ Pop(ebx);
__ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset));
__ mov(edi, FieldOperand(edx, JSGeneratorObject::kFunctionOffset));
}
__ jmp(&stepping_prepared);
__ bind(&prepare_step_in_suspended_generator);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(ebx);
__ Push(edx);
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
__ Pop(edx);
__ Pop(ebx);
__ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset));
__ mov(edi, FieldOperand(edx, JSGeneratorObject::kFunctionOffset));
}
__ jmp(&stepping_prepared);
......
......@@ -564,7 +564,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- v0 : the value to pass to the generator
// -- a1 : the JSGeneratorObject to resume
// -- a2 : the resume mode (tagged)
// -- ra : return address
// -----------------------------------
......@@ -575,9 +574,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(a1, JSGeneratorObject::kInputOrDebugPosOffset, v0, a3,
kRAHasNotBeenSaved, kDontSaveFPRegs);
// Store resume mode into generator object.
__ sw(a2, FieldMemOperand(a1, JSGeneratorObject::kResumeModeOffset));
// Load suspended function and context.
__ lw(t0, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
__ lw(cp, FieldMemOperand(t0, JSFunction::kContextOffset));
......@@ -611,7 +607,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a1 : the JSGeneratorObject to resume
// -- a2 : the resume mode (tagged)
// -- t0 : generator function
// -- cp : generator context
// -- ra : return address
......@@ -660,9 +655,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_if_stepping);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a2, t0);
__ Push(a1, t0);
__ CallRuntime(Runtime::kDebugOnFunctionCall);
__ Pop(a1, a2);
__ Pop(a1);
}
__ Branch(USE_DELAY_SLOT, &stepping_prepared);
__ lw(t0, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
......@@ -670,9 +665,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_suspended_generator);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a2);
__ Push(a1);
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
__ Pop(a1, a2);
__ Pop(a1);
}
__ Branch(USE_DELAY_SLOT, &stepping_prepared);
__ lw(t0, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
......
......@@ -456,7 +456,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- v0 : the value to pass to the generator
// -- a1 : the JSGeneratorObject to resume
// -- a2 : the resume mode (tagged)
// -- ra : return address
// -----------------------------------
__ AssertGeneratorObject(a1);
......@@ -466,9 +465,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ RecordWriteField(a1, JSGeneratorObject::kInputOrDebugPosOffset, v0, a3,
kRAHasNotBeenSaved, kDontSaveFPRegs);
// Store resume mode into generator object.
__ Sd(a2, FieldMemOperand(a1, JSGeneratorObject::kResumeModeOffset));
// Load suspended function and context.
__ Ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
__ Ld(cp, FieldMemOperand(a4, JSFunction::kContextOffset));
......@@ -502,7 +498,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a1 : the JSGeneratorObject to resume
// -- a2 : the resume mode (tagged)
// -- a4 : generator function
// -- cp : generator context
// -- ra : return address
......@@ -552,9 +547,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_if_stepping);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a2, a4);
__ Push(a1, a4);
__ CallRuntime(Runtime::kDebugOnFunctionCall);
__ Pop(a1, a2);
__ Pop(a1);
}
__ Branch(USE_DELAY_SLOT, &stepping_prepared);
__ Ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
......@@ -562,9 +557,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_suspended_generator);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a2);
__ Push(a1);
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
__ Pop(a1, a2);
__ Pop(a1);
}
__ Branch(USE_DELAY_SLOT, &stepping_prepared);
__ Ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
......
......@@ -568,22 +568,18 @@ void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- rax : the value to pass to the generator
// -- rbx : the JSGeneratorObject to resume
// -- rdx : the resume mode (tagged)
// -- rdx : the JSGeneratorObject to resume
// -- rsp[0] : return address
// -----------------------------------
__ AssertGeneratorObject(rbx);
__ AssertGeneratorObject(rdx);
// Store input value into generator object.
__ movp(FieldOperand(rbx, JSGeneratorObject::kInputOrDebugPosOffset), rax);
__ RecordWriteField(rbx, JSGeneratorObject::kInputOrDebugPosOffset, rax, rcx,
__ movp(FieldOperand(rdx, JSGeneratorObject::kInputOrDebugPosOffset), rax);
__ RecordWriteField(rdx, JSGeneratorObject::kInputOrDebugPosOffset, rax, rcx,
kDontSaveFPRegs);
// Store resume mode into generator object.
__ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx);
// Load suspended function and context.
__ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset));
__ movp(rdi, FieldOperand(rdx, JSGeneratorObject::kFunctionOffset));
__ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
// Flood function if we are stepping.
......@@ -600,7 +596,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
ExternalReference::debug_suspended_generator_address(masm->isolate());
Operand debug_suspended_generator_operand =
masm->ExternalOperand(debug_suspended_generator);
__ cmpp(rbx, debug_suspended_generator_operand);
__ cmpp(rdx, debug_suspended_generator_operand);
__ j(equal, &prepare_step_in_suspended_generator);
__ bind(&stepping_prepared);
......@@ -614,12 +610,11 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ PopReturnAddressTo(rax);
// Push receiver.
__ Push(FieldOperand(rbx, JSGeneratorObject::kReceiverOffset));
__ Push(FieldOperand(rdx, JSGeneratorObject::kReceiverOffset));
// ----------- S t a t e -------------
// -- rax : return address
// -- rbx : the JSGeneratorObject to resume
// -- rdx : the resume mode (tagged)
// -- rdx : the JSGeneratorObject to resume
// -- rdi : generator function
// -- rsi : generator context
// -- rsp[0] : generator receiver
......@@ -659,7 +654,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// We abuse new.target both to indicate that this is a resume call and to
// pass in the generator object. In ordinary calls, new.target is always
// undefined because generator functions are non-constructable.
__ movp(rdx, rbx);
__ movp(rcx, FieldOperand(rdi, JSFunction::kCodeOffset));
__ addp(rcx, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ jmp(rcx);
......@@ -668,25 +662,21 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ bind(&prepare_step_in_if_stepping);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(rbx);
__ Push(rdx);
__ Push(rdi);
__ CallRuntime(Runtime::kDebugOnFunctionCall);
__ Pop(rdx);
__ Pop(rbx);
__ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset));
__ movp(rdi, FieldOperand(rdx, JSGeneratorObject::kFunctionOffset));
}
__ jmp(&stepping_prepared);
__ bind(&prepare_step_in_suspended_generator);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(rbx);
__ Push(rdx);
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
__ Pop(rdx);
__ Pop(rbx);
__ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset));
__ movp(rdi, FieldOperand(rdx, JSGeneratorObject::kFunctionOffset));
}
__ jmp(&stepping_prepared);
......
......@@ -333,8 +333,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {
eax, // the value to pass to the generator
ebx, // the JSGeneratorObject to resume
edx // the resume mode (tagged)
edx // the JSGeneratorObject to resume
};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
......
......@@ -328,8 +328,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {
v0, // the value to pass to the generator
a1, // the JSGeneratorObject to resume
a2 // the resume mode (tagged)
a1 // the JSGeneratorObject to resume
};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
......
......@@ -328,8 +328,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {
v0, // the value to pass to the generator
a1, // the JSGeneratorObject to resume
a2 // the resume mode (tagged)
a1 // the JSGeneratorObject to resume
};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
......
......@@ -333,8 +333,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {
rax, // the value to pass to the generator
rbx, // the JSGeneratorObject / JSAsyncGeneratorObject to resume
rdx // the resume mode (tagged)
rdx // the JSGeneratorObject / JSAsyncGeneratorObject to resume
};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment