Commit 2da05dfc authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC/s390: [codegen] Removed ParameterCount class

Port 1e696896

Original Commit Message:

    It was used only with Register inputs, so we can replace its uses with
    the Registers themselves.

R=solanes@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I95c0e6fc19ea5f9579d022756a4693ea0140d2f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890543Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64661}
parent 30978914
......@@ -144,8 +144,7 @@ void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
// r6: new target
{
ConstantPoolUnavailableScope constant_pool_unavailable(masm);
ParameterCount actual(r3);
__ InvokeFunction(r4, r6, actual, CALL_FUNCTION);
__ InvokeFunction(r4, r6, r3, CALL_FUNCTION);
}
// Restore context from the frame.
......@@ -300,8 +299,7 @@ void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
// Call the function.
{
ConstantPoolUnavailableScope constant_pool_unavailable(masm);
ParameterCount actual(r3);
__ InvokeFunction(r4, r6, actual, CALL_FUNCTION);
__ InvokeFunction(r4, r6, r3, CALL_FUNCTION);
}
// ----------- S t a t e -------------
......@@ -2102,9 +2100,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
__ LoadHalfWord(
r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset));
ParameterCount actual(r3);
ParameterCount expected(r5);
__ InvokeFunctionCode(r4, no_reg, expected, actual, JUMP_FUNCTION);
__ InvokeFunctionCode(r4, no_reg, r5, r3, JUMP_FUNCTION);
// The function is a "classConstructor", need to raise an exception.
__ bind(&class_constructor);
......
......@@ -139,8 +139,7 @@ void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
// r3: constructor function
// r5: new target
ParameterCount actual(r2);
__ InvokeFunction(r3, r5, actual, CALL_FUNCTION);
__ InvokeFunction(r3, r5, r2, CALL_FUNCTION);
// Restore context from the frame.
__ LoadP(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset));
......@@ -293,8 +292,7 @@ void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
__ bind(&no_args);
// Call the function.
ParameterCount actual(r2);
__ InvokeFunction(r3, r5, actual, CALL_FUNCTION);
__ InvokeFunction(r3, r5, r2, CALL_FUNCTION);
// ----------- S t a t e -------------
// -- r0: constructor result
......@@ -2160,9 +2158,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
__ LoadLogicalHalfWordP(
r4, FieldMemOperand(r4, SharedFunctionInfo::kFormalParameterCountOffset));
ParameterCount actual(r2);
ParameterCount expected(r4);
__ InvokeFunctionCode(r3, no_reg, expected, actual, JUMP_FUNCTION);
__ InvokeFunctionCode(r3, no_reg, r4, r2, JUMP_FUNCTION);
// The function is a "classConstructor", need to raise an exception.
__ bind(&class_constructor);
......
......@@ -1152,36 +1152,25 @@ void TurboAssembler::MovFromFloatParameter(const DoubleRegister dst) {
Move(dst, d1);
}
void TurboAssembler::PrepareForTailCall(const ParameterCount& callee_args_count,
Register caller_args_count_reg,
void TurboAssembler::PrepareForTailCall(Register callee_args_count,
Register caller_args_count,
Register scratch0, Register scratch1) {
#if DEBUG
if (callee_args_count.is_reg()) {
DCHECK(!AreAliased(callee_args_count.reg(), caller_args_count_reg, scratch0,
scratch1));
} else {
DCHECK(!AreAliased(caller_args_count_reg, scratch0, scratch1));
}
#endif
DCHECK(!AreAliased(callee_args_count, caller_args_count, scratch0, scratch1));
// Calculate the end of destination area where we will put the arguments
// after we drop current frame. We add kPointerSize to count the receiver
// argument which is not included into formal parameters count.
Register dst_reg = scratch0;
ShiftLeftImm(dst_reg, caller_args_count_reg, Operand(kPointerSizeLog2));
ShiftLeftImm(dst_reg, caller_args_count, Operand(kPointerSizeLog2));
add(dst_reg, fp, dst_reg);
addi(dst_reg, dst_reg,
Operand(StandardFrameConstants::kCallerSPOffset + kPointerSize));
Register src_reg = caller_args_count_reg;
Register src_reg = caller_args_count;
// Calculate the end of source area. +kPointerSize is for the receiver.
if (callee_args_count.is_reg()) {
ShiftLeftImm(src_reg, callee_args_count.reg(), Operand(kPointerSizeLog2));
add(src_reg, sp, src_reg);
addi(src_reg, src_reg, Operand(kPointerSize));
} else {
Add(src_reg, sp, (callee_args_count.immediate() + 1) * kPointerSize, r0);
}
ShiftLeftImm(src_reg, callee_args_count, Operand(kPointerSizeLog2));
add(src_reg, sp, src_reg);
addi(src_reg, src_reg, Operand(kPointerSize));
if (FLAG_debug_code) {
cmpl(src_reg, dst_reg);
......@@ -1199,11 +1188,7 @@ void TurboAssembler::PrepareForTailCall(const ParameterCount& callee_args_count,
// so they must be pre-decremented in the loop.
Register tmp_reg = scratch1;
Label loop;
if (callee_args_count.is_reg()) {
addi(tmp_reg, callee_args_count.reg(), Operand(1)); // +1 for receiver
} else {
mov(tmp_reg, Operand(callee_args_count.immediate() + 1));
}
addi(tmp_reg, callee_args_count, Operand(1)); // +1 for receiver
mtctr(tmp_reg);
bind(&loop);
LoadPU(tmp_reg, MemOperand(src_reg, -kPointerSize));
......@@ -1214,9 +1199,8 @@ void TurboAssembler::PrepareForTailCall(const ParameterCount& callee_args_count,
mr(sp, dst_reg);
}
void MacroAssembler::InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual, Label* done,
bool* definitely_mismatches,
void MacroAssembler::InvokePrologue(Register expected, Register actual,
Label* done, bool* definitely_mismatches,
InvokeFlag flag) {
bool definitely_matches = false;
*definitely_mismatches = false;
......@@ -1236,34 +1220,8 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
// DCHECK(actual.is_immediate() || actual.reg() == r3);
// DCHECK(expected.is_immediate() || expected.reg() == r5);
if (expected.is_immediate()) {
DCHECK(actual.is_immediate());
mov(r3, Operand(actual.immediate()));
if (expected.immediate() == actual.immediate()) {
definitely_matches = true;
} else {
const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel;
if (expected.immediate() == sentinel) {
// Don't worry about adapting arguments for builtins that
// don't want that done. Skip adaption code by making it look
// like we have a match between expected and actual number of
// arguments.
definitely_matches = true;
} else {
*definitely_mismatches = true;
mov(r5, Operand(expected.immediate()));
}
}
} else {
if (actual.is_immediate()) {
mov(r3, Operand(actual.immediate()));
cmpi(expected.reg(), Operand(actual.immediate()));
beq(&regular_invoke);
} else {
cmp(expected.reg(), actual.reg());
beq(&regular_invoke);
}
}
cmp(expected, actual);
beq(&regular_invoke);
if (!definitely_matches) {
Handle<Code> adaptor = BUILTIN_CODE(isolate(), ArgumentsAdaptorTrampoline);
......@@ -1280,8 +1238,7 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
}
void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual) {
Register expected, Register actual) {
Label skip_hook;
ExternalReference debug_hook_active =
......@@ -1294,22 +1251,14 @@ void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
{
// Load receiver to pass it later to DebugOnFunctionCall hook.
if (actual.is_reg()) {
ShiftLeftImm(r7, actual.reg(), Operand(kPointerSizeLog2));
LoadPX(r7, MemOperand(sp, r7));
} else {
LoadP(r7, MemOperand(sp, actual.immediate() << kPointerSizeLog2), r0);
}
ShiftLeftImm(r7, actual, Operand(kPointerSizeLog2));
LoadPX(r7, MemOperand(sp, r7));
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());
}
SmiTag(expected);
Push(expected);
SmiTag(actual);
Push(actual);
if (new_target.is_valid()) {
Push(new_target);
}
......@@ -1319,26 +1268,20 @@ void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
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());
}
Pop(actual);
SmiUntag(actual);
Pop(expected);
SmiUntag(expected);
}
bind(&skip_hook);
}
void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual,
Register expected, Register actual,
InvokeFlag flag) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
DCHECK(function == r4);
DCHECK_IMPLIES(new_target.is_valid(), new_target == r6);
// On function call, call into the debugger if necessary.
CheckDebugHook(function, new_target, expected, actual);
......@@ -1371,8 +1314,7 @@ void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
}
void MacroAssembler::InvokeFunction(Register fun, Register new_target,
const ParameterCount& actual,
InvokeFlag flag) {
Register actual, InvokeFlag flag) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
......@@ -1388,24 +1330,7 @@ void MacroAssembler::InvokeFunction(Register fun, Register new_target,
FieldMemOperand(
temp_reg, SharedFunctionInfo::kFormalParameterCountOffset));
ParameterCount expected(expected_reg);
InvokeFunctionCode(fun, new_target, expected, actual, flag);
}
void MacroAssembler::InvokeFunction(Register function,
const ParameterCount& expected,
const ParameterCount& actual,
InvokeFlag flag) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
// Contract with called JS functions requires that function is passed in r4.
DCHECK(function == r4);
// Get the function and setup the context.
LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
InvokeFunctionCode(r4, no_reg, expected, actual, flag);
InvokeFunctionCode(fun, new_target, expected_reg, actual, flag);
}
void MacroAssembler::MaybeDropFrames() {
......
......@@ -333,8 +333,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
Register scratch);
void PrepareCallCFunction(int num_reg_arguments, Register scratch);
void PrepareForTailCall(const ParameterCount& callee_args_count,
Register caller_args_count_reg, Register scratch0,
void PrepareForTailCall(Register callee_args_count,
Register caller_args_count, Register scratch0,
Register scratch1);
// There are two ways of passing double arguments on ARM, depending on
......@@ -743,27 +743,22 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// Removes current frame and its arguments from the stack preserving
// the arguments and a return address pushed to the stack for the next call.
// Both |callee_args_count| and |caller_args_count_reg| do not include
// receiver. |callee_args_count| is not modified, |caller_args_count_reg|
// Both |callee_args_count| and |caller_args_count| do not include
// receiver. |callee_args_count| is not modified. |caller_args_count|
// is trashed.
// Invoke the JavaScript function code by either calling or jumping.
void InvokeFunctionCode(Register function, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual, InvokeFlag flag);
Register expected, Register actual, InvokeFlag flag);
// On function call, call into the debugger if necessary.
void CheckDebugHook(Register fun, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual);
void CheckDebugHook(Register fun, Register new_target, Register expected,
Register actual);
// Invoke the JavaScript function in the given register. Changes the
// current context to the context in the function before invoking.
void InvokeFunction(Register function, Register new_target,
const ParameterCount& actual, InvokeFlag flag);
void InvokeFunction(Register function, const ParameterCount& expected,
const ParameterCount& actual, InvokeFlag flag);
void InvokeFunction(Register function, Register new_target, Register actual,
InvokeFlag flag);
void DebugBreak();
// Frame restart support
......@@ -950,8 +945,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
static const int kSmiShift = kSmiTagSize + kSmiShiftSize;
// Helper functions for generating invokes.
void InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual, Label* done,
void InvokePrologue(Register expected, Register actual, Label* done,
bool* definitely_mismatches, InvokeFlag flag);
// Compute memory operands for safepoint stack slots.
......
......@@ -1201,39 +1201,25 @@ void TurboAssembler::MovFromFloatParameter(const DoubleRegister dst) {
Move(dst, d0);
}
void TurboAssembler::PrepareForTailCall(const ParameterCount& callee_args_count,
Register caller_args_count_reg,
void TurboAssembler::PrepareForTailCall(Register callee_args_count,
Register caller_args_count,
Register scratch0, Register scratch1) {
#if DEBUG
if (callee_args_count.is_reg()) {
DCHECK(!AreAliased(callee_args_count.reg(), caller_args_count_reg, scratch0,
scratch1));
} else {
DCHECK(!AreAliased(caller_args_count_reg, scratch0, scratch1));
}
#endif
DCHECK(!AreAliased(callee_args_count, caller_args_count, scratch0, scratch1));
// Calculate the end of destination area where we will put the arguments
// after we drop current frame. We AddP kSystemPointerSize to count the
// receiver argument which is not included into formal parameters count.
Register dst_reg = scratch0;
ShiftLeftP(dst_reg, caller_args_count_reg, Operand(kSystemPointerSizeLog2));
ShiftLeftP(dst_reg, caller_args_count, Operand(kSystemPointerSizeLog2));
AddP(dst_reg, fp, dst_reg);
AddP(dst_reg, dst_reg,
Operand(StandardFrameConstants::kCallerSPOffset + kSystemPointerSize));
Register src_reg = caller_args_count_reg;
Register src_reg = caller_args_count;
// Calculate the end of source area. +kSystemPointerSize is for the receiver.
if (callee_args_count.is_reg()) {
ShiftLeftP(src_reg, callee_args_count.reg(),
Operand(kSystemPointerSizeLog2));
AddP(src_reg, sp, src_reg);
AddP(src_reg, src_reg, Operand(kSystemPointerSize));
} else {
mov(src_reg,
Operand((callee_args_count.immediate() + 1) * kSystemPointerSize));
AddP(src_reg, src_reg, sp);
}
ShiftLeftP(src_reg, callee_args_count, Operand(kSystemPointerSizeLog2));
AddP(src_reg, sp, src_reg);
AddP(src_reg, src_reg, Operand(kSystemPointerSize));
if (FLAG_debug_code) {
CmpLogicalP(src_reg, dst_reg);
......@@ -1251,11 +1237,7 @@ void TurboAssembler::PrepareForTailCall(const ParameterCount& callee_args_count,
// so they must be pre-decremented in the loop.
Register tmp_reg = scratch1;
Label loop;
if (callee_args_count.is_reg()) {
AddP(tmp_reg, callee_args_count.reg(), Operand(1)); // +1 for receiver
} else {
mov(tmp_reg, Operand(callee_args_count.immediate() + 1));
}
AddP(tmp_reg, callee_args_count, Operand(1)); // +1 for receiver
LoadRR(r1, tmp_reg);
bind(&loop);
LoadP(tmp_reg, MemOperand(src_reg, -kSystemPointerSize));
......@@ -1268,9 +1250,8 @@ void TurboAssembler::PrepareForTailCall(const ParameterCount& callee_args_count,
LoadRR(sp, dst_reg);
}
void MacroAssembler::InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual, Label* done,
bool* definitely_mismatches,
void MacroAssembler::InvokePrologue(Register expected, Register actual,
Label* done, bool* definitely_mismatches,
InvokeFlag flag) {
bool definitely_matches = false;
*definitely_mismatches = false;
......@@ -1287,37 +1268,11 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
// passed in registers.
// ARM has some sanity checks as per below, considering add them for S390
DCHECK(actual.is_immediate() || actual.reg() == r2);
DCHECK(expected.is_immediate() || expected.reg() == r4);
if (expected.is_immediate()) {
DCHECK(actual.is_immediate());
mov(r2, Operand(actual.immediate()));
if (expected.immediate() == actual.immediate()) {
definitely_matches = true;
} else {
const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel;
if (expected.immediate() == sentinel) {
// Don't worry about adapting arguments for builtins that
// don't want that done. Skip adaption code by making it look
// like we have a match between expected and actual number of
// arguments.
definitely_matches = true;
} else {
*definitely_mismatches = true;
mov(r4, Operand(expected.immediate()));
}
}
} else {
if (actual.is_immediate()) {
mov(r2, Operand(actual.immediate()));
CmpPH(expected.reg(), Operand(actual.immediate()));
beq(&regular_invoke);
} else {
CmpP(expected.reg(), actual.reg());
beq(&regular_invoke);
}
}
DCHECK(actual == r2);
DCHECK(expected == r4);
CmpP(expected, actual);
beq(&regular_invoke);
if (!definitely_matches) {
Handle<Code> adaptor = BUILTIN_CODE(isolate(), ArgumentsAdaptorTrampoline);
......@@ -1334,8 +1289,7 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
}
void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual) {
Register expected, Register actual) {
Label skip_hook;
ExternalReference debug_hook_active =
......@@ -1346,23 +1300,14 @@ void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
{
// Load receiver to pass it later to DebugOnFunctionCall hook.
if (actual.is_reg()) {
ShiftLeftP(r6, actual.reg(), Operand(kSystemPointerSizeLog2));
LoadP(r6, MemOperand(sp, r6));
} else {
LoadP(r6, MemOperand(sp, actual.immediate() << kSystemPointerSizeLog2),
ip);
}
ShiftLeftP(r6, actual, Operand(kSystemPointerSizeLog2));
LoadP(r6, MemOperand(sp, r6));
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());
}
SmiTag(expected);
Push(expected);
SmiTag(actual);
Push(actual);
if (new_target.is_valid()) {
Push(new_target);
}
......@@ -1372,27 +1317,21 @@ void MacroAssembler::CheckDebugHook(Register fun, Register new_target,
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());
}
Pop(actual);
SmiUntag(actual);
Pop(expected);
SmiUntag(expected);
}
bind(&skip_hook);
}
void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual,
Register expected, Register actual,
InvokeFlag flag) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
DCHECK(function == r3);
DCHECK_IMPLIES(new_target.is_valid(), new_target == r5);
// On function call, call into the debugger if necessary.
CheckDebugHook(function, new_target, expected, actual);
......@@ -1425,8 +1364,7 @@ void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
}
void MacroAssembler::InvokeFunction(Register fun, Register new_target,
const ParameterCount& actual,
InvokeFlag flag) {
Register actual, InvokeFlag flag) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
......@@ -1442,24 +1380,7 @@ void MacroAssembler::InvokeFunction(Register fun, Register new_target,
FieldMemOperand(temp_reg,
SharedFunctionInfo::kFormalParameterCountOffset));
ParameterCount expected(expected_reg);
InvokeFunctionCode(fun, new_target, expected, actual, flag);
}
void MacroAssembler::InvokeFunction(Register function,
const ParameterCount& expected,
const ParameterCount& actual,
InvokeFlag flag) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
// Contract with called JS functions requires that function is passed in r3.
DCHECK(function == r3);
// Get the function and setup the context.
LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset));
InvokeFunctionCode(r3, no_reg, expected, actual, flag);
InvokeFunctionCode(fun, new_target, expected_reg, actual, flag);
}
void MacroAssembler::MaybeDropFrames() {
......
......@@ -804,8 +804,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
#endif
}
void PrepareForTailCall(const ParameterCount& callee_args_count,
Register caller_args_count_reg, Register scratch0,
void PrepareForTailCall(Register callee_args_count,
Register caller_args_count, Register scratch0,
Register scratch1);
// ---------------------------------------------------------------------------
......@@ -1119,27 +1119,22 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// Removes current frame and its arguments from the stack preserving
// the arguments and a return address pushed to the stack for the next call.
// Both |callee_args_count| and |caller_args_count_reg| do not include
// receiver. |callee_args_count| is not modified, |caller_args_count_reg|
// Both |callee_args_count| and |caller_args_count| do not include
// receiver. |callee_args_count| is not modified. |caller_args_count|
// is trashed.
// Invoke the JavaScript function code by either calling or jumping.
void InvokeFunctionCode(Register function, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual, InvokeFlag flag);
Register expected, Register actual, InvokeFlag flag);
// On function call, call into the debugger if necessary.
void CheckDebugHook(Register fun, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual);
void CheckDebugHook(Register fun, Register new_target, Register expected,
Register actual);
// Invoke the JavaScript function in the given register. Changes the
// current context to the context in the function before invoking.
void InvokeFunction(Register function, Register new_target,
const ParameterCount& actual, InvokeFlag flag);
void InvokeFunction(Register function, const ParameterCount& expected,
const ParameterCount& actual, InvokeFlag flag);
void InvokeFunction(Register function, Register new_target, Register actual,
InvokeFlag flag);
// Frame restart support
void MaybeDropFrames();
......@@ -1276,8 +1271,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
private:
static const int kSmiShift = kSmiTagSize + kSmiShiftSize;
// Helper functions for generating invokes.
void InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual, Label* done,
void InvokePrologue(Register expected, Register actual, Label* done,
bool* definitely_mismatches, InvokeFlag flag);
// Compute memory operands for safepoint stack slots.
......
......@@ -704,9 +704,7 @@ void CodeGenerator::AssemblePopArgumentsAdaptorFrame(Register args_reg,
MemOperand(fp, ArgumentsAdaptorFrameConstants::kLengthOffset));
__ SmiUntag(caller_args_count_reg);
ParameterCount callee_args_count(args_reg);
__ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2,
scratch3);
__ PrepareForTailCall(args_reg, caller_args_count_reg, scratch2, scratch3);
__ bind(&done);
}
......
......@@ -1193,9 +1193,7 @@ void CodeGenerator::AssemblePopArgumentsAdaptorFrame(Register args_reg,
MemOperand(fp, ArgumentsAdaptorFrameConstants::kLengthOffset));
__ SmiUntag(caller_args_count_reg);
ParameterCount callee_args_count(args_reg);
__ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2,
scratch3);
__ PrepareForTailCall(args_reg, caller_args_count_reg, scratch2, scratch3);
__ bind(&done);
}
......
......@@ -41,9 +41,7 @@ void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) {
FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset));
__ mr(r5, r3);
ParameterCount dummy1(r5);
ParameterCount dummy2(r3);
__ InvokeFunction(r4, dummy1, dummy2, JUMP_FUNCTION);
__ InvokeFunction(r4, r5, r3, JUMP_FUNCTION);
}
const bool LiveEdit::kFrameDropperSupported = true;
......
......@@ -43,9 +43,7 @@ void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) {
r2, FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset));
__ LoadRR(r4, r2);
ParameterCount dummy1(r4);
ParameterCount dummy2(r2);
__ InvokeFunction(r3, dummy1, dummy2, JUMP_FUNCTION);
__ InvokeFunction(r3, r4, r2, JUMP_FUNCTION);
}
const bool LiveEdit::kFrameDropperSupported = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment