Index: src/s390/builtins-s390.cc |
diff --git a/src/s390/builtins-s390.cc b/src/s390/builtins-s390.cc |
index 8aca9da0d0b3235988960e6eecfb8e5e5aa306ac..6927a2ccc8103259150f7490abaa1435bd685ced 100644 |
--- a/src/s390/builtins-s390.cc |
+++ b/src/s390/builtins-s390.cc |
@@ -711,21 +711,25 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); |
// Flood function if we are stepping. |
- Label skip_flooding; |
+ Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; |
+ Label stepping_prepared; |
ExternalReference step_in_enabled = |
ExternalReference::debug_step_in_enabled_address(masm->isolate()); |
__ mov(ip, Operand(step_in_enabled)); |
__ LoadlB(ip, MemOperand(ip)); |
__ CmpP(ip, Operand::Zero()); |
- __ beq(&skip_flooding); |
- { |
- FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
- __ Push(r3, r4, r6); |
- __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
- __ Pop(r3, r4); |
- __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); |
- } |
- __ bind(&skip_flooding); |
+ __ bne(&prepare_step_in_if_stepping); |
+ |
+ // Flood function if we need to continue stepping in the suspended generator. |
+ |
+ ExternalReference debug_suspended_generator = |
+ ExternalReference::debug_suspended_generator_address(masm->isolate()); |
+ |
+ __ mov(ip, Operand(debug_suspended_generator)); |
+ __ LoadP(ip, MemOperand(ip)); |
+ __ CmpP(ip, r3); |
+ __ beq(&prepare_step_in_suspended_generator); |
+ __ bind(&stepping_prepared); |
// Push receiver. |
__ LoadP(ip, FieldMemOperand(r3, JSGeneratorObject::kReceiverOffset)); |
@@ -830,6 +834,26 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ Jump(r5); |
} |
} |
+ |
+ __ bind(&prepare_step_in_if_stepping); |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(r3, r4, r6); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
+ __ Pop(r3, r4); |
+ __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ b(&stepping_prepared); |
+ |
+ __ bind(&prepare_step_in_suspended_generator); |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(r3, r4); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); |
+ __ Pop(r3, r4); |
+ __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ b(&stepping_prepared); |
} |
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { |