Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index d93552b2a9d50eabd5a4760ea6109c91bcc7f9e5..084901783e2ddba1c002483ac23115445bc62a0d 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -1937,16 +1937,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); |
@@ -1963,7 +1961,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); |
@@ -1977,7 +1975,7 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target, |
SmiUntag(expected.reg()); |
} |
} |
- bind(&skip_flooding); |
+ bind(&skip_hook); |
} |
@@ -1991,8 +1989,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. |