Index: src/ppc/builtins-ppc.cc |
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc |
index f1167f2bb08f13d4df9bd3ccaca7cbdc1b26769b..dad75f5dc38ec4c235d1ab95df3fea6cd6133a4b 100644 |
--- a/src/ppc/builtins-ppc.cc |
+++ b/src/ppc/builtins-ppc.cc |
@@ -723,21 +723,25 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ LoadP(r7, FieldMemOperand(r4, 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)); |
__ lbz(ip, MemOperand(ip)); |
__ cmpi(ip, Operand::Zero()); |
- __ beq(&skip_flooding); |
- { |
- FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
- __ Push(r4, r5, r7); |
- __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
- __ Pop(r4, r5); |
- __ LoadP(r7, FieldMemOperand(r4, 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)); |
+ __ cmp(ip, r4); |
+ __ beq(&prepare_step_in_suspended_generator); |
+ __ bind(&stepping_prepared); |
// Push receiver. |
__ LoadP(ip, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset)); |
@@ -843,6 +847,26 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ Jump(r6); |
} |
} |
+ |
+ __ bind(&prepare_step_in_if_stepping); |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(r4, r5, r7); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
+ __ Pop(r4, r5); |
+ __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ b(&stepping_prepared); |
+ |
+ __ bind(&prepare_step_in_suspended_generator); |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(r4, r5); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); |
+ __ Pop(r4, r5); |
+ __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ b(&stepping_prepared); |
} |
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { |