Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index 4d855004944e78f1ae58311f22d5f31725478812..665993bafc05ed6ba13bdcf26825f07dafacf674 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -720,21 +720,23 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ ldr(r4, FieldMemOperand(r1, 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)); |
__ ldrb(ip, MemOperand(ip)); |
__ cmp(ip, Operand(0)); |
- __ b(eq, &skip_flooding); |
- { |
- FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
- __ Push(r1, r2, r4); |
- __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
- __ Pop(r1, r2); |
- __ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset)); |
- } |
- __ bind(&skip_flooding); |
+ __ b(ne, &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)); |
+ __ ldr(ip, MemOperand(ip)); |
+ __ cmp(ip, Operand(r1)); |
+ __ b(eq, &prepare_step_in_suspended_generator); |
+ __ bind(&stepping_prepared); |
// Push receiver. |
__ ldr(ip, FieldMemOperand(r1, JSGeneratorObject::kReceiverOffset)); |
@@ -830,6 +832,26 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ Move(r0, r1); // Continuation expects generator object in r0. |
__ Jump(r3); |
} |
+ |
+ __ bind(&prepare_step_in_if_stepping); |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(r1, r2, r4); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
+ __ Pop(r1, r2); |
+ __ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ b(&stepping_prepared); |
+ |
+ __ bind(&prepare_step_in_suspended_generator); |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(r1, r2); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); |
+ __ Pop(r1, r2); |
+ __ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ b(&stepping_prepared); |
} |
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { |