PPC/s390: [cleanup] Don't pass resume_mode to ResumeGenerator.
Port a087abb062
Original Commit Message:
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.
immediately so we don't need to move it there later.
R=bmeurer@chromium.org, joransiu@ca.ibm.com, jbarboza@ca.ibm.com
BUG=
LOG=N
Change-Id: I85d064dad444443fa7ba9d6801e32e4048676ceb
Reviewed-on: https://chromium-review.googlesource.com/783792
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#49588}
This commit is contained in:
parent
d4498c2ab6
commit
9a0908a7f4
@ -468,7 +468,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r3 : the value to pass to the generator
|
||||
// -- r4 : the JSGeneratorObject to resume
|
||||
// -- r5 : the resume mode (tagged)
|
||||
// -- lr : return address
|
||||
// -----------------------------------
|
||||
__ AssertGeneratorObject(r4);
|
||||
@ -479,9 +478,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ RecordWriteField(r4, JSGeneratorObject::kInputOrDebugPosOffset, r3, r6,
|
||||
kLRHasNotBeenSaved, kDontSaveFPRegs);
|
||||
|
||||
// Store resume mode into generator object.
|
||||
__ StoreP(r5, FieldMemOperand(r4, JSGeneratorObject::kResumeModeOffset), r0);
|
||||
|
||||
// Load suspended function and context.
|
||||
__ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
|
||||
__ LoadP(cp, FieldMemOperand(r7, JSFunction::kContextOffset));
|
||||
@ -520,7 +516,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
|
||||
// ----------- S t a t e -------------
|
||||
// -- r4 : the JSGeneratorObject to resume
|
||||
// -- r5 : the resume mode (tagged)
|
||||
// -- r7 : generator function
|
||||
// -- cp : generator context
|
||||
// -- lr : return address
|
||||
@ -568,9 +563,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ bind(&prepare_step_in_if_stepping);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r4, r5, r7);
|
||||
__ Push(r4, r7);
|
||||
__ CallRuntime(Runtime::kDebugOnFunctionCall);
|
||||
__ Pop(r4, r5);
|
||||
__ Pop(r4);
|
||||
__ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ b(&stepping_prepared);
|
||||
@ -578,9 +573,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ bind(&prepare_step_in_suspended_generator);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r4, r5);
|
||||
__ Push(r4);
|
||||
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
|
||||
__ Pop(r4, r5);
|
||||
__ Pop(r4);
|
||||
__ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ b(&stepping_prepared);
|
||||
|
@ -459,7 +459,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r2 : the value to pass to the generator
|
||||
// -- r3 : the JSGeneratorObject to resume
|
||||
// -- r4 : the resume mode (tagged)
|
||||
// -- lr : return address
|
||||
// -----------------------------------
|
||||
__ AssertGeneratorObject(r3);
|
||||
@ -470,9 +469,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ RecordWriteField(r3, JSGeneratorObject::kInputOrDebugPosOffset, r2, r5,
|
||||
kLRHasNotBeenSaved, kDontSaveFPRegs);
|
||||
|
||||
// Store resume mode into generator object.
|
||||
__ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset));
|
||||
|
||||
// Load suspended function and context.
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
__ LoadP(cp, FieldMemOperand(r6, JSFunction::kContextOffset));
|
||||
@ -510,7 +506,6 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
|
||||
// ----------- S t a t e -------------
|
||||
// -- r3 : the JSGeneratorObject to resume
|
||||
// -- r4 : the resume mode (tagged)
|
||||
// -- r6 : generator function
|
||||
// -- cp : generator context
|
||||
// -- lr : return address
|
||||
@ -563,9 +558,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ bind(&prepare_step_in_if_stepping);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r3, r4, r6);
|
||||
__ Push(r3, r6);
|
||||
__ CallRuntime(Runtime::kDebugOnFunctionCall);
|
||||
__ Pop(r3, r4);
|
||||
__ Pop(r3);
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ b(&stepping_prepared);
|
||||
@ -573,9 +568,9 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ bind(&prepare_step_in_suspended_generator);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r3, r4);
|
||||
__ Push(r3);
|
||||
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
|
||||
__ Pop(r3, r4);
|
||||
__ Pop(r3);
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ b(&stepping_prepared);
|
||||
|
@ -328,8 +328,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
|
||||
CallInterfaceDescriptorData* data) {
|
||||
Register registers[] = {
|
||||
r3, // the value to pass to the generator
|
||||
r4, // the JSGeneratorObject to resume
|
||||
r5 // the resume mode (tagged)
|
||||
r4 // the JSGeneratorObject to resume
|
||||
};
|
||||
data->InitializePlatformSpecific(arraysize(registers), registers);
|
||||
}
|
||||
|
@ -321,8 +321,7 @@ void ResumeGeneratorDescriptor::InitializePlatformSpecific(
|
||||
CallInterfaceDescriptorData* data) {
|
||||
Register registers[] = {
|
||||
r2, // the value to pass to the generator
|
||||
r3, // the JSGeneratorObject to resume
|
||||
r4 // the resume mode (tagged)
|
||||
r3 // the JSGeneratorObject to resume
|
||||
};
|
||||
data->InitializePlatformSpecific(arraysize(registers), registers);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user