Index: src/x87/builtins-x87.cc |
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc |
index 127b83dfa81a42befeb928a46076550377d53635..1926648646dd184f4687c3fc2c4176d533c65e87 100644 |
--- a/src/x87/builtins-x87.cc |
+++ b/src/x87/builtins-x87.cc |
@@ -408,22 +408,19 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ mov(edi, FieldOperand(ebx, 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()); |
__ cmpb(Operand::StaticVariable(step_in_enabled), Immediate(0)); |
- __ j(equal, &skip_flooding); |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ Push(ebx); |
- __ Push(edx); |
- __ Push(edi); |
- __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
- __ Pop(edx); |
- __ Pop(ebx); |
- __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
- } |
- __ bind(&skip_flooding); |
+ __ j(not_equal, &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()); |
+ __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); |
+ __ j(equal, &prepare_step_in_suspended_generator); |
+ __ bind(&stepping_prepared); |
// Pop return address. |
__ PopReturnAddressTo(eax); |
@@ -519,6 +516,31 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
__ mov(eax, ebx); // Continuation expects generator object in eax. |
__ jmp(edx); |
} |
+ |
+ __ bind(&prepare_step_in_if_stepping); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(ebx); |
+ __ Push(edx); |
+ __ Push(edi); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
+ __ Pop(edx); |
+ __ Pop(ebx); |
+ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ jmp(&stepping_prepared); |
+ |
+ __ bind(&prepare_step_in_suspended_generator); |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(ebx); |
+ __ Push(edx); |
+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); |
+ __ Pop(edx); |
+ __ Pop(ebx); |
+ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
+ } |
+ __ jmp(&stepping_prepared); |
} |
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1, |