Remove uses of result_size in TailCallRuntime and friends

JumpToExternalReference ignored the passed-in result_size argument, which
defaulted to 1. This change updates all users to not use a result_size.

BUG=

Review URL: https://codereview.chromium.org/1550923002

Cr-Commit-Position: refs/heads/master@{#33059}
This commit is contained in:
cbruni 2015-12-29 09:19:45 -08:00 committed by Commit bot
parent bae0d6c8dc
commit b24fc48134
57 changed files with 435 additions and 494 deletions

View File

@ -186,7 +186,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ bind(&symbol_descriptive_string);
{
__ Push(r0);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1322,7 +1322,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Drop the arguments (including the receiver)
__ add(r0, r0, Operand(1));
__ add(sp, sp, Operand(r0, LSL, kPointerSizeLog2));
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
@ -1448,7 +1448,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ str(r1, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1547,7 +1547,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ str(r1, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1610,14 +1610,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ str(r1, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ bind(&new_target_not_constructor);
{
__ str(r3, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1756,7 +1756,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ cmp(ip, Operand(r2, LSL, kPointerSizeLog2));
__ b(gt, &done); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}

View File

@ -682,8 +682,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
if (cc == eq) {
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
int ncr; // NaN compare result
if (cc == lt || cc == le) {
@ -698,8 +697,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -901,7 +900,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1405,12 +1404,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(scratch, Smi::FromInt(0));
__ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -1512,7 +1511,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(r1);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -1539,7 +1538,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(r1, r3, r2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1739,7 +1738,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// r5 = argument count (tagged)
__ bind(&runtime);
__ Push(r1, r3, r5);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1758,7 +1757,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1851,7 +1850,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ Push(r1, r3, r2);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -1876,7 +1875,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ str(r3, MemOperand(sp, 3 * kPointerSize));
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -1885,7 +1884,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2156,7 +2155,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ b(eq, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ bind(&failure);
// For failure and exception return null.
@ -2251,7 +2250,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -3001,7 +3000,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// r0: original string
@ -3041,7 +3040,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ Ret();
__ bind(&slow_string);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -3052,7 +3051,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3067,7 +3066,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3097,7 +3096,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -3227,7 +3226,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
// tagged as a small integer.
__ bind(&runtime);
__ Push(r1, r0);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3269,7 +3268,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ CheckMap(r1, r2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
__ CheckMap(r0, r3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ ldr(r1, FieldMemOperand(r1, Oddball::kToNumberOffset));
@ -3530,9 +3529,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3578,7 +3577,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(r0, r0, Operand(r1));
__ Ret();
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ mov(r2, Operand(Smi::FromInt(GREATER)));
@ -3586,7 +3585,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ mov(r2, Operand(Smi::FromInt(LESS)));
}
__ Push(r1, r0, r2);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -4946,7 +4945,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
// Fallback to runtime.
__ SmiTag(slot);
__ push(slot);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5071,7 +5070,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5198,7 +5197,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -2482,8 +2482,7 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -2494,11 +2493,8 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -1085,13 +1085,10 @@ class MacroAssembler: public Assembler {
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
int CalculateStackPassedWords(int num_reg_arguments,
int num_double_arguments);

View File

@ -189,7 +189,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ Bind(&symbol_descriptive_string);
{
__ Push(x0);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1302,7 +1302,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Drop the arguments (including the receiver)
__ add(x0, x0, Operand(1));
__ Drop(x0);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
@ -1424,7 +1424,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ Bind(&receiver_not_callable);
{
__ Poke(x1, 0);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1531,7 +1531,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ Bind(&target_not_callable);
{
__ Poke(x1, 0);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1600,14 +1600,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ Bind(&target_not_constructor);
{
__ Poke(x1, 0);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ Bind(&new_target_not_constructor);
{
__ Poke(x3, 0);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1744,7 +1744,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ Cmp(x10, Operand(x2, LSL, kPointerSizeLog2));
__ B(gt, &done); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ Bind(&done);
}

View File

@ -653,8 +653,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
if (cond == eq) {
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
int ncr; // NaN compare result
if ((cond == lt) || (cond == le)) {
@ -669,8 +668,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ Bind(&miss);
@ -966,7 +965,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ Bind(&call_runtime);
// Put the arguments back on the stack.
__ Push(base_tagged, exponent_tagged);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// Return.
__ Bind(&done);
@ -1609,12 +1608,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(scratch, Smi::FromInt(0));
__ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -1665,7 +1664,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// the runtime system.
__ Bind(&slow);
__ Push(key);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -1696,7 +1695,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ Bind(&runtime);
__ Push(x1, x3, x2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1971,7 +1970,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ Bind(&runtime);
__ Push(function, recv_arg, arg_count_smi);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1987,7 +1986,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
// Everything is fine, call runtime.
__ Push(receiver, key);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ Bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -2119,7 +2118,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ Bind(&runtime);
__ Push(function, params, param_count_smi);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -2168,13 +2167,13 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ Bind(&runtime);
__ Push(params, param_count_smi, rest_index_smi, language_mode_smi);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
void RegExpExecStub::Generate(MacroAssembler* masm) {
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2615,7 +2614,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ B(eq, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ Bind(&failure);
__ Mov(x0, Operand(isolate()->factory()->null_value()));
@ -2624,7 +2623,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ Ret();
__ Bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -3155,7 +3154,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ CheckMap(x1, x2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
__ CheckMap(x0, x3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ Ldr(x1, FieldMemOperand(x1, Oddball::kToNumberOffset));
@ -3409,9 +3408,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ Bind(&runtime);
__ Push(lhs, rhs);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ Bind(&miss);
@ -3471,7 +3470,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Sub(result, rhs, lhs);
__ Ret();
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
Register ncr = x2;
if (op() == Token::LT || op() == Token::LTE) {
@ -3480,7 +3479,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Mov(ncr, Smi::FromInt(LESS));
}
__ Push(lhs, rhs, ncr);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ Bind(&miss);
@ -3754,7 +3753,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
__ Ret();
__ Bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// x1: result_length
@ -3800,7 +3799,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ Ret();
__ Bind(&slow_string);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ Bind(&not_string);
Label not_oddball;
@ -3811,7 +3810,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ Bind(&not_oddball);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3826,7 +3825,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ Bind(&not_smi);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3858,7 +3857,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ Bind(&not_oddball);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -4002,7 +4001,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
// Returns -1 (less), 0 (equal), or 1 (greater) tagged as a small integer.
__ Bind(&runtime);
__ Push(x1, x0);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -5371,7 +5370,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Bind(&slow_case);
__ SmiTag(slot);
__ Push(slot);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5492,7 +5491,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5645,7 +5644,7 @@ static void CallApiFunctionAndReturn(
// Re-throw by promoting a scheduled exception.
__ Bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
__ Bind(&delete_allocated_handles);

View File

@ -1728,8 +1728,7 @@ void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -1740,11 +1739,8 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -1101,9 +1101,7 @@ class MacroAssembler : public Assembler {
CallRuntime(function, function->nargs, kSaveFPRegs);
}
void TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
int ActivationFrameAlignment();
@ -1127,8 +1125,7 @@ class MacroAssembler : public Assembler {
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size);
int num_arguments);
void CallExternalReference(const ExternalReference& ext,
int num_arguments);

View File

@ -2714,12 +2714,12 @@ const char* Builtins::Lookup(byte* pc) {
void Builtins::Generate_InterruptCheck(MacroAssembler* masm) {
masm->TailCallRuntime(Runtime::kInterrupt, 0, 1);
masm->TailCallRuntime(Runtime::kInterrupt, 0);
}
void Builtins::Generate_StackCheck(MacroAssembler* masm) {
masm->TailCallRuntime(Runtime::kStackGuard, 0, 1);
masm->TailCallRuntime(Runtime::kStackGuard, 0);
}

View File

@ -1072,7 +1072,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1181,7 +1181,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1251,14 +1251,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ bind(&new_target_not_constructor);
{
__ mov(Operand(esp, kPointerSize), edx);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1377,7 +1377,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ PopReturnAddressTo(ecx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1623,7 +1623,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ cmp(ecx, ebx);
__ j(greater, &done, Label::kNear); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}
@ -2314,7 +2314,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
__ PushReturnAddressFrom(ebx);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
}

View File

@ -617,7 +617,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -688,7 +688,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ push(scratch); // return address
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -787,7 +787,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
__ pop(ebx); // Return address.
__ push(edx);
__ push(ebx);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -819,7 +819,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ push(edx); // Push parameters pointer.
__ push(ecx); // Push parameter count.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1054,7 +1054,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
__ push(edx); // Push parameters pointer.
__ push(ecx); // Push parameter count.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1148,7 +1148,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
__ push(edx); // Push parameters pointer.
__ push(ecx); // Push parameter count.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -1174,7 +1174,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ mov(Operand(esp, 4 * kPointerSize), edx);
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -1183,7 +1183,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -1461,7 +1461,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ j(equal, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ bind(&failure);
// For failure to match, return null.
@ -1553,7 +1553,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (7) Not a long external string? If yes, go to (10).
@ -1906,8 +1906,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Figure out which native to call and setup the arguments.
if (cc == equal) {
__ push(ecx);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
__ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
@ -1917,8 +1916,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -2615,7 +2614,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(eax, Immediate(Smi::FromInt(0)));
__ StoreRoot(eax, scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
@ -2623,7 +2622,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
__ Push(object);
__ Push(function);
__ PushReturnAddressFrom(scratch);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -3014,7 +3013,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// eax: string
@ -3059,7 +3058,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -3072,7 +3071,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3091,7 +3090,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3126,7 +3125,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -3289,7 +3288,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ Push(edx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3334,7 +3333,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ JumpIfNotRoot(ecx, Heap::kBooleanMapRootIndex, &miss, miss_distance);
__ JumpIfNotRoot(ebx, Heap::kBooleanMapRootIndex, &miss, miss_distance);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset));
@ -3630,9 +3629,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ push(right);
__ push(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3679,14 +3678,14 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(eax, edx);
__ ret(0);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
__ PopReturnAddressTo(ecx);
__ Push(edx);
__ Push(eax);
__ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition()))));
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -5158,7 +5157,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Pop(result_reg); // Pop return address.
__ Push(slot_reg);
__ Push(result_reg); // Push return address.
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5282,7 +5281,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5453,7 +5452,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
ExternalReference delete_extensions =

View File

@ -1901,8 +1901,7 @@ void MacroAssembler::CallExternalReference(ExternalReference ref,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -1913,11 +1912,8 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -689,11 +689,10 @@ class MacroAssembler: public Assembler {
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments, int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
// Before calling a C-function from generated code, align arguments on stack.
// After aligning the frame, arguments must be stored in esp[0], esp[4],

View File

@ -325,7 +325,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -334,7 +334,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -708,7 +708,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -733,7 +733,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(ip, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -745,7 +745,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -310,7 +310,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -324,7 +324,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -340,7 +340,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -354,7 +354,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -472,7 +472,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}
@ -777,7 +777,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}

View File

@ -22,7 +22,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ Push(r0);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -319,7 +319,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -329,7 +329,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -379,7 +379,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -769,7 +769,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -797,7 +797,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(receiver(), holder_reg, scratch1(), scratch2(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -294,7 +294,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister());
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -306,7 +306,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -325,7 +325,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -337,7 +337,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -480,8 +480,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
ASM_LOCATION("KeyedStoreIC::GenerateMiss");
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}
@ -770,7 +769,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}

View File

@ -23,7 +23,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ Push(x10);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}
#undef __

View File

@ -323,7 +323,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -332,7 +332,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -725,7 +725,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
__ push(scratch2()); // restore old return address
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -750,7 +750,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -766,7 +766,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -27,7 +27,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ push(ebx); // return address
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -673,7 +673,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -692,7 +692,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -704,7 +704,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -723,7 +723,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -756,7 +756,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}
@ -798,7 +798,7 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}

View File

@ -315,7 +315,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -324,7 +324,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -699,7 +699,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -722,7 +722,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(at, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -734,7 +734,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -22,7 +22,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ Push(a0);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -317,7 +317,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -331,7 +331,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -347,7 +347,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -360,7 +360,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -749,7 +749,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}
@ -775,7 +775,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}

View File

@ -315,7 +315,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -324,7 +324,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -699,7 +699,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -722,7 +722,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(at, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -734,7 +734,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -22,7 +22,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ Push(a0);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -314,7 +314,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -328,7 +328,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -344,7 +344,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -357,7 +357,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -747,7 +747,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}
@ -773,7 +773,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}

View File

@ -324,7 +324,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -333,7 +333,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -705,7 +705,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -729,7 +729,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(ip, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -741,7 +741,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -20,7 +20,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
StoreDescriptor::ValueRegister(), r0);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -320,7 +320,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -334,7 +334,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -350,7 +350,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -363,7 +363,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -482,7 +482,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}
@ -786,7 +786,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}

View File

@ -326,7 +326,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -335,7 +335,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -716,7 +716,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
__ PushReturnAddressFrom(scratch2());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -741,7 +741,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ PushReturnAddressFrom(scratch1());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -757,7 +757,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ PushReturnAddressFrom(scratch1());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -28,7 +28,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ PushReturnAddressFrom(rbx);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -673,7 +673,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -693,7 +693,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -706,7 +706,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -726,7 +726,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -761,7 +761,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}
@ -792,7 +792,7 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}

View File

@ -323,7 +323,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
}
@ -332,7 +332,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
}
@ -725,7 +725,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
__ push(scratch2()); // restore old return address
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
NamedLoadHandlerCompiler::kInterceptorArgsLength);
}
@ -750,7 +750,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -766,7 +766,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -27,7 +27,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty(
__ push(ebx); // return address
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kSetProperty, 4, 1);
__ TailCallRuntime(Runtime::kSetProperty, 4);
}

View File

@ -673,7 +673,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
}
@ -692,7 +692,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2, 1);
2);
}
@ -704,7 +704,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
}
@ -723,7 +723,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2, 1);
2);
}
@ -756,7 +756,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
}
@ -798,7 +798,7 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
}

View File

@ -195,7 +195,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ bind(&symbol_descriptive_string);
{
__ Push(a0);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1335,7 +1335,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Drop the arguments (including the receiver);
__ Addu(t8, t8, Operand(kPointerSize));
__ addu(sp, t8, zero_reg);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
@ -1457,7 +1457,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ sw(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1566,7 +1566,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ sw(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1637,14 +1637,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ sw(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ bind(&new_target_not_constructor);
{
__ sw(a3, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1781,7 +1781,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ sll(at, a2, kPointerSizeLog2);
__ Branch(&done, gt, t0, Operand(at)); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}

View File

@ -728,8 +728,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
if (cc == eq) {
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
int ncr; // NaN compare result.
if (cc == lt || cc == le) {
@ -744,8 +743,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -979,7 +978,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1533,12 +1532,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
DCHECK(Smi::FromInt(0) == 0);
__ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -1609,7 +1608,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(a1);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -1637,7 +1636,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a3, a2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1851,7 +1850,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// t1 = argument count (tagged)
__ bind(&runtime);
__ Push(a1, a3, t1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1870,7 +1869,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1964,7 +1963,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ Push(a1, a3, a2);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -1992,7 +1991,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -2001,7 +2000,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2286,7 +2285,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ Branch(&runtime, eq, v0, Operand(a1));
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ bind(&failure);
// For failure and exception return null.
@ -2382,7 +2381,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -3156,7 +3155,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// v0: original string
@ -3201,7 +3200,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ mov(v0, a0);
__ bind(&slow_string);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -3211,7 +3210,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3228,7 +3227,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3260,7 +3259,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -3398,7 +3397,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a0);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3437,7 +3436,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ CheckMap(a1, a2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
__ CheckMap(a0, a3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ lw(a1, FieldMemOperand(a1, Oddball::kToNumberOffset));
@ -3730,9 +3729,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3776,7 +3775,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Ret(USE_DELAY_SLOT);
__ subu(v0, a0, a1);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ li(a2, Operand(Smi::FromInt(GREATER)));
@ -3784,7 +3783,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ li(a2, Operand(Smi::FromInt(LESS)));
}
__ Push(a1, a0, a2);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -5176,7 +5175,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ bind(&slow_case);
__ SmiTag(slot_reg);
__ Push(slot_reg);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5291,7 +5290,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5415,7 +5414,7 @@ static void CallApiFunctionAndReturn(
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -4522,8 +4522,7 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -4534,11 +4533,8 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -1260,13 +1260,10 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
int CalculateStackPassedWords(int num_reg_arguments,
int num_double_arguments);

View File

@ -194,7 +194,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ bind(&symbol_descriptive_string);
{
__ Push(a0);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1326,7 +1326,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Drop the arguments (including the receiver);
__ Daddu(t8, t8, Operand(kPointerSize));
__ daddu(sp, t8, zero_reg);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
@ -1448,7 +1448,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ sd(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1557,7 +1557,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ sd(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1628,14 +1628,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ sd(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ bind(&new_target_not_constructor);
{
__ sd(a3, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1773,7 +1773,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ dsll(at, a2, kPointerSizeLog2);
__ Branch(&done, gt, a4, Operand(at)); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}

View File

@ -725,8 +725,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
if (cc == eq) {
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
int ncr; // NaN compare result.
if (cc == lt || cc == le) {
@ -741,8 +740,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -977,7 +976,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1535,12 +1534,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
DCHECK(Smi::FromInt(0) == 0);
__ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -1611,7 +1610,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(a1);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -1639,7 +1638,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a3, a2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1853,7 +1852,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// a5 = argument count (tagged)
__ bind(&runtime);
__ Push(a1, a3, a5);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1872,7 +1871,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1966,7 +1965,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ Push(a1, a3, a2);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -1995,7 +1994,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -2004,7 +2003,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2321,7 +2320,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ Branch(&runtime, eq, v0, Operand(a1));
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ bind(&failure);
// For failure and exception return null.
@ -2417,7 +2416,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -3188,7 +3187,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// v0: original string
@ -3233,7 +3232,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ mov(v0, a0);
__ bind(&slow_string);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -3243,7 +3242,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3260,7 +3259,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3292,7 +3291,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -3430,7 +3429,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a0);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3469,7 +3468,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ CheckMap(a1, a2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
__ CheckMap(a0, a3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ ld(a1, FieldMemOperand(a1, Oddball::kToNumberOffset));
@ -3762,9 +3761,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3808,7 +3807,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Ret(USE_DELAY_SLOT);
__ dsubu(v0, a0, a1);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ li(a2, Operand(Smi::FromInt(GREATER)));
@ -3816,7 +3815,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ li(a2, Operand(Smi::FromInt(LESS)));
}
__ Push(a1, a0, a2);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -5202,7 +5201,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ bind(&slow_case);
__ SmiTag(slot_reg);
__ Push(slot_reg);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5317,7 +5316,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5442,7 +5441,7 @@ static void CallApiFunctionAndReturn(
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -5055,8 +5055,7 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -5067,11 +5066,8 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -1376,13 +1376,10 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
int CalculateStackPassedWords(int num_reg_arguments,
int num_double_arguments);

View File

@ -187,7 +187,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ bind(&symbol_descriptive_string);
{
__ Push(r3);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1320,7 +1320,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Drop the arguments (including the receiver);
__ addi(r11, r11, Operand(kPointerSize));
__ add(sp, sp, r11);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
@ -1457,7 +1457,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ StoreP(r4, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1566,7 +1566,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ StoreP(r4, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1637,14 +1637,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ StoreP(r4, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ bind(&new_target_not_constructor);
{
__ StoreP(r6, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1789,7 +1789,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
__ ShiftLeftImm(r0, r5, Operand(kPointerSizeLog2));
__ cmp(ip, r0); // Signed comparison.
__ bgt(&done);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}

View File

@ -708,8 +708,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
if (cc == eq) {
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
int ncr; // NaN compare result
if (cc == lt || cc == le) {
@ -724,8 +723,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -948,7 +947,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1492,12 +1491,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ LoadSmiLiteral(scratch, Smi::FromInt(0));
__ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -1602,7 +1601,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(r4);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -1630,7 +1629,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(r4, r6, r5);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1872,7 +1871,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// r8 = argument count (tagged)
__ bind(&runtime);
__ Push(r4, r6, r8);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -1891,7 +1890,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1983,7 +1982,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ Push(r4, r6, r5);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -2009,7 +2008,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ StoreP(r6, MemOperand(sp, 3 * kPointerSize));
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -2018,7 +2017,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2313,7 +2312,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ beq(&runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ bind(&failure);
// For failure and exception return null.
@ -2402,7 +2401,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -3154,7 +3153,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// r3: original string
@ -3194,7 +3193,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ blr();
__ bind(&slow_string);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -3205,7 +3204,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3227,7 +3226,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3257,7 +3256,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -3412,7 +3411,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
// tagged as a small integer.
__ bind(&runtime);
__ Push(r4, r3);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3454,7 +3453,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ CheckMap(r4, r5, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
__ CheckMap(r3, r6, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ LoadP(r4, FieldMemOperand(r4, Oddball::kToNumberOffset));
@ -3738,9 +3737,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3786,7 +3785,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(r3, r3, r4);
__ Ret();
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ LoadSmiLiteral(r5, Smi::FromInt(GREATER));
@ -3794,7 +3793,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ LoadSmiLiteral(r5, Smi::FromInt(LESS));
}
__ Push(r4, r3, r5);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -5183,7 +5182,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
// Fallback to runtime.
__ SmiTag(slot);
__ Push(slot);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5312,7 +5311,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5448,7 +5447,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -2313,8 +2313,7 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -2324,10 +2323,9 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments,
result_size);
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -949,11 +949,10 @@ class MacroAssembler : public Assembler {
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments, int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
int CalculateStackPassedWords(int num_reg_arguments,
int num_double_arguments);

View File

@ -56,7 +56,7 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm,
// including the receiver and the extra arguments.
__ addp(rax, Immediate(num_extra_args + 1));
__ JumpToExternalReference(ExternalReference(id, masm->isolate()), 1);
__ JumpToExternalReference(ExternalReference(id, masm->isolate()));
}
@ -1126,7 +1126,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1242,7 +1242,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1316,7 +1316,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdi);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
@ -1324,7 +1324,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdx);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1446,7 +1446,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx);
__ Push(rax);
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1824,7 +1824,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ cmpp(rcx, rbx);
__ j(greater, &done, Label::kNear); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}
@ -2118,7 +2118,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
__ addp(rax, Immediate(2));
// Tail-call to the runtime.
__ JumpToExternalReference(
ExternalReference(Runtime::kJSProxyCall, masm->isolate()), 1);
ExternalReference(Runtime::kJSProxyCall, masm->isolate()));
// 2. Call to something else, which might have a [[Call]] internal method (if
// not we raise an exception).
@ -2214,7 +2214,7 @@ void Builtins::Generate_ConstructProxy(MacroAssembler* masm) {
// Include the pushed new_target, constructor and the receiver.
__ addp(rax, Immediate(3));
__ JumpToExternalReference(
ExternalReference(Runtime::kJSProxyConstruct, masm->isolate()), 1);
ExternalReference(Runtime::kJSProxyConstruct, masm->isolate()));
}
@ -2394,7 +2394,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
__ PushReturnAddressFrom(rbx);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
}

View File

@ -491,7 +491,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in rax.
@ -591,7 +591,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
__ PopReturnAddressTo(rbx);
__ Push(rdx);
__ PushReturnAddressFrom(rbx);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -803,7 +803,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
__ Push(rdx); // Push parameters pointer.
__ Push(r11); // Push parameter count.
__ PushReturnAddressFrom(rax);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -837,7 +837,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ Push(rdx); // Push parameters pointer.
__ Push(rcx); // Push parameter count.
__ PushReturnAddressFrom(rax);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -865,7 +865,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ movp(args.GetArgumentOperand(0), rdx);
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -889,7 +889,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ PushReturnAddressFrom(scratch);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1023,7 +1023,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
__ Push(rdx); // Push parameters pointer.
__ Push(rcx); // Push parameter count.
__ PushReturnAddressFrom(rax);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -1032,7 +1032,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -1415,11 +1415,11 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ j(equal, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (7) Not a long external string? If yes, go to (10).
@ -1763,14 +1763,13 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Figure out which native to call and setup the arguments.
if (cc == equal) {
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
__ Push(Smi::FromInt(NegativeComparisonResult(cc)));
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -2566,7 +2565,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(rax, Smi::FromInt(0));
__ StoreRoot(rax, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
@ -2574,7 +2573,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
__ Push(object);
__ Push(function);
__ PushReturnAddressFrom(kScratchRegister);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -2951,7 +2950,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// rax: string
@ -2997,7 +2996,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -3010,7 +3009,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -3029,7 +3028,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -3064,7 +3063,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -3239,7 +3238,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ Push(rdx);
__ Push(rax);
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3284,7 +3283,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ JumpIfNotRoot(rcx, Heap::kBooleanMapRootIndex, &miss, miss_distance);
__ JumpIfNotRoot(rbx, Heap::kBooleanMapRootIndex, &miss, miss_distance);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ movp(rax, FieldOperand(rax, Oddball::kToNumberOffset));
@ -3566,9 +3565,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ Push(right);
__ PushReturnAddressFrom(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3613,14 +3612,14 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ subp(rax, rdx);
__ ret(0);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
__ PopReturnAddressTo(rcx);
__ Push(rdx);
__ Push(rax);
__ Push(Smi::FromInt(NegativeComparisonResult(GetCondition())));
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -4773,8 +4772,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
__ Push(rdx);
__ Push(rbx);
__ PushReturnAddressFrom(rcx);
__ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate()),
1);
__ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate()));
}
@ -4893,7 +4891,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(kScratchRegister);
__ Push(slot_reg);
__ Push(kScratchRegister);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -5017,7 +5015,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5191,7 +5189,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -663,8 +663,7 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// ----------- S t a t e -------------
// -- rsp[0] : return address
// -- rsp[8] : argument num_arguments - 1
@ -677,24 +676,20 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
// should remove this need and make the runtime routine entry code
// smarter.
Set(rax, num_arguments);
JumpToExternalReference(ext, result_size);
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}
void MacroAssembler::JumpToExternalReference(const ExternalReference& ext,
int result_size) {
void MacroAssembler::JumpToExternalReference(const ExternalReference& ext) {
// Set the entry point and jump to the C entry runtime stub.
LoadAddress(rbx, ext);
CEntryStub ces(isolate(), result_size);
CEntryStub ces(isolate(), 1);
jmp(ces.GetCode(), RelocInfo::CODE_TARGET);
}

View File

@ -1424,16 +1424,13 @@ class MacroAssembler: public Assembler {
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
// Jump to a runtime routine.
void JumpToExternalReference(const ExternalReference& ext, int result_size);
void JumpToExternalReference(const ExternalReference& ext);
// Before calling a C-function from generated code, align arguments on stack.
// After aligning the frame, arguments must be stored in rsp[0], rsp[8],

View File

@ -1072,7 +1072,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1181,7 +1181,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
}
}
@ -1251,14 +1251,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ bind(&new_target_not_constructor);
{
__ mov(Operand(esp, kPointerSize), edx);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
}
@ -1377,7 +1377,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ PopReturnAddressTo(ecx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
}
}
@ -1623,7 +1623,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
// Check if the arguments will overflow the stack.
__ cmp(ecx, ebx);
__ j(greater, &done, Label::kNear); // Signed comparison.
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1, 1);
__ TailCallRuntime(Runtime::kThrowStackOverflow, 1);
__ bind(&done);
}
@ -2321,7 +2321,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
__ PushReturnAddressFrom(ebx);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
}
}

View File

@ -334,7 +334,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
__ TailCallRuntime(Runtime::kMathPowRT, 2);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -388,7 +388,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ push(scratch); // return address
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2, 1);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -488,7 +488,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
__ pop(ebx); // Return address.
__ push(edx);
__ push(ebx);
__ TailCallRuntime(Runtime::kArguments, 1, 1);
__ TailCallRuntime(Runtime::kArguments, 1);
}
@ -520,7 +520,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ push(edx); // Push parameters pointer.
__ push(ecx); // Push parameter count.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -755,7 +755,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
__ push(edx); // Push parameters pointer.
__ push(ecx); // Push parameter count.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
}
@ -849,7 +849,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
__ push(edx); // Push parameters pointer.
__ push(ecx); // Push parameter count.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
__ TailCallRuntime(Runtime::kNewStrictArguments, 3);
}
@ -875,7 +875,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ mov(Operand(esp, 4 * kPointerSize), edx);
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
}
@ -884,7 +884,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// time or if regexp entry in generated code is turned off runtime switch or
// at compilation.
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -1162,7 +1162,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ j(equal, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ bind(&failure);
// For failure to match, return null.
@ -1248,7 +1248,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
// Deferred code for string handling.
// (7) Not a long external string? If yes, go to (10).
@ -1613,8 +1613,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Figure out which native to call and setup the arguments.
if (cc == equal) {
__ push(ecx);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2);
} else {
__ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
@ -1624,8 +1623,8 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1);
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
}
__ bind(&miss);
@ -2327,7 +2326,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(eax, Immediate(Smi::FromInt(0)));
__ StoreRoot(eax, scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
@ -2335,7 +2334,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
__ Push(object);
__ Push(function);
__ PushReturnAddressFrom(scratch);
__ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
}
@ -2724,7 +2723,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3, 1);
__ TailCallRuntime(Runtime::kSubString, 3);
__ bind(&single_char);
// eax: string
@ -2769,7 +2768,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kStringToNumber, 1, 1);
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ bind(&not_string);
Label not_oddball;
@ -2782,7 +2781,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToNumber, 1, 1);
__ TailCallRuntime(Runtime::kToNumber, 1);
}
@ -2801,7 +2800,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToLength, 1, 1);
__ TailCallRuntime(Runtime::kToLength, 1);
}
@ -2836,7 +2835,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToString, 1, 1);
__ TailCallRuntime(Runtime::kToString, 1);
}
@ -2999,7 +2998,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ Push(edx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
@ -3044,7 +3043,7 @@ void CompareICStub::GenerateBooleans(MacroAssembler* masm) {
__ JumpIfNotRoot(ecx, Heap::kBooleanMapRootIndex, &miss, miss_distance);
__ JumpIfNotRoot(ebx, Heap::kBooleanMapRootIndex, &miss, miss_distance);
if (op() != Token::EQ_STRICT && is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
if (!Token::IsEqualityOp(op())) {
__ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset));
@ -3312,9 +3311,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ push(right);
__ push(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
__ TailCallRuntime(Runtime::kStringEquals, 2);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
__ TailCallRuntime(Runtime::kStringCompare, 2);
}
__ bind(&miss);
@ -3361,14 +3360,14 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(eax, edx);
__ ret(0);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
} else {
__ PopReturnAddressTo(ecx);
__ Push(edx);
__ Push(eax);
__ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition()))));
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kCompare, 3, 1);
__ TailCallRuntime(Runtime::kCompare, 3);
}
__ bind(&miss);
@ -4840,7 +4839,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Pop(result_reg); // Pop return address.
__ Push(slot_reg);
__ Push(result_reg); // Push return address.
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
@ -4964,7 +4963,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2, 1);
2);
}
@ -5135,7 +5134,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
// HandleScope limit has changed. Delete allocated extensions.
ExternalReference delete_extensions =

View File

@ -1866,8 +1866,7 @@ void MacroAssembler::CallExternalReference(ExternalReference ref,
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments,
int result_size) {
int num_arguments) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
@ -1878,11 +1877,8 @@ void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
int result_size) {
TailCallExternalReference(ExternalReference(fid, isolate()),
num_arguments,
result_size);
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
}

View File

@ -678,11 +678,10 @@ class MacroAssembler: public Assembler {
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments, int result_size);
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments,
int result_size);
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
// Before calling a C-function from generated code, align arguments on stack.
// After aligning the frame, arguments must be stored in esp[0], esp[4],