Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 1491d87548b0da2cbb67ac68f216458c8144fbdd..25413f9a5431b52958ac5cbf19819944fd81dfcb 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -4558,17 +4558,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()); |
- STATIC_ASSERT(StepFrame > StepIn); |
- li(t0, Operand(last_step_action)); |
+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()); |
+ li(t0, Operand(debug_hook_active)); |
lb(t0, MemOperand(t0)); |
- Branch(&skip_flooding, lt, t0, Operand(StepIn)); |
+ Branch(&skip_hook, eq, t0, Operand(zero_reg)); |
{ |
FrameScope frame(this, |
has_frame() ? StackFrame::NONE : StackFrame::INTERNAL); |
@@ -4585,7 +4583,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); |
@@ -4599,7 +4597,7 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target, |
SmiUntag(expected.reg()); |
} |
} |
- bind(&skip_flooding); |
+ bind(&skip_hook); |
} |
@@ -4613,8 +4611,8 @@ void MacroAssembler::InvokeFunctionCode(Register function, Register new_target, |
DCHECK(function.is(a1)); |
DCHECK_IMPLIES(new_target.is_valid(), new_target.is(a3)); |
- 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. |