| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 26a3dae1c646632481657f937a30e867672ecbc6..39b1768055bcddce097df648184136a1e05fa216 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -4211,8 +4211,8 @@ void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
|
| DCHECK(function.is(rdi));
|
| DCHECK_IMPLIES(new_target.is_valid(), new_target.is(rdx));
|
|
|
| - if (call_wrapper.NeedsDebugStepCheck()) {
|
| - FloodFunctionIfStepping(function, new_target, expected, actual);
|
| + if (call_wrapper.NeedsDebugHookCheck()) {
|
| + CheckDebugHook(function, new_target, expected, actual);
|
| }
|
|
|
| // Clear the new.target register if not given.
|
| @@ -4312,17 +4312,15 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
|
| }
|
| }
|
|
|
| -
|
| -void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target,
|
| - const ParameterCount& expected,
|
| - const ParameterCount& actual) {
|
| - Label skip_flooding;
|
| - ExternalReference last_step_action =
|
| - ExternalReference::debug_last_step_action_address(isolate());
|
| - Operand last_step_action_operand = ExternalOperand(last_step_action);
|
| - STATIC_ASSERT(StepFrame > StepIn);
|
| - cmpb(last_step_action_operand, Immediate(StepIn));
|
| - j(less, &skip_flooding);
|
| +void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
|
| + const ParameterCount& expected,
|
| + const ParameterCount& actual) {
|
| + Label skip_hook;
|
| + ExternalReference debug_hook_active =
|
| + ExternalReference::debug_hook_on_function_call_address(isolate());
|
| + Operand debug_hook_active_operand = ExternalOperand(debug_hook_active);
|
| + cmpb(debug_hook_active_operand, Immediate(0));
|
| + j(equal, &skip_hook);
|
| {
|
| FrameScope frame(this,
|
| has_frame() ? StackFrame::NONE : StackFrame::INTERNAL);
|
| @@ -4339,7 +4337,7 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target,
|
| }
|
| Push(fun);
|
| Push(fun);
|
| - CallRuntime(Runtime::kDebugPrepareStepInIfStepping);
|
| + CallRuntime(Runtime::kDebugOnFunctionCall);
|
| Pop(fun);
|
| if (new_target.is_valid()) {
|
| Pop(new_target);
|
| @@ -4353,7 +4351,7 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target,
|
| SmiToInteger64(expected.reg(), expected.reg());
|
| }
|
| }
|
| - bind(&skip_flooding);
|
| + bind(&skip_hook);
|
| }
|
|
|
| void MacroAssembler::StubPrologue(StackFrame::Type type) {
|
|
|