Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index 005fa053ac0456b10b6309596f980ed7cb43535c..e20fe315e6499bb8f8d11573ccb8c48584fcb45c 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -1879,16 +1879,14 @@ 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()); |
- STATIC_ASSERT(StepFrame > StepIn); |
- cmpb(Operand::StaticVariable(last_step_action), 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()); |
+ cmpb(Operand::StaticVariable(debug_hook_active), Immediate(0)); |
+ j(equal, &skip_hook); |
{ |
FrameScope frame(this, |
has_frame() ? StackFrame::NONE : StackFrame::INTERNAL); |
@@ -1905,7 +1903,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); |
@@ -1919,7 +1917,7 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target, |
SmiUntag(expected.reg()); |
} |
} |
- bind(&skip_flooding); |
+ bind(&skip_hook); |
} |
@@ -1933,8 +1931,8 @@ void MacroAssembler::InvokeFunctionCode(Register function, Register new_target, |
DCHECK(function.is(edi)); |
DCHECK_IMPLIES(new_target.is_valid(), new_target.is(edx)); |
- 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. |