Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 60f5b9874a4fc2b368f650724478260655cf4dde..0c11b17b0fb1653832eb60f77bbb3eae6179ccd5 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -706,20 +706,21 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ ld(a4, FieldMemOperand(a1, 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()); |
__ li(t1, Operand(step_in_enabled)); |
__ lb(t1, MemOperand(t1)); |
- __ Branch(&skip_flooding, eq, t1, Operand(zero_reg)); |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ Push(a1, a2, a4); |
- __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
- __ Pop(a1, a2); |
- __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); |
- } |
- __ bind(&skip_flooding); |
+ __ Branch(&prepare_step_in_if_stepping, ne, t1, Operand(zero_reg)); |
+ |
+ // Flood function if we need to continue stepping in the suspended generator. |
+ ExternalReference debug_suspended_generator = |
+ ExternalReference::debug_suspended_generator_address(masm->isolate()); |
+ __ li(t1, Operand(debug_suspended_generator)); |
+ __ lw(t1, MemOperand(t1)); |
+ __ Branch(&prepare_step_in_suspended_generator, eq, t1, Operand(zero_reg)); |
+ __ bind(&stepping_prepared); |
// Push receiver. |
__ ld(a5, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset)); |
@@ -815,6 +816,26 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ Move(v0, a1); // Continuation expects generator object in v0. |
__ Jump(a3); |
} |
+ |
+ __ bind(&prepare_step_in_if_stepping); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(a1, a2, a4); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
+ __ Pop(a1, a2); |
+ } |
+ __ Branch(USE_DELAY_SLOT, &stepping_prepared); |
+ __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); |
+ |
+ __ bind(&prepare_step_in_suspended_generator); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(a1, a2); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); |
+ __ Pop(a1, a2); |
+ } |
+ __ Branch(USE_DELAY_SLOT, &stepping_prepared); |
+ __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); |
} |
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { |