Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index ca23b369234953fca11edbe9658e53f78f539969..60a291acf5a27c070349ffcdb3bd532d206911b8 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -535,8 +535,26 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) { |
__ decp(rcx); |
__ j(greater_equal, &loop); |
- // Call the function. |
__ incp(rax); // Pushed new.target. |
+ |
+ // Handle step in. |
+ Label skip_step_in; |
+ ExternalReference debug_step_in_fp = |
+ ExternalReference::debug_step_in_fp_address(masm->isolate()); |
+ __ Move(kScratchRegister, debug_step_in_fp); |
+ __ cmpp(Operand(kScratchRegister, 0), Immediate(0)); |
+ __ j(equal, &skip_step_in); |
+ |
+ __ Push(rax); |
+ __ Push(rdi); |
+ __ Push(rdi); |
+ __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1); |
+ __ Pop(rdi); |
+ __ Pop(rax); |
+ |
+ __ bind(&skip_step_in); |
+ |
+ // Call the function. |
ParameterCount actual(rax); |
__ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); |