Index: src/mips64/macro-assembler-mips64.cc |
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc |
index a702a8b502a306b4dc14b90ffd38ab955b490ff0..22cc8fa431e4066cfccac29482a445b20deedcae 100644 |
--- a/src/mips64/macro-assembler-mips64.cc |
+++ b/src/mips64/macro-assembler-mips64.cc |
@@ -4247,64 +4247,18 @@ |
} |
-void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target, |
- const ParameterCount& expected, |
- const ParameterCount& actual) { |
- Label skip_flooding; |
- ExternalReference debug_step_action = |
- ExternalReference::debug_last_step_action_address(isolate()); |
- li(t0, Operand(debug_step_action)); |
- lb(t0, MemOperand(t0)); |
- Branch(&skip_flooding, ne, t0, Operand(StepIn)); |
- { |
- FrameScope frame(this, |
- has_frame() ? StackFrame::NONE : StackFrame::INTERNAL); |
- if (expected.is_reg()) { |
- SmiTag(expected.reg()); |
- Push(expected.reg()); |
- } |
- if (actual.is_reg()) { |
- SmiTag(actual.reg()); |
- Push(actual.reg()); |
- } |
- if (new_target.is_valid()) { |
- Push(new_target); |
- } |
- Push(fun); |
- Push(fun); |
- CallRuntime(Runtime::kDebugPrepareStepInIfStepping, 1); |
- Pop(fun); |
- if (new_target.is_valid()) { |
- Pop(new_target); |
- } |
- if (actual.is_reg()) { |
- Pop(actual.reg()); |
- SmiUntag(actual.reg()); |
- } |
- if (expected.is_reg()) { |
- Pop(expected.reg()); |
- SmiUntag(expected.reg()); |
- } |
- } |
- bind(&skip_flooding); |
-} |
- |
- |
-void MacroAssembler::InvokeFunctionCode(Register function, Register new_target, |
- const ParameterCount& expected, |
- const ParameterCount& actual, |
- InvokeFlag flag, |
- const CallWrapper& call_wrapper) { |
+void MacroAssembler::InvokeCode(Register code, |
+ Register new_target, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper) { |
// You can't call a function without a valid frame. |
DCHECK(flag == JUMP_FUNCTION || has_frame()); |
- DCHECK(function.is(a1)); |
+ |
+ // Ensure new target is passed in the correct register. Otherwise clear the |
+ // appropriate register in case new target is not given. |
DCHECK_IMPLIES(new_target.is_valid(), new_target.is(a3)); |
- |
- if (call_wrapper.NeedsDebugStepCheck()) { |
- FloodFunctionIfStepping(function, new_target, expected, actual); |
- } |
- |
- // Clear the new.target register if not given. |
if (!new_target.is_valid()) { |
LoadRoot(a3, Heap::kUndefinedValueRootIndex); |
} |
@@ -4314,11 +4268,6 @@ |
InvokePrologue(expected, actual, &done, &definitely_mismatches, flag, |
call_wrapper); |
if (!definitely_mismatches) { |
- // We call indirectly through the code field in the function to |
- // allow recompilation to take effect without changing any of the |
- // call sites. |
- Register code = t0; |
- ld(code, FieldMemOperand(function, JSFunction::kCodeEntryOffset)); |
if (flag == CALL_FUNCTION) { |
call_wrapper.BeforeCall(CallSize(code)); |
Call(code); |
@@ -4345,16 +4294,17 @@ |
// Contract with called JS functions requires that function is passed in a1. |
DCHECK(function.is(a1)); |
Register expected_reg = a2; |
- Register temp_reg = t0; |
- ld(temp_reg, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
+ Register code_reg = t0; |
+ ld(code_reg, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
// The argument count is stored as int32_t on 64-bit platforms. |
// TODO(plind): Smi on 32-bit platforms. |
lw(expected_reg, |
- FieldMemOperand(temp_reg, |
- SharedFunctionInfo::kFormalParameterCountOffset)); |
+ FieldMemOperand(code_reg, |
+ SharedFunctionInfo::kFormalParameterCountOffset)); |
+ ld(code_reg, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |
ParameterCount expected(expected_reg); |
- InvokeFunctionCode(a1, new_target, expected, actual, flag, call_wrapper); |
+ InvokeCode(code_reg, new_target, expected, actual, flag, call_wrapper); |
} |
@@ -4372,7 +4322,11 @@ |
// Get the function and setup the context. |
ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
- InvokeFunctionCode(a1, no_reg, expected, actual, flag, call_wrapper); |
+ // We call indirectly through the code field in the function to |
+ // allow recompilation to take effect without changing any of the |
+ // call sites. |
+ ld(t0, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |
+ InvokeCode(t0, no_reg, expected, actual, flag, call_wrapper); |
} |