Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index e17fb70baa57d034ee6862daf5c8205d7e0f7925..41780679307e0424e7808fe491b77bb989b9d388 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -407,22 +407,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); |
@@ -518,6 +515,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, |