[runtime] TailCallRuntime and CallRuntime should use default argument

counts specified in runtime.h.

In the vast majority of the cases when we call into the runtime we use
the default number of arguments. Hence, there is not need to specify it
again. This CL also removes TailCallExternalReference as there were no
users.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33066}
This commit is contained in:
cbruni 2015-12-30 12:50:07 -08:00 committed by Commit bot
parent 797d1090ae
commit b889d79de1
81 changed files with 1343 additions and 1381 deletions

View File

@ -186,7 +186,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ bind(&symbol_descriptive_string);
{
__ Push(r0);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -267,7 +267,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r2, r1, r3); // first argument, constructor, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(r2);
}
__ str(r2, FieldMemOperand(r0, JSValue::kValueOffset));
@ -459,7 +459,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor, new_target and the object to the stack,
// and then the initial map as an argument to the runtime call.
__ Push(r1, r3, r4, r2);
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ Pop(r1, r3, r4);
// Continue with JSObject being successfully allocated
@ -489,7 +489,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// to the runtime call.
__ Push(r1, r3);
__ Push(r1, r3); // constructor function, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ mov(r4, r0);
__ Pop(r1, r3);
@ -626,7 +626,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ push(r1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -654,7 +654,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm, Register argc,
__ b(gt, &okay); // Signed comparison.
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -812,7 +812,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ LoadRoot(r2, Heap::kRealStackLimitRootIndex);
__ cmp(r9, Operand(r2));
__ b(hs, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -843,7 +843,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ cmp(sp, Operand(ip));
__ b(hs, &ok);
__ push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -962,7 +962,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ mov(r1, Operand(Smi::FromInt(static_cast<int>(type))));
__ push(r1);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -1141,7 +1141,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// registers.
__ stm(db_w, sp, kJSCallerSaved | kCalleeSaved);
// Pass the function and deoptimization type to the runtime system.
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ ldm(ia_w, sp, kJSCallerSaved | kCalleeSaved);
}
@ -1167,7 +1167,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass the function and deoptimization type to the runtime system.
__ mov(r0, Operand(Smi::FromInt(static_cast<int>(type))));
__ push(r0);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
}
// Get the full codegen state from the stack and untag it -> r6.
@ -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);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
@ -1333,7 +1333,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ push(r0);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
// If the code object is null, just return to the unoptimized code.
@ -1377,7 +1377,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ b(hs, &ok);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ Jump(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);
@ -1448,7 +1448,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ str(r1, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1547,7 +1547,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ str(r1, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1610,14 +1610,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ str(r1, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1706,7 +1706,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r1, r3, r0);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ Pop(r1, r3);
__ ldr(r2, FieldMemOperand(r0, FixedArray::kLengthOffset));
__ SmiUntag(r2);
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1894,7 +1894,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ push(r1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -1938,7 +1938,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -2050,7 +2050,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r1);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2241,7 +2241,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -2313,7 +2313,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bkpt(0);
}
}

View File

@ -682,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
int ncr; // NaN compare result
if (cc == lt || cc == le) {
@ -696,9 +696,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -900,7 +899,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);
__ TailCallRuntime(Runtime::kMathPowRT);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1404,12 +1403,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(scratch, Smi::FromInt(0));
__ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -1511,7 +1510,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(r1);
__ TailCallRuntime(Runtime::kArguments, 1);
__ TailCallRuntime(Runtime::kArguments);
}
@ -1538,7 +1537,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(r1, r3, r2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1738,7 +1737,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// r5 = argument count (tagged)
__ bind(&runtime);
__ Push(r1, r3, r5);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1757,7 +1756,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1850,7 +1849,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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -1875,7 +1874,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ str(r3, MemOperand(sp, 3 * kPointerSize));
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -1884,7 +1883,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);
__ TailCallRuntime(Runtime::kRegExpExec);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2155,7 +2154,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ b(eq, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ bind(&failure);
// For failure and exception return null.
@ -2250,7 +2249,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -2609,7 +2608,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(r1, r2, r3);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to edi and exit the internal frame.
__ mov(r1, r0);
@ -2674,11 +2673,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_, index_);
}
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
// Save the conversion result before the pop instructions below
// have a chance to overwrite it.
@ -2705,7 +2704,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
__ SmiTag(index_);
__ Push(object_, index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
__ Move(result_, r0);
call_helper.AfterCall(masm);
__ jmp(&exit_);
@ -2744,7 +2743,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
__ Move(result_, r0);
call_helper.AfterCall(masm);
__ jmp(&exit_);
@ -3000,7 +2999,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// r0: original string
@ -3040,7 +3039,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ Ret();
__ bind(&slow_string);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -3051,7 +3050,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3066,7 +3065,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3096,7 +3095,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -3226,7 +3225,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
// tagged as a small integer.
__ bind(&runtime);
__ Push(r1, r0);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3268,7 +3267,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ ldr(r1, FieldMemOperand(r1, Oddball::kToNumberOffset));
@ -3529,9 +3528,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3577,7 +3576,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(r0, r0, Operand(r1));
__ Ret();
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ mov(r2, Operand(Smi::FromInt(GREATER)));
@ -3585,7 +3584,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ mov(r2, Operand(Smi::FromInt(LESS)));
}
__ Push(r1, r0, r2);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -3601,7 +3600,7 @@ void CompareICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(lr, r1, r0);
__ mov(ip, Operand(Smi::FromInt(op())));
__ push(ip);
__ CallRuntime(Runtime::kCompareIC_Miss, 3);
__ CallRuntime(Runtime::kCompareIC_Miss);
// Compute the entry point of the rewritten stub.
__ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
// Restore registers.
@ -4945,7 +4944,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
// Fallback to runtime.
__ SmiTag(slot);
__ push(slot);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5069,8 +5068,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(slot, value);
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5197,7 +5195,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -2481,20 +2481,17 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
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
// smarter.
mov(r0, Operand(num_arguments));
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
// 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
// smarter.
mov(r0, Operand(function->nargs));
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -1065,30 +1065,30 @@ class MacroAssembler: public Assembler {
void CallRuntime(const Runtime::Function* f,
int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, kSaveFPRegs);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id,
int num_arguments,
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
}
// Convenience function: call an external reference.
void CallExternalReference(const ExternalReference& ext,
int num_arguments);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
void TailCallRuntime(Runtime::FunctionId fid);
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);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -270,7 +270,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(x2, x1, x3); // first argument, constructor, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(x2);
}
__ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset));
@ -471,7 +471,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor, new_target and the object to the stack,
// and then the initial map as an argument to the runtime call.
__ Push(constructor, new_target, new_obj, init_map);
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ Pop(new_obj, new_target, constructor);
// Continue with JSObject being successfully allocated.
@ -494,7 +494,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor and new_target twice, second pair as arguments
// to the runtime call.
__ Push(constructor, new_target, constructor, new_target);
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Mov(x4, x0);
__ Pop(new_target, constructor);
@ -637,7 +637,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(x1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -664,7 +664,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm, Register argc,
__ Cmp(x10, Operand(argc, LSL, kPointerSizeLog2));
}
__ B(gt, &enough_stack_space);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
// We should never return from the APPLY_OVERFLOW builtin.
if (__ emit_debug_code()) {
__ Unreachable();
@ -834,7 +834,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ Sub(x10, jssp, Operand(x11));
__ CompareRoot(x10, Heap::kRealStackLimitRootIndex);
__ B(hs, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ Bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -862,7 +862,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ CompareRoot(jssp, Heap::kStackLimitRootIndex);
__ B(hs, &ok);
__ Push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ Pop(kInterpreterBytecodeArrayRegister);
__ Bind(&ok);
}
@ -921,7 +921,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ Mov(x1, Operand(Smi::FromInt(static_cast<int>(type))));
__ Push(x1);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ Pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -1115,7 +1115,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// preserve the registers with parameters.
__ PushXRegList(kSafepointSavedRegisters);
// Pass the function and deoptimization type to the runtime system.
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ PopXRegList(kSafepointSavedRegisters);
}
@ -1145,7 +1145,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass the deoptimization type to the runtime system.
__ Mov(x0, Smi::FromInt(static_cast<int>(type)));
__ Push(x0);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
}
// Get the full codegen state from the stack and untag it.
@ -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);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
@ -1313,7 +1313,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ Push(x0);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
// If the code object is null, just return to the unoptimized code.
@ -1349,7 +1349,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ B(hs, &ok);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ Jump(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);
@ -1424,7 +1424,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ Bind(&receiver_not_callable);
{
__ Poke(x1, 0);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1531,7 +1531,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ Bind(&target_not_callable);
{
__ Poke(x1, 0);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1600,14 +1600,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ Bind(&target_not_constructor);
{
__ Poke(x1, 0);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 4c. The new.target is not a constructor, throw an appropriate TypeError.
__ Bind(&new_target_not_constructor);
{
__ Poke(x3, 0);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1696,7 +1696,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(x1, x3, x0);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ Pop(x3, x1);
__ Ldrsw(x2, UntagSmiFieldMemOperand(x0, FixedArray::kLengthOffset));
}
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ Bind(&done);
}
@ -1882,7 +1882,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ Push(x1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -1925,7 +1925,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ Bind(&done);
}
@ -2037,7 +2037,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(x1);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2326,7 +2326,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ Bind(&no_strong_error);
@ -2400,7 +2400,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ Bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ Unreachable();
}
}

View File

@ -653,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
int ncr; // NaN compare result
if ((cond == lt) || (cond == le)) {
@ -667,9 +667,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ Bind(&miss);
@ -965,7 +964,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);
__ TailCallRuntime(Runtime::kMathPowRT);
// Return.
__ Bind(&done);
@ -1608,12 +1607,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(scratch, Smi::FromInt(0));
__ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -1664,7 +1663,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// the runtime system.
__ Bind(&slow);
__ Push(key);
__ TailCallRuntime(Runtime::kArguments, 1);
__ TailCallRuntime(Runtime::kArguments);
}
@ -1695,7 +1694,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ Bind(&runtime);
__ Push(x1, x3, x2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1970,7 +1969,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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1986,7 +1985,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
// Everything is fine, call runtime.
__ Push(receiver, key);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ Bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -2118,7 +2117,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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -2167,13 +2166,13 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ Bind(&runtime);
__ Push(params, param_count_smi, rest_index_smi, language_mode_smi);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
void RegExpExecStub::Generate(MacroAssembler* masm) {
#ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2614,7 +2613,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ B(eq, &runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ Bind(&failure);
__ Mov(x0, Operand(isolate()->factory()->null_value()));
@ -2623,7 +2622,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ Ret();
__ Bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -3015,7 +3014,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(x1, x2, x3);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to edi and exit the internal frame.
__ Mov(x1, x0);
@ -3073,11 +3072,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_, index_);
}
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
// Save the conversion result before the pop instructions below
// have a chance to overwrite it.
@ -3105,7 +3104,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
__ SmiTag(index_);
__ Push(object_, index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
__ Mov(result_, x0);
call_helper.AfterCall(masm);
__ B(&exit_);
@ -3136,7 +3135,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ Bind(&slow_case_);
call_helper.BeforeCall(masm);
__ Push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
__ Mov(result_, x0);
call_helper.AfterCall(masm);
__ B(&exit_);
@ -3154,7 +3153,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ Ldr(x1, FieldMemOperand(x1, Oddball::kToNumberOffset));
@ -3408,9 +3407,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ Bind(&runtime);
__ Push(lhs, rhs);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ Bind(&miss);
@ -3470,7 +3469,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Sub(result, rhs, lhs);
__ Ret();
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
Register ncr = x2;
if (op() == Token::LT || op() == Token::LTE) {
@ -3479,7 +3478,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Mov(ncr, Smi::FromInt(LESS));
}
__ Push(lhs, rhs, ncr);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ Bind(&miss);
@ -3507,7 +3506,7 @@ void CompareICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(left, right, op);
// Call the miss handler. This also pops the arguments.
__ CallRuntime(Runtime::kCompareIC_Miss, 3);
__ CallRuntime(Runtime::kCompareIC_Miss);
// Compute the entry point of the rewritten stub.
__ Add(stub_entry, x0, Code::kHeaderSize - kHeapObjectTag);
@ -3753,7 +3752,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
__ Ret();
__ Bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// x1: result_length
@ -3799,7 +3798,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ Ret();
__ Bind(&slow_string);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ Bind(&not_string);
Label not_oddball;
@ -3810,7 +3809,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ Bind(&not_oddball);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3825,7 +3824,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ Bind(&not_smi);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3857,7 +3856,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ Bind(&not_oddball);
__ Push(x0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -4001,7 +4000,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);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -5370,7 +5369,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Bind(&slow_case);
__ SmiTag(slot);
__ Push(slot);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5490,8 +5489,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(slot, value);
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5644,7 +5642,7 @@ static void CallApiFunctionAndReturn(
// Re-throw by promoting a scheduled exception.
__ Bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
__ Bind(&delete_allocated_handles);

View File

@ -1727,20 +1727,17 @@ void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
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
// smarter.
Mov(x0, num_arguments);
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
// 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
// smarter.
Mov(x0, function->nargs);
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -1090,18 +1090,25 @@ class MacroAssembler : public Assembler {
int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
void CallRuntime(Runtime::FunctionId id,
int num_arguments,
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
}
void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles);
}
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, kSaveFPRegs);
}
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
void TailCallRuntime(Runtime::FunctionId fid);
int ActivationFrameAlignment();
@ -1121,11 +1128,8 @@ class MacroAssembler : public Assembler {
// Jump to a runtime routine.
void JumpToExternalReference(const ExternalReference& builtin);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: call an external reference.
void CallExternalReference(const ExternalReference& ext,
int num_arguments);

View File

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

View File

@ -169,7 +169,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ push(r1);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -178,7 +178,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ push(r1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2674,7 +2674,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ push(r0);
__ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) {
RestoreCallerDoubles();
@ -3333,7 +3333,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
__ push(scratch0());
__ mov(scratch0(), Operand(Smi::FromInt(instr->hydrogen()->flags())));
__ push(scratch0());
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5502,7 +5502,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(r0);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
__ LoadRoot(ip, Heap::kMetaMapRootIndex);
@ -5630,7 +5630,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ Push(scope_info);
__ push(ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -203,6 +203,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, num_arguments, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void LoadContextFromDeferred(LOperand* context);
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,

View File

@ -651,7 +651,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ Mov(x10, Operand(info()->scope()->GetScopeInfo(info()->isolate())));
__ Push(x1, x10);
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -660,7 +660,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ Push(x1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
// Context is returned in x0. It replaces the context passed to us. It's
@ -2770,7 +2770,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ Bind(&call_runtime);
__ Push(object);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ Ldr(x1, FieldMemOperand(object, HeapObject::kMapOffset));
DeoptimizeIfNotRoot(x1, Heap::kMetaMapRootIndex, instr,
@ -4487,7 +4487,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ Push(x0);
__ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) {
@ -4757,7 +4757,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
__ LoadHeapObject(scratch1, instr->hydrogen()->pairs());
__ Mov(scratch2, Smi::FromInt(instr->hydrogen()->flags()));
__ Push(scratch1, scratch2);
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5813,7 +5813,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ Push(scope_info);
__ Push(ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -307,6 +307,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, num_arguments, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void LoadContextFromDeferred(LOperand* context);
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,

View File

@ -245,7 +245,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ push(edi);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -254,7 +254,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ push(edi);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2610,7 +2610,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ push(eax);
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) RestoreCallerDoubles();
if (dynamic_frame_alignment_) {
@ -3209,7 +3209,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
DCHECK(ToRegister(instr->context()).is(esi));
__ push(Immediate(instr->hydrogen()->pairs()));
__ push(Immediate(Smi::FromInt(instr->hydrogen()->flags())));
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5375,7 +5375,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(eax);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ cmp(FieldOperand(eax, HeapObject::kMapOffset),
isolate()->factory()->meta_map());
@ -5495,7 +5495,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ Push(scope_info);
__ push(ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -177,6 +177,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, argc, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,
LInstruction* instr,

View File

@ -189,7 +189,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ push(a1);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -198,7 +198,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ push(a1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2590,7 +2590,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ push(v0);
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) {
RestoreCallerDoubles();
@ -3272,7 +3272,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
__ li(scratch0(), instr->hydrogen()->pairs());
__ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags())));
__ Push(scratch0(), scratch1());
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5535,7 +5535,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(object);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ lw(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
DCHECK(result.is(v0));
@ -5659,7 +5659,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ li(at, scope_info);
__ Push(at, ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -197,6 +197,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, num_arguments, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void LoadContextFromDeferred(LOperand* context);
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,

View File

@ -164,7 +164,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ push(a1);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -173,7 +173,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ push(a1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2715,7 +2715,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ push(v0);
__ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) {
RestoreCallerDoubles();
@ -3458,7 +3458,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
__ li(scratch0(), instr->hydrogen()->pairs());
__ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags())));
__ Push(scratch0(), scratch1());
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5742,7 +5742,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(object);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ ld(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
DCHECK(result.is(v0));
@ -5864,7 +5864,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ li(at, scope_info);
__ Push(at, ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -199,6 +199,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, num_arguments, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void LoadContextFromDeferred(LOperand* context);
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,

View File

@ -175,7 +175,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ push(r4);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -184,7 +184,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ push(r4);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2758,7 +2758,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ push(r3);
__ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) {
RestoreCallerDoubles();
@ -3507,7 +3507,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
__ push(scratch0());
__ LoadSmiLiteral(scratch0(), Smi::FromInt(instr->hydrogen()->flags()));
__ push(scratch0());
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5780,7 +5780,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(r3);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ LoadP(r4, FieldMemOperand(r3, HeapObject::kMapOffset));
__ LoadRoot(ip, Heap::kMetaMapRootIndex);
@ -5901,7 +5901,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ Push(scope_info);
__ push(ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -179,6 +179,11 @@ class LCodeGen : public LCodeGenBase {
CallRuntime(function, num_arguments, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void LoadContextFromDeferred(LOperand* context);
void CallRuntimeFromDeferred(Runtime::FunctionId id, int argc,
LInstruction* instr, LOperand* context);

View File

@ -184,7 +184,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ Push(rdi);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -193,7 +193,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ Push(rdi);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2631,7 +2631,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ Push(rax);
__ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (info()->saves_caller_doubles()) {
RestoreCallerDoubles();
@ -3285,7 +3285,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
DCHECK(ToRegister(instr->context()).is(rsi));
__ Push(instr->hydrogen()->pairs());
__ Push(Smi::FromInt(instr->hydrogen()->flags()));
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5575,7 +5575,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ Push(rax);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset),
Heap::kMetaMapRootIndex);
@ -5695,7 +5695,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ Push(scope_info);
__ Push(ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -176,6 +176,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, num_arguments, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,
LInstruction* instr,

View File

@ -216,7 +216,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
if (info()->scope()->is_script_scope()) {
__ push(edi);
__ Push(info()->scope()->GetScopeInfo(info()->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
deopt_mode = Safepoint::kLazyDeopt;
} else if (slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), slots);
@ -225,7 +225,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
need_write_barrier = false;
} else {
__ push(edi);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
RecordSafepoint(deopt_mode);
@ -2892,7 +2892,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
// safe to write to the context register.
__ push(eax);
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
if (dynamic_frame_alignment_) {
// Fetch the state of the dynamic frame alignment.
@ -3480,7 +3480,7 @@ void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
DCHECK(ToRegister(instr->context()).is(esi));
__ push(Immediate(instr->hydrogen()->pairs()));
__ push(Immediate(Smi::FromInt(instr->hydrogen()->flags())));
CallRuntime(Runtime::kDeclareGlobals, 2, instr);
CallRuntime(Runtime::kDeclareGlobals, instr);
}
@ -5935,7 +5935,7 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(eax);
CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr);
CallRuntime(Runtime::kGetPropertyNamesFast, instr);
__ cmp(FieldOperand(eax, HeapObject::kMapOffset),
isolate()->factory()->meta_map());
@ -6056,7 +6056,7 @@ void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
Handle<ScopeInfo> scope_info = instr->scope_info();
__ Push(scope_info);
__ push(ToRegister(instr->function()));
CallRuntime(Runtime::kPushBlockContext, 2, instr);
CallRuntime(Runtime::kPushBlockContext, instr);
RecordSafepoint(Safepoint::kNoLazyDeopt);
}

View File

@ -205,6 +205,11 @@ class LCodeGen: public LCodeGenBase {
CallRuntime(function, argc, instr);
}
void CallRuntime(Runtime::FunctionId id, LInstruction* instr) {
const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, instr);
}
void CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,
LInstruction* instr,

View File

@ -144,7 +144,7 @@ void FullCodeGenerator::Generate() {
__ LoadRoot(r2, Heap::kRealStackLimitRootIndex);
__ cmp(r9, Operand(r2));
__ b(hs, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ LoadRoot(r9, Heap::kUndefinedValueRootIndex);
@ -181,7 +181,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ push(r1);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -196,7 +196,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ push(r1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ pop(r3); // Preserve new target.
@ -312,7 +312,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -449,7 +449,7 @@ void FullCodeGenerator::EmitReturnSequence() {
// Push the return value on the stack as the parameter.
// Runtime::TraceExit returns its parameter in r0.
__ push(r0);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -854,7 +854,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
}
__ Push(r2, r0);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -911,7 +911,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
// Push initial value for function declaration.
VisitForStackValue(declaration->fun());
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -923,7 +923,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
__ mov(r1, Operand(pairs));
__ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
__ Push(r1, r0);
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -931,7 +931,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1086,7 +1086,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(r0); // Duplicate the enumerable object on the stack.
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
// If we got a map from the runtime call, we can do a fast
@ -1165,7 +1165,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// just skip it.
__ push(r1); // Enumerable.
__ push(r3); // Current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ mov(r3, Operand(r0));
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
@ -1226,8 +1226,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ Push(info);
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(r0);
}
@ -1366,7 +1366,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
__ b(ne, done);
__ mov(r0, Operand(var->name()));
__ push(r0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ jmp(done);
@ -1422,7 +1422,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
__ b(ne, &done);
__ mov(r0, Operand(var->name()));
__ push(r0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&done);
} else {
// Uninitialized legacy const bindings are unholed.
@ -1449,7 +1449,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(r0);
}
@ -1497,7 +1497,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ mov(r0, Operand(Smi::FromInt(flags)));
if (MustCreateObjectLiteralWithRuntime(expr)) {
__ Push(r3, r2, r1, r0);
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
@ -1559,7 +1559,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
__ mov(r0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes
__ push(r0);
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1570,7 +1570,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(r0);
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
@ -1598,7 +1598,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ mov(r0, Operand(Smi::FromInt(NONE)));
__ push(r0);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1626,7 +1626,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1641,7 +1641,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (property->emit_store()) {
__ mov(r0, Operand(Smi::FromInt(NONE)));
__ push(r0);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1654,13 +1654,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ mov(r0, Operand(Smi::FromInt(NONE)));
__ push(r0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ mov(r0, Operand(Smi::FromInt(NONE)));
__ push(r0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1670,7 +1670,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(result_saved);
__ ldr(r0, MemOperand(sp));
__ push(r0);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1703,7 +1703,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
if (MustCreateArrayLiteralWithRuntime(expr)) {
__ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags())));
__ Push(r3, r2, r1, r0);
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
__ CallStub(&stub);
@ -1760,7 +1760,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2172,7 +2172,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
DCHECK(!result_register().is(r1));
__ Push(r1, result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ stop("not-reached");
@ -2189,7 +2189,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r1);
@ -2226,7 +2226,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ Push(key->value());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2243,7 +2243,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2370,7 +2370,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ push(r0);
}
@ -2385,19 +2385,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ mov(r0, Operand(Smi::FromInt(DONT_ENUM)));
__ push(r0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ mov(r0, Operand(Smi::FromInt(DONT_ENUM)));
__ push(r0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
default:
@ -2407,7 +2407,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2535,7 +2535,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ b(ne, &assign);
__ mov(r3, Operand(var->name()));
__ push(r3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
// Perform the assignment.
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2551,9 +2551,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ b(ne, &const_error);
__ mov(r3, Operand(var->name()));
__ push(r3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2565,7 +2565,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ b(eq, &uninitialized_this);
__ mov(r0, Operand(var->name()));
__ Push(r0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2577,7 +2577,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ mov(r1, Operand(var->name()));
__ mov(r0, Operand(Smi::FromInt(language_mode())));
__ Push(cp, r1, r0); // Context, name, language mode.
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2599,7 +2599,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ push(r0);
__ mov(r0, Operand(var->name()));
__ Push(cp, r0); // Context and name.
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackAllocated() || var->IsContextSlot());
Label skip;
@ -2614,7 +2614,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2649,8 +2649,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ Push(key->value());
__ Push(r0);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2661,10 +2660,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
DCHECK(prop != NULL);
__ Push(r0);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2792,7 +2790,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ str(r0, MemOperand(sp, kPointerSize));
@ -2854,7 +2852,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ str(r0, MemOperand(sp, kPointerSize));
@ -2909,7 +2907,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
// Do the runtime call.
__ Push(r4, r3, r2, r1);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2929,7 +2927,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
DCHECK(!context_register().is(r2));
__ mov(r2, Operand(callee->name()));
__ Push(context_register(), r2);
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ Push(r0, r1); // Function, receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3572,7 +3570,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(r0, &done_convert);
__ Push(r0);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(r0);
}
@ -3592,7 +3590,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ b(ls, &done_convert);
__ bind(&convert);
__ Push(r0);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(r0);
}
@ -4044,7 +4042,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ b(&done);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(r0);
@ -4137,8 +4135,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(r0);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4150,7 +4147,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ LoadGlobalObject(r2);
__ mov(r1, Operand(var->name()));
__ Push(r2, r1);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(r0);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global, non-dynamic variables is false.
@ -4162,7 +4159,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
DCHECK(!context_register().is(r2));
__ mov(r2, Operand(var->name()));
__ Push(context_register(), r2);
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(r0);
}
} else {
@ -4593,7 +4590,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ CompareRoot(r0, Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);

View File

@ -149,7 +149,7 @@ void FullCodeGenerator::Generate() {
__ Sub(x10, jssp, locals_count * kPointerSize);
__ CompareRoot(x10, Heap::kRealStackLimitRootIndex);
__ B(hs, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ Bind(&ok);
}
__ LoadRoot(x10, Heap::kUndefinedValueRootIndex);
@ -184,7 +184,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ Mov(x10, Operand(info->scope()->GetScopeInfo(info->isolate())));
__ Push(x1, x10);
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -199,7 +199,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ Push(x1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ Pop(x3); // Restore new target.
@ -315,7 +315,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -441,7 +441,7 @@ void FullCodeGenerator::EmitReturnSequence() {
// Push the return value on the stack as the parameter.
// Runtime::TraceExit returns its parameter in x0.
__ Push(result_register());
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
DCHECK(x0.Is(result_register()));
}
// Pretend that the exit is a backwards jump to the entry.
@ -854,7 +854,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
__ Push(x2, xzr);
}
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -911,7 +911,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
// Push initial value for function declaration.
VisitForStackValue(declaration->fun());
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -927,7 +927,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
__ Mov(flags, Smi::FromInt(DeclareGlobalsFlags()));
}
__ Push(x11, flags);
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -935,7 +935,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1085,7 +1085,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ Bind(&call_runtime);
__ Push(x0); // Duplicate the enumerable object on the stack.
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
// If we got a map from the runtime call, we can do a fast
@ -1158,7 +1158,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// any more. If the property has been removed while iterating, we
// just skip it.
__ Push(x1, x3);
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ Mov(x3, x0);
__ JumpIfRoot(x0, Heap::kUndefinedValueRootIndex,
@ -1219,8 +1219,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ Push(info);
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(x0);
}
@ -1353,7 +1353,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
} else { // LET || CONST
__ Mov(x0, Operand(var->name()));
__ Push(x0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ B(done);
@ -1409,7 +1409,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
// binding in harmony mode.
__ Mov(x0, Operand(var->name()));
__ Push(x0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ Bind(&done);
} else {
// Uninitialized legacy const bindings are unholed.
@ -1437,7 +1437,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ Bind(&done);
context()->Plug(x0);
break;
@ -1486,7 +1486,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ Mov(x0, Smi::FromInt(flags));
if (MustCreateObjectLiteralWithRuntime(expr)) {
__ Push(x3, x2, x1, x0);
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
@ -1547,7 +1547,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
__ Mov(x0, Smi::FromInt(SLOPPY)); // Language mode
__ Push(x0);
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1558,7 +1558,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ Peek(x0, 0);
__ Push(x0);
VisitForStackValue(value);
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1585,7 +1585,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ Mov(x10, Smi::FromInt(NONE));
__ Push(x10);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1613,7 +1613,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1628,7 +1628,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (property->emit_store()) {
__ Mov(x0, Smi::FromInt(NONE));
__ Push(x0);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1641,13 +1641,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ Mov(x0, Smi::FromInt(NONE));
__ Push(x0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ Mov(x0, Smi::FromInt(NONE));
__ Push(x0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1657,7 +1657,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(result_saved);
__ Peek(x0, 0);
__ Push(x0);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1688,7 +1688,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
if (MustCreateArrayLiteralWithRuntime(expr)) {
__ Mov(x0, Smi::FromInt(expr->ComputeFlags()));
__ Push(x3, x2, x1, x0);
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
__ CallStub(&stub);
@ -1745,7 +1745,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -1919,7 +1919,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ Push(key->value());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -1937,7 +1937,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2084,7 +2084,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ Push(x0);
}
@ -2099,19 +2099,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ Mov(x0, Smi::FromInt(DONT_ENUM));
__ Push(x0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ Mov(x0, Smi::FromInt(DONT_ENUM));
__ Push(x0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
default:
@ -2121,7 +2121,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2240,7 +2240,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ JumpIfNotRoot(x10, Heap::kTheHoleValueRootIndex, &assign);
__ Mov(x10, Operand(var->name()));
__ Push(x10);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
// Perform the assignment.
__ Bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2255,9 +2255,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ JumpIfNotRoot(x10, Heap::kTheHoleValueRootIndex, &const_error);
__ Mov(x10, Operand(var->name()));
__ Push(x10);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ Bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2268,7 +2268,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ JumpIfRoot(x10, Heap::kTheHoleValueRootIndex, &uninitialized_this);
__ Mov(x0, Operand(var->name()));
__ Push(x0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2283,7 +2283,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
// jssp[16] : context.
// jssp[24] : value.
__ Push(x0, cp, x11, x10);
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2303,7 +2303,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
if (var->IsLookupSlot()) {
__ Mov(x1, Operand(var->name()));
__ Push(x0, cp, x1);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackLocal() || var->IsContextSlot());
Label skip;
@ -2317,7 +2317,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2353,8 +2353,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ Push(key->value());
__ Push(x0);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2365,10 +2364,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
DCHECK(prop != NULL);
__ Push(x0);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2500,7 +2498,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - this (receiver) <-- LoadFromSuper will pop here and below.
// - home_object
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ Poke(x0, kPointerSize);
@ -2561,7 +2559,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ Poke(x0, kPointerSize);
@ -2619,7 +2617,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
__ Push(x9, x10, x11, x12);
// Do the runtime call.
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2638,7 +2636,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
// and the object holding it (returned in x1).
__ Mov(x10, Operand(callee->name()));
__ Push(context_register(), x10);
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ Push(x0, x1); // Receiver, function.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3281,7 +3279,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(x0, &done_convert);
__ Push(x0);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(x0);
}
@ -3300,7 +3298,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ JumpIfObjectType(x0, x1, x1, LAST_NAME_TYPE, &done_convert, ls);
__ Bind(&convert);
__ Push(x0);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ Bind(&done_convert);
context()->Plug(x0);
}
@ -3750,7 +3748,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ B(&done);
__ Bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ Bind(&done);
context()->Plug(x0);
@ -3841,8 +3839,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(x0);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -3854,7 +3851,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ LoadGlobalObject(x12);
__ Mov(x11, Operand(var->name()));
__ Push(x12, x11);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(x0);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global, non-dynamic variables is false.
@ -3865,7 +3862,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
// context where the variable was introduced.
__ Mov(x2, Operand(var->name()));
__ Push(context_register(), x2);
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(x0);
}
} else {
@ -4304,7 +4301,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ CompareRoot(x0, Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
@ -4651,7 +4648,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ Mov(x10, Smi::FromInt(resume_mode));
__ Push(generator_object, result_register(), x10);
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ Unreachable();
@ -4671,7 +4668,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ Bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ Bind(&done_allocate);
Register map_reg = x1;

View File

@ -614,12 +614,12 @@ void FullCodeGenerator::SetCallPosition(Expression* expr) {
void FullCodeGenerator::VisitSuperPropertyReference(
SuperPropertyReference* super) {
__ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0);
__ CallRuntime(Runtime::kThrowUnsupportedSuperError);
}
void FullCodeGenerator::VisitSuperCallReference(SuperCallReference* super) {
__ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0);
__ CallRuntime(Runtime::kThrowUnsupportedSuperError);
}
@ -914,7 +914,7 @@ void FullCodeGenerator::EmitUnwindBeforeReturn() {
void FullCodeGenerator::EmitPropertyKey(ObjectLiteralProperty* property,
BailoutId bailout_id) {
VisitForStackValue(property->key());
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
PrepareForBailoutForId(bailout_id, NO_REGISTERS);
__ Push(result_register());
}
@ -941,7 +941,7 @@ void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) {
PrepareForBailoutForId(stmt->ToObjectId(), NO_REGISTERS);
__ Push(result_register());
PushFunctionArgumentForContextAllocation();
__ CallRuntime(Runtime::kPushWithContext, 2);
__ CallRuntime(Runtime::kPushWithContext);
StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
@ -1138,7 +1138,7 @@ void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
__ Push(stmt->variable()->name());
__ Push(result_register());
PushFunctionArgumentForContextAllocation();
__ CallRuntime(Runtime::kPushCatchContext, 3);
__ CallRuntime(Runtime::kPushCatchContext);
StoreToFrameField(StandardFrameConstants::kContextOffset,
context_register());
}
@ -1208,7 +1208,7 @@ void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) {
// rethrow the exception if it returns.
__ Call(&finally_entry);
__ Push(result_register());
__ CallRuntime(Runtime::kReThrow, 1);
__ CallRuntime(Runtime::kReThrow);
// Finally block implementation.
__ bind(&finally_entry);
@ -1325,7 +1325,7 @@ void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) {
__ Push(Smi::FromInt(lit->start_position()));
__ Push(Smi::FromInt(lit->end_position()));
__ CallRuntime(Runtime::kDefineClass, 5);
__ CallRuntime(Runtime::kDefineClass);
PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG);
EmitClassDefineProperties(lit);
@ -1380,7 +1380,7 @@ void FullCodeGenerator::VisitThrow(Throw* expr) {
Comment cmnt(masm_, "[ Throw");
VisitForStackValue(expr->exception());
SetExpressionPosition(expr);
__ CallRuntime(Runtime::kThrow, 1);
__ CallRuntime(Runtime::kThrow);
// Never returns here.
}
@ -1642,7 +1642,7 @@ FullCodeGenerator::EnterBlockScopeIfNeeded::EnterBlockScopeIfNeeded(
Comment cmnt(masm(), "[ Extend block context");
__ Push(scope->GetScopeInfo(codegen->isolate()));
codegen_->PushFunctionArgumentForContextAllocation();
__ CallRuntime(Runtime::kPushBlockContext, 2);
__ CallRuntime(Runtime::kPushBlockContext);
// Replace the context stored in the frame.
codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset,

View File

@ -137,7 +137,7 @@ void FullCodeGenerator::Generate() {
ExternalReference::address_of_real_stack_limit(isolate());
__ cmp(ecx, Operand::StaticVariable(stack_limit));
__ j(above_equal, &ok, Label::kNear);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ mov(eax, Immediate(isolate()->factory()->undefined_value()));
@ -173,7 +173,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ push(edi);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -188,7 +188,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ push(edi);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ pop(edx); // Restore new target.
@ -305,7 +305,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -410,7 +410,7 @@ void FullCodeGenerator::EmitReturnSequence() {
__ bind(&return_label_);
if (FLAG_trace) {
__ push(eax);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -795,7 +795,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
}
__ push(
Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes())));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -849,7 +849,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
VisitForStackValue(declaration->fun());
__ push(
Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes())));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -860,7 +860,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
// Call the runtime to declare the globals.
__ Push(pairs);
__ Push(Smi::FromInt(DeclareGlobalsFlags()));
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -868,7 +868,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1016,7 +1016,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(eax);
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
__ cmp(FieldOperand(eax, HeapObject::kMapOffset),
isolate()->factory()->meta_map());
@ -1088,7 +1088,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// just skip it.
__ push(ecx); // Enumerable.
__ push(ebx); // Current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ cmp(eax, isolate()->factory()->undefined_value());
__ j(equal, loop_statement.continue_label());
@ -1146,8 +1146,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ push(Immediate(info));
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(eax);
}
@ -1283,7 +1283,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
__ mov(eax, isolate()->factory()->undefined_value());
} else { // LET || CONST
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ jmp(done);
@ -1341,7 +1341,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
// Throw a reference error when using an uninitialized let/const
// binding in harmony mode.
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
} else {
// Uninitialized legacy const bindings are unholed.
DCHECK(var->mode() == CONST_LEGACY);
@ -1368,7 +1368,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(eax);
break;
@ -1417,7 +1417,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(Immediate(Smi::FromInt(expr->literal_index())));
__ push(Immediate(constant_properties));
__ push(Immediate(Smi::FromInt(flags)));
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
__ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
__ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
@ -1479,7 +1479,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitSetHomeObject(value, 2, property->GetSlot());
}
__ push(Immediate(Smi::FromInt(SLOPPY))); // Language mode
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1488,7 +1488,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(Operand(esp, 0)); // Duplicate receiver.
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1515,7 +1515,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1542,7 +1542,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1556,7 +1556,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::COMPUTED:
if (property->emit_store()) {
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1568,12 +1568,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1582,7 +1582,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (expr->has_function()) {
DCHECK(result_saved);
__ push(Operand(esp, 0));
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1612,7 +1612,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
__ push(Immediate(Smi::FromInt(expr->literal_index())));
__ push(Immediate(constant_elements));
__ push(Immediate(Smi::FromInt(expr->ComputeFlags())));
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
__ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
__ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
@ -1672,7 +1672,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2070,7 +2070,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ push(ebx);
__ push(result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ Abort(kGeneratorFailedToResume);
@ -2087,7 +2087,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ mov(ebx, NativeContextOperand());
@ -2126,7 +2126,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ push(Immediate(key->value()));
__ push(Immediate(Smi::FromInt(language_mode())));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2143,7 +2143,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ push(Immediate(Smi::FromInt(language_mode())));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2269,7 +2269,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ push(eax);
}
@ -2284,24 +2284,24 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ push(Immediate(Smi::FromInt(DONT_ENUM)));
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ push(Immediate(Smi::FromInt(DONT_ENUM)));
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2429,7 +2429,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ cmp(edx, isolate()->factory()->the_hole_value());
__ j(not_equal, &assign, Label::kNear);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2443,9 +2443,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ cmp(edx, isolate()->factory()->the_hole_value());
__ j(not_equal, &const_error, Label::kNear);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2456,7 +2456,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ cmp(edx, isolate()->factory()->the_hole_value());
__ j(equal, &uninitialized_this);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2468,7 +2468,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ push(esi); // Context.
__ push(Immediate(var->name()));
__ push(Immediate(Smi::FromInt(language_mode())));
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2490,7 +2490,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ push(eax);
__ push(esi);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackLocal() || var->IsContextSlot());
Label skip;
@ -2505,7 +2505,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2540,8 +2540,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ push(Immediate(key->value()));
__ push(eax);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2551,10 +2550,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
// stack : receiver ('this'), home_object, key
__ push(eax);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2677,7 +2675,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ mov(Operand(esp, kPointerSize), eax);
@ -2735,7 +2733,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ mov(Operand(esp, kPointerSize), eax);
@ -2791,7 +2789,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
__ push(Immediate(Smi::FromInt(scope()->start_position())));
// Do the runtime call.
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2810,7 +2808,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
// the object holding it (returned in edx).
__ push(context_register());
__ push(Immediate(callee->name()));
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ push(eax); // Function.
__ push(edx); // Receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3453,7 +3451,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(eax, &done_convert, Label::kNear);
__ Push(eax);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(eax);
}
@ -3474,7 +3472,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ j(below_equal, &done_convert, Label::kNear);
__ bind(&convert);
__ Push(eax);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(eax);
}
@ -3964,7 +3962,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ jmp(&done, Label::kNear);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(eax);
@ -4054,8 +4052,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(eax);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4067,7 +4064,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ mov(eax, NativeContextOperand());
__ push(ContextOperand(eax, Context::EXTENSION_INDEX));
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(eax);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global variables is false. 'this' is
@ -4079,7 +4076,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
// context where the variable was introduced.
__ push(context_register());
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(eax);
}
} else {
@ -4516,7 +4513,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ cmp(eax, isolate()->factory()->true_value());
Split(equal, if_true, if_false, fall_through);

View File

@ -152,7 +152,7 @@ void FullCodeGenerator::Generate() {
__ Subu(t5, sp, Operand(locals_count * kPointerSize));
__ LoadRoot(a2, Heap::kRealStackLimitRootIndex);
__ Branch(&ok, hs, t5, Operand(a2));
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ LoadRoot(t5, Heap::kUndefinedValueRootIndex);
@ -191,7 +191,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ push(a1);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -206,7 +206,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ push(a1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ pop(a3); // Restore new target.
@ -322,7 +322,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -440,7 +440,7 @@ void FullCodeGenerator::EmitReturnSequence() {
// Push the return value on the stack as the parameter.
// Runtime::TraceExit returns its parameter in v0.
__ push(v0);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -850,7 +850,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
}
__ Push(a2, a0);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -907,7 +907,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
// Push initial value for function declaration.
VisitForStackValue(declaration->fun());
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -919,7 +919,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
__ li(a1, Operand(pairs));
__ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
__ Push(a1, a0);
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -927,7 +927,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1080,7 +1080,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(a0); // Duplicate the enumerable object on the stack.
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
// If we got a map from the runtime call, we can do a fast
@ -1157,7 +1157,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// any more. If the property has been removed while iterating, we
// just skip it.
__ Push(a1, a3); // Enumerable and current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ mov(a3, result_register());
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
@ -1217,8 +1217,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ Push(info);
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(v0);
}
@ -1358,7 +1358,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
__ Branch(done, ne, at, Operand(zero_reg));
__ li(a0, Operand(var->name()));
__ push(a0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ Branch(done);
@ -1415,7 +1415,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
__ Branch(&done, ne, at, Operand(zero_reg));
__ li(a0, Operand(var->name()));
__ push(a0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&done);
} else {
// Uninitialized legacy const bindings are unholed.
@ -1443,7 +1443,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(v0);
}
@ -1490,7 +1490,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ li(a0, Operand(Smi::FromInt(expr->ComputeFlags())));
if (MustCreateObjectLiteralWithRuntime(expr)) {
__ Push(a3, a2, a1, a0);
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
@ -1553,7 +1553,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
__ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes.
__ push(a0);
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1564,7 +1564,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(a0);
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1591,7 +1591,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1619,7 +1619,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1634,7 +1634,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (property->emit_store()) {
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1647,13 +1647,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1663,7 +1663,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(result_saved);
__ lw(a0, MemOperand(sp));
__ push(a0);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1695,7 +1695,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
if (MustCreateArrayLiteralWithRuntime(expr)) {
__ li(a0, Operand(Smi::FromInt(expr->ComputeFlags())));
__ Push(a3, a2, a1, a0);
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
__ CallStub(&stub);
@ -1754,7 +1754,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2159,7 +2159,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
DCHECK(!result_register().is(a1));
__ Push(a1, result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ stop("not-reached");
@ -2176,7 +2176,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1);
@ -2215,7 +2215,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ Push(key->value());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2232,7 +2232,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2356,7 +2356,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ push(v0);
}
@ -2371,19 +2371,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ li(a0, Operand(Smi::FromInt(DONT_ENUM)));
__ push(a0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ li(a0, Operand(Smi::FromInt(DONT_ENUM)));
__ push(a0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
default:
@ -2393,7 +2393,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2523,7 +2523,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Branch(&assign, ne, a3, Operand(t0));
__ li(a3, Operand(var->name()));
__ push(a3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
// Perform the assignment.
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2539,9 +2539,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Branch(&const_error, ne, a3, Operand(at));
__ li(a3, Operand(var->name()));
__ push(a3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2553,7 +2553,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Branch(&uninitialized_this, eq, a3, Operand(at));
__ li(a0, Operand(var->name()));
__ Push(a0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2564,7 +2564,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ li(a1, Operand(var->name()));
__ li(a0, Operand(Smi::FromInt(language_mode())));
__ Push(v0, cp, a1, a0); // Value, context, name, language mode.
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2585,7 +2585,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
if (var->IsLookupSlot()) {
__ li(a0, Operand(var->name()));
__ Push(v0, cp, a0); // Context and name.
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackAllocated() || var->IsContextSlot());
Label skip;
@ -2600,7 +2600,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2636,8 +2636,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ Push(key->value());
__ Push(v0);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2648,10 +2647,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
DCHECK(prop != NULL);
__ Push(v0);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2780,7 +2778,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ sw(v0, MemOperand(sp, kPointerSize));
@ -2840,7 +2838,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ sw(v0, MemOperand(sp, kPointerSize));
@ -2896,7 +2894,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
// Do the runtime call.
__ Push(t3, t2, t1, t0);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2917,7 +2915,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
DCHECK(!context_register().is(a2));
__ li(a2, Operand(callee->name()));
__ Push(context_register(), a2);
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ Push(v0, v1); // Function, receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3575,7 +3573,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(v0, &done_convert);
__ Push(v0);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(v0);
}
@ -3595,7 +3593,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ Branch(&done_convert, le, a1, Operand(LAST_NAME_TYPE));
__ bind(&convert);
__ Push(v0);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(v0);
}
@ -4049,7 +4047,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ jmp(&done);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(v0);
@ -4142,8 +4140,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(v0);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4155,7 +4152,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ LoadGlobalObject(a2);
__ li(a1, Operand(var->name()));
__ Push(a2, a1);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(v0);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global, non-dynamic variables is false.
@ -4167,7 +4164,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
DCHECK(!context_register().is(a2));
__ li(a2, Operand(var->name()));
__ Push(context_register(), a2);
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(v0);
}
} else {
@ -4600,7 +4597,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ LoadRoot(t0, Heap::kTrueValueRootIndex);
Split(eq, v0, Operand(t0), if_true, if_false, fall_through);

View File

@ -151,7 +151,7 @@ void FullCodeGenerator::Generate() {
__ Dsubu(t1, sp, Operand(locals_count * kPointerSize));
__ LoadRoot(a2, Heap::kRealStackLimitRootIndex);
__ Branch(&ok, hs, t1, Operand(a2));
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ LoadRoot(t1, Heap::kUndefinedValueRootIndex);
@ -190,7 +190,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ push(a1);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -205,7 +205,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ push(a1);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ pop(a3); // Restore new target.
@ -320,7 +320,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -440,7 +440,7 @@ void FullCodeGenerator::EmitReturnSequence() {
// Push the return value on the stack as the parameter.
// Runtime::TraceExit returns its parameter in v0.
__ push(v0);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -850,7 +850,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
}
__ Push(a2, a0);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -907,7 +907,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
// Push initial value for function declaration.
VisitForStackValue(declaration->fun());
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -919,7 +919,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
__ li(a1, Operand(pairs));
__ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
__ Push(a1, a0);
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -927,7 +927,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1080,7 +1080,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(a0); // Duplicate the enumerable object on the stack.
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
// If we got a map from the runtime call, we can do a fast
@ -1157,7 +1157,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// any more. If the property has been removed while iterating, we
// just skip it.
__ Push(a1, a3); // Enumerable and current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ mov(a3, result_register());
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
@ -1217,8 +1217,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ Push(info);
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(v0);
}
@ -1358,7 +1358,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
__ Branch(done, ne, at, Operand(zero_reg));
__ li(a0, Operand(var->name()));
__ push(a0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ Branch(done);
@ -1415,7 +1415,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
__ Branch(&done, ne, at, Operand(zero_reg));
__ li(a0, Operand(var->name()));
__ push(a0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&done);
} else {
// Uninitialized legacy const bindings are unholed.
@ -1443,7 +1443,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(v0);
}
@ -1490,7 +1490,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ li(a0, Operand(Smi::FromInt(expr->ComputeFlags())));
if (MustCreateObjectLiteralWithRuntime(expr)) {
__ Push(a3, a2, a1, a0);
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
@ -1553,7 +1553,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
__ li(a0, Operand(Smi::FromInt(SLOPPY))); // PropertyAttributes.
__ push(a0);
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1564,7 +1564,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(a0);
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1591,7 +1591,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1619,7 +1619,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1634,7 +1634,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (property->emit_store()) {
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1647,13 +1647,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ li(a0, Operand(Smi::FromInt(NONE)));
__ push(a0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1663,7 +1663,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(result_saved);
__ ld(a0, MemOperand(sp));
__ push(a0);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1695,7 +1695,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
if (MustCreateArrayLiteralWithRuntime(expr)) {
__ li(a0, Operand(Smi::FromInt(expr->ComputeFlags())));
__ Push(a3, a2, a1, a0);
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
__ CallStub(&stub);
@ -1754,7 +1754,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2159,7 +2159,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
DCHECK(!result_register().is(a1));
__ Push(a1, result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ stop("not-reached");
@ -2176,7 +2176,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1);
@ -2215,7 +2215,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ Push(key->value());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2234,7 +2234,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2359,7 +2359,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ push(v0);
}
@ -2374,19 +2374,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ li(a0, Operand(Smi::FromInt(DONT_ENUM)));
__ push(a0);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ li(a0, Operand(Smi::FromInt(DONT_ENUM)));
__ push(a0);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
default:
@ -2396,7 +2396,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2526,7 +2526,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Branch(&assign, ne, a3, Operand(a4));
__ li(a3, Operand(var->name()));
__ push(a3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
// Perform the assignment.
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2542,9 +2542,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Branch(&const_error, ne, a3, Operand(at));
__ li(a3, Operand(var->name()));
__ push(a3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2556,7 +2556,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Branch(&uninitialized_this, eq, a3, Operand(at));
__ li(a0, Operand(var->name()));
__ Push(a0);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2571,7 +2571,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
// jssp[16] : context.
// jssp[24] : value.
__ Push(v0, cp, a4, a3);
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2592,7 +2592,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
if (var->IsLookupSlot()) {
__ li(a0, Operand(var->name()));
__ Push(v0, cp, a0); // Context and name.
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackAllocated() || var->IsContextSlot());
Label skip;
@ -2607,7 +2607,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2643,8 +2643,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ Push(key->value());
__ Push(v0);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2655,10 +2654,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
DCHECK(prop != NULL);
__ Push(v0);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2787,7 +2785,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ sd(v0, MemOperand(sp, kPointerSize));
@ -2847,7 +2845,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ sd(v0, MemOperand(sp, kPointerSize));
@ -2902,7 +2900,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
// Do the runtime call.
__ Push(a6, a5, a4, a1);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2923,7 +2921,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
DCHECK(!context_register().is(a2));
__ li(a2, Operand(callee->name()));
__ Push(context_register(), a2);
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ Push(v0, v1); // Function, receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3582,7 +3580,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(v0, &done_convert);
__ Push(v0);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(v0);
}
@ -3602,7 +3600,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ Branch(&done_convert, le, a1, Operand(LAST_NAME_TYPE));
__ bind(&convert);
__ Push(v0);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(v0);
}
@ -4058,7 +4056,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ jmp(&done);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(v0);
@ -4150,8 +4148,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(v0);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4163,7 +4160,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ LoadGlobalObject(a2);
__ li(a1, Operand(var->name()));
__ Push(a2, a1);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(v0);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global, non-dynamic variables is false.
@ -4175,7 +4172,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
DCHECK(!context_register().is(a2));
__ li(a2, Operand(var->name()));
__ Push(context_register(), a2);
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(v0);
}
} else {
@ -4610,7 +4607,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ LoadRoot(a4, Heap::kTrueValueRootIndex);
Split(eq, v0, Operand(a4), if_true, if_false, fall_through);

View File

@ -149,7 +149,7 @@ void FullCodeGenerator::Generate() {
__ LoadRoot(r5, Heap::kRealStackLimitRootIndex);
__ cmpl(ip, r5);
__ bc_short(ge, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
@ -186,7 +186,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ push(r4);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -201,7 +201,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ push(r4);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ pop(r6); // Preserve new target.
@ -317,7 +317,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -436,7 +436,7 @@ void FullCodeGenerator::EmitReturnSequence() {
// Push the return value on the stack as the parameter.
// Runtime::TraceExit returns its parameter in r3
__ push(r3);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -815,7 +815,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
}
__ Push(r5, r3);
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -868,7 +868,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
// Push initial value for function declaration.
VisitForStackValue(declaration->fun());
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -880,7 +880,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
__ mov(r4, Operand(pairs));
__ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags()));
__ Push(r4, r3);
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -888,7 +888,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1043,7 +1043,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(r3); // Duplicate the enumerable object on the stack.
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
// If we got a map from the runtime call, we can do a fast
@ -1125,7 +1125,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// any more. If the property has been removed while iterating, we
// just skip it.
__ Push(r4, r6); // Enumerable and current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ mr(r6, r3);
__ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
@ -1184,8 +1184,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ Push(info);
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(r3);
}
@ -1324,7 +1324,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
} else { // LET || CONST
__ mov(r3, Operand(var->name()));
__ push(r3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ b(done);
@ -1380,7 +1380,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
// binding in harmony mode.
__ mov(r3, Operand(var->name()));
__ push(r3);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
} else {
// Uninitialized legacy const bindings are unholed.
DCHECK(var->mode() == CONST_LEGACY);
@ -1407,7 +1407,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(r3);
}
@ -1455,7 +1455,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ LoadSmiLiteral(r3, Smi::FromInt(flags));
if (MustCreateObjectLiteralWithRuntime(expr)) {
__ Push(r6, r5, r4, r3);
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
@ -1517,7 +1517,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
__ LoadSmiLiteral(r3, Smi::FromInt(SLOPPY)); // PropertyAttributes
__ push(r3);
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1528,7 +1528,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(r3);
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1554,7 +1554,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ LoadSmiLiteral(r3, Smi::FromInt(NONE));
__ push(r3);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1582,7 +1582,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1597,7 +1597,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (property->emit_store()) {
__ LoadSmiLiteral(r3, Smi::FromInt(NONE));
__ push(r3);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1610,13 +1610,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ mov(r3, Operand(Smi::FromInt(NONE)));
__ push(r3);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ mov(r3, Operand(Smi::FromInt(NONE)));
__ push(r3);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1626,7 +1626,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(result_saved);
__ LoadP(r3, MemOperand(sp));
__ push(r3);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1659,7 +1659,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
if (MustCreateArrayLiteralWithRuntime(expr)) {
__ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags()));
__ Push(r6, r5, r4, r3);
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
__ CallStub(&stub);
@ -1716,7 +1716,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2135,7 +2135,7 @@ void FullCodeGenerator::EmitGeneratorResume(
DCHECK(!result_register().is(r4));
__ Push(r4, result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ stop("not-reached");
@ -2152,7 +2152,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r4);
@ -2189,7 +2189,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ Push(key->value());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2206,7 +2206,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2365,7 +2365,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ push(r3);
}
@ -2380,19 +2380,19 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ mov(r3, Operand(Smi::FromInt(DONT_ENUM)));
__ push(r3);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ mov(r3, Operand(Smi::FromInt(DONT_ENUM)));
__ push(r3);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
default:
@ -2402,7 +2402,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2530,7 +2530,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ bne(&assign);
__ mov(r6, Operand(var->name()));
__ push(r6);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
// Perform the assignment.
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2546,9 +2546,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ bne(&const_error);
__ mov(r6, Operand(var->name()));
__ push(r6);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2560,7 +2560,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ beq(&uninitialized_this);
__ mov(r4, Operand(var->name()));
__ push(r4);
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2572,7 +2572,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ mov(r4, Operand(var->name()));
__ mov(r3, Operand(Smi::FromInt(language_mode())));
__ Push(cp, r4, r3); // Context, name, language mode.
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2593,7 +2593,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ push(r3);
__ mov(r3, Operand(var->name()));
__ Push(cp, r3); // Context and name.
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackAllocated() || var->IsContextSlot());
Label skip;
@ -2608,7 +2608,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2643,8 +2643,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ Push(key->value());
__ Push(r3);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2655,10 +2654,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
DCHECK(prop != NULL);
__ Push(r3);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2781,7 +2779,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ StoreP(r3, MemOperand(sp, kPointerSize));
@ -2840,7 +2838,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ StoreP(r3, MemOperand(sp, kPointerSize));
@ -2895,7 +2893,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
// Do the runtime call.
__ Push(r7, r6, r5, r4);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2915,7 +2913,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
DCHECK(!context_register().is(r5));
__ mov(r5, Operand(callee->name()));
__ Push(context_register(), r5);
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ Push(r3, r4); // Function, receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3572,7 +3570,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(r3, &done_convert);
__ Push(r3);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(r3);
}
@ -3592,7 +3590,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ ble(&done_convert);
__ bind(&convert);
__ Push(r3);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(r3);
}
@ -4054,7 +4052,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ b(&done);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(r3);
@ -4147,8 +4145,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(r3);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4160,7 +4157,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ LoadGlobalObject(r5);
__ mov(r4, Operand(var->name()));
__ Push(r5, r4);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(r3);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global, non-dynamic variables is false.
@ -4172,7 +4169,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
DCHECK(!context_register().is(r5));
__ mov(r5, Operand(var->name()));
__ Push(context_register(), r5);
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(r3);
}
} else {
@ -4602,7 +4599,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ CompareRoot(r3, Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);

View File

@ -134,7 +134,7 @@ void FullCodeGenerator::Generate() {
__ subp(rcx, Immediate(locals_count * kPointerSize));
__ CompareRoot(rcx, Heap::kRealStackLimitRootIndex);
__ j(above_equal, &ok, Label::kNear);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
@ -171,7 +171,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ Push(rdi);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -186,7 +186,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ Push(rdi);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ Pop(rdx); // Restore new target.
@ -304,7 +304,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -414,7 +414,7 @@ void FullCodeGenerator::EmitReturnSequence() {
__ bind(&return_label_);
if (FLAG_trace) {
__ Push(rax);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -808,7 +808,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
__ Push(Smi::FromInt(0)); // Indicates no initial value.
}
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -862,7 +862,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
__ Push(variable->name());
VisitForStackValue(declaration->fun());
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -873,7 +873,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
// Call the runtime to declare the globals.
__ Push(pairs);
__ Push(Smi::FromInt(DeclareGlobalsFlags()));
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -881,7 +881,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1035,7 +1035,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ Push(rax); // Duplicate the enumerable object on the stack.
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
// If we got a map from the runtime call, we can do a fast
@ -1117,7 +1117,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// just skip it.
__ Push(rcx); // Enumerable.
__ Push(rbx); // Current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
__ j(equal, loop_statement.continue_label());
@ -1175,8 +1175,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ Push(info);
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(rax);
}
@ -1315,7 +1315,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
} else { // LET || CONST
__ Push(var->name());
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ jmp(done);
@ -1370,7 +1370,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
// Throw a reference error when using an uninitialized let/const
// binding in harmony mode.
__ Push(var->name());
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
} else {
// Uninitialized legacy const bindings are unholed.
DCHECK(var->mode() == CONST_LEGACY);
@ -1397,7 +1397,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(rax);
break;
@ -1444,7 +1444,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ Push(Smi::FromInt(expr->literal_index()));
__ Push(constant_properties);
__ Push(Smi::FromInt(flags));
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
__ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
__ Move(rbx, Smi::FromInt(expr->literal_index()));
@ -1507,7 +1507,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitSetHomeObject(value, 2, property->GetSlot());
}
__ Push(Smi::FromInt(SLOPPY)); // Language mode
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1516,7 +1516,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ Push(Operand(rsp, 0)); // Duplicate receiver.
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1541,7 +1541,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->getter);
EmitAccessor(it->second->setter);
__ Push(Smi::FromInt(NONE));
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1568,7 +1568,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1582,7 +1582,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::COMPUTED:
if (property->emit_store()) {
__ Push(Smi::FromInt(NONE));
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1594,12 +1594,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ Push(Smi::FromInt(NONE));
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ Push(Smi::FromInt(NONE));
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1608,7 +1608,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (expr->has_function()) {
DCHECK(result_saved);
__ Push(Operand(rsp, 0));
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1638,7 +1638,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
__ Push(Smi::FromInt(expr->literal_index()));
__ Push(constant_elements);
__ Push(Smi::FromInt(expr->ComputeFlags()));
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
__ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
__ Move(rbx, Smi::FromInt(expr->literal_index()));
@ -1698,7 +1698,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2095,7 +2095,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ Push(rbx);
__ Push(result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ Abort(kGeneratorFailedToResume);
@ -2112,7 +2112,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx);
@ -2148,7 +2148,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ Push(key->value());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2165,7 +2165,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2257,7 +2257,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ Push(rax);
}
@ -2272,17 +2272,17 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ Push(Smi::FromInt(DONT_ENUM));
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ Push(Smi::FromInt(DONT_ENUM));
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
default:
@ -2292,7 +2292,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2417,7 +2417,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ CompareRoot(rdx, Heap::kTheHoleValueRootIndex);
__ j(not_equal, &assign, Label::kNear);
__ Push(var->name());
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2431,9 +2431,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ CompareRoot(rdx, Heap::kTheHoleValueRootIndex);
__ j(not_equal, &const_error, Label::kNear);
__ Push(var->name());
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2444,7 +2444,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ CompareRoot(rdx, Heap::kTheHoleValueRootIndex);
__ j(equal, &uninitialized_this);
__ Push(var->name());
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2456,7 +2456,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Push(rsi); // Context.
__ Push(var->name());
__ Push(Smi::FromInt(language_mode()));
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2478,7 +2478,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ Push(rax);
__ Push(rsi);
__ Push(var->name());
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackLocal() || var->IsContextSlot());
Label skip;
@ -2493,7 +2493,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2527,8 +2527,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ Push(key->value());
__ Push(rax);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2539,10 +2538,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
DCHECK(prop != NULL);
__ Push(rax);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2664,7 +2662,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ movp(Operand(rsp, kPointerSize), rax);
@ -2723,7 +2721,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ movp(Operand(rsp, kPointerSize), rax);
@ -2779,7 +2777,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
__ Push(Smi::FromInt(scope()->start_position()));
// Do the runtime call.
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2797,7 +2795,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
// the object holding it (returned in rdx).
__ Push(context_register());
__ Push(callee->name());
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ Push(rax); // Function.
__ Push(rdx); // Receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3446,7 +3444,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(rax, &done_convert, Label::kNear);
__ Push(rax);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(rax);
}
@ -3467,7 +3465,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ j(below_equal, &done_convert, Label::kNear);
__ bind(&convert);
__ Push(rax);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(rax);
}
@ -3977,7 +3975,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ jmp(&done, Label::kNear);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(rax);
@ -4068,8 +4066,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(rax);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4081,7 +4078,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ movp(rax, NativeContextOperand());
__ Push(ContextOperand(rax, Context::EXTENSION_INDEX));
__ Push(var->name());
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(rax);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global variables is false. 'this' is
@ -4093,7 +4090,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
// context where the variable was introduced.
__ Push(context_register());
__ Push(var->name());
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(rax);
}
} else {
@ -4528,7 +4525,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ CompareRoot(rax, Heap::kTrueValueRootIndex);
Split(equal, if_true, if_false, fall_through);

View File

@ -137,7 +137,7 @@ void FullCodeGenerator::Generate() {
ExternalReference::address_of_real_stack_limit(isolate());
__ cmp(ecx, Operand::StaticVariable(stack_limit));
__ j(above_equal, &ok, Label::kNear);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
}
__ mov(eax, Immediate(isolate()->factory()->undefined_value()));
@ -173,7 +173,7 @@ void FullCodeGenerator::Generate() {
if (info->scope()->is_script_scope()) {
__ push(edi);
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
__ CallRuntime(Runtime::kNewScriptContext);
PrepareForBailoutForId(BailoutId::ScriptContext(), TOS_REG);
// The new target value is not used, clobbering is safe.
DCHECK_NULL(info->scope()->new_target_var());
@ -188,7 +188,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ push(edi);
__ CallRuntime(Runtime::kNewFunctionContext, 1);
__ CallRuntime(Runtime::kNewFunctionContext);
}
if (info->scope()->new_target_var() != nullptr) {
__ pop(edx); // Restore new target.
@ -302,7 +302,7 @@ void FullCodeGenerator::Generate() {
}
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
__ CallRuntime(Runtime::kTraceEnter);
}
// Visit the declarations and body unless there is an illegal
@ -407,7 +407,7 @@ void FullCodeGenerator::EmitReturnSequence() {
__ bind(&return_label_);
if (FLAG_trace) {
__ push(eax);
__ CallRuntime(Runtime::kTraceExit, 1);
__ CallRuntime(Runtime::kTraceExit);
}
// Pretend that the exit is a backwards jump to the entry.
int weight = 1;
@ -792,7 +792,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
}
__ push(
Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes())));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -841,7 +841,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
VisitForStackValue(declaration->fun());
__ push(
Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes())));
__ CallRuntime(Runtime::kDeclareLookupSlot, 3);
__ CallRuntime(Runtime::kDeclareLookupSlot);
break;
}
}
@ -852,7 +852,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
// Call the runtime to declare the globals.
__ Push(pairs);
__ Push(Smi::FromInt(DeclareGlobalsFlags()));
__ CallRuntime(Runtime::kDeclareGlobals, 2);
__ CallRuntime(Runtime::kDeclareGlobals);
// Return value is ignored.
}
@ -860,7 +860,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
__ CallRuntime(Runtime::kDeclareModules, 1);
__ CallRuntime(Runtime::kDeclareModules);
// Return value is ignored.
}
@ -1008,7 +1008,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Get the set of properties to enumerate.
__ bind(&call_runtime);
__ push(eax);
__ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
__ CallRuntime(Runtime::kGetPropertyNamesFast);
PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
__ cmp(FieldOperand(eax, HeapObject::kMapOffset),
isolate()->factory()->meta_map());
@ -1080,7 +1080,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// just skip it.
__ push(ecx); // Enumerable.
__ push(ebx); // Current entry.
__ CallRuntime(Runtime::kForInFilter, 2);
__ CallRuntime(Runtime::kForInFilter);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ cmp(eax, isolate()->factory()->undefined_value());
__ j(equal, loop_statement.continue_label());
@ -1138,8 +1138,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ CallStub(&stub);
} else {
__ push(Immediate(info));
__ CallRuntime(
pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
__ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
: Runtime::kNewClosure);
}
context()->Plug(eax);
}
@ -1275,7 +1275,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
__ mov(eax, isolate()->factory()->undefined_value());
} else { // LET || CONST
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
}
}
__ jmp(done);
@ -1333,7 +1333,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
// Throw a reference error when using an uninitialized let/const
// binding in harmony mode.
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
} else {
// Uninitialized legacy const bindings are unholed.
DCHECK(var->mode() == CONST_LEGACY);
@ -1360,7 +1360,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
: Runtime::kLoadLookupSlotNoReferenceError;
__ CallRuntime(function_id, 2);
__ CallRuntime(function_id);
__ bind(&done);
context()->Plug(eax);
break;
@ -1409,7 +1409,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(Immediate(Smi::FromInt(expr->literal_index())));
__ push(Immediate(constant_properties));
__ push(Immediate(Smi::FromInt(flags)));
__ CallRuntime(Runtime::kCreateObjectLiteral, 4);
__ CallRuntime(Runtime::kCreateObjectLiteral);
} else {
__ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
__ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
@ -1471,7 +1471,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitSetHomeObject(value, 2, property->GetSlot());
}
__ push(Immediate(Smi::FromInt(SLOPPY))); // Language mode
__ CallRuntime(Runtime::kSetProperty, 4);
__ CallRuntime(Runtime::kSetProperty);
} else {
__ Drop(3);
}
@ -1480,7 +1480,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ push(Operand(esp, 0)); // Duplicate receiver.
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
break;
case ObjectLiteral::Property::GETTER:
if (property->emit_store()) {
@ -1507,7 +1507,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
EmitAccessor(it->second->setter);
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
__ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked);
}
// Object literals have two parts. The "static" part on the left contains no
@ -1534,7 +1534,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
DCHECK(!property->is_computed_name());
VisitForStackValue(value);
DCHECK(property->emit_store());
__ CallRuntime(Runtime::kInternalSetPrototype, 2);
__ CallRuntime(Runtime::kInternalSetPrototype);
} else {
EmitPropertyKey(property, expr->GetIdForProperty(property_index));
VisitForStackValue(value);
@ -1548,7 +1548,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::COMPUTED:
if (property->emit_store()) {
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineDataPropertyUnchecked);
} else {
__ Drop(3);
}
@ -1560,12 +1560,12 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
case ObjectLiteral::Property::GETTER:
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ push(Immediate(Smi::FromInt(NONE)));
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
@ -1574,7 +1574,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
if (expr->has_function()) {
DCHECK(result_saved);
__ push(Operand(esp, 0));
__ CallRuntime(Runtime::kToFastProperties, 1);
__ CallRuntime(Runtime::kToFastProperties);
}
if (result_saved) {
@ -1604,7 +1604,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
__ push(Immediate(Smi::FromInt(expr->literal_index())));
__ push(Immediate(constant_elements));
__ push(Immediate(Smi::FromInt(expr->ComputeFlags())));
__ CallRuntime(Runtime::kCreateArrayLiteral, 4);
__ CallRuntime(Runtime::kCreateArrayLiteral);
} else {
__ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
__ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
@ -1664,7 +1664,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
CALL_FUNCTION);
} else {
VisitForStackValue(subexpr);
__ CallRuntime(Runtime::kAppendElement, 2);
__ CallRuntime(Runtime::kAppendElement);
}
PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
@ -2062,7 +2062,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ push(ebx);
__ push(result_register());
__ Push(Smi::FromInt(resume_mode));
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
__ CallRuntime(Runtime::kResumeJSGeneratorObject);
// Not reached: the runtime call returns elsewhere.
__ Abort(kGeneratorFailedToResume);
@ -2079,7 +2079,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&allocate);
__ Push(Smi::FromInt(JSIteratorResult::kSize));
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ CallRuntime(Runtime::kAllocateInNewSpace);
__ bind(&done_allocate);
__ mov(ebx, NativeContextOperand());
@ -2118,7 +2118,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
__ push(Immediate(key->value()));
__ push(Immediate(Smi::FromInt(language_mode())));
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
}
@ -2135,7 +2135,7 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
SetExpressionPosition(prop);
__ push(Immediate(Smi::FromInt(language_mode())));
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
}
@ -2261,7 +2261,7 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
// need to check for an own read only property we special case this so we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
__ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
__ CallRuntime(Runtime::kThrowIfStaticPrototype);
__ push(eax);
}
@ -2276,24 +2276,24 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
case ObjectLiteral::Property::PROTOTYPE:
UNREACHABLE();
case ObjectLiteral::Property::COMPUTED:
__ CallRuntime(Runtime::kDefineClassMethod, 3);
__ CallRuntime(Runtime::kDefineClassMethod);
break;
case ObjectLiteral::Property::GETTER:
__ push(Immediate(Smi::FromInt(DONT_ENUM)));
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
break;
case ObjectLiteral::Property::SETTER:
__ push(Immediate(Smi::FromInt(DONT_ENUM)));
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
__ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
break;
}
}
// Set both the prototype and constructor to have fast properties, and also
// freeze them in strong mode.
__ CallRuntime(Runtime::kFinalizeClassDefinition, 2);
__ CallRuntime(Runtime::kFinalizeClassDefinition);
}
@ -2421,7 +2421,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ cmp(edx, isolate()->factory()->the_hole_value());
__ j(not_equal, &assign, Label::kNear);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2435,9 +2435,9 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ cmp(edx, isolate()->factory()->the_hole_value());
__ j(not_equal, &const_error, Label::kNear);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&const_error);
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
} else if (var->is_this() && var->mode() == CONST && op == Token::INIT) {
// Initializing assignment to const {this} needs a write barrier.
@ -2448,7 +2448,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ cmp(edx, isolate()->factory()->the_hole_value());
__ j(equal, &uninitialized_this);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kThrowReferenceError, 1);
__ CallRuntime(Runtime::kThrowReferenceError);
__ bind(&uninitialized_this);
EmitStoreToStackLocalOrContextSlot(var, location);
@ -2460,7 +2460,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ push(esi); // Context.
__ push(Immediate(var->name()));
__ push(Immediate(Smi::FromInt(language_mode())));
__ CallRuntime(Runtime::kStoreLookupSlot, 4);
__ CallRuntime(Runtime::kStoreLookupSlot);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@ -2482,7 +2482,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
__ push(eax);
__ push(esi);
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
__ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
} else {
DCHECK(var->IsStackLocal() || var->IsContextSlot());
Label skip;
@ -2497,7 +2497,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
} else {
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT);
if (is_strict(language_mode())) {
__ CallRuntime(Runtime::kThrowConstAssignError, 0);
__ CallRuntime(Runtime::kThrowConstAssignError);
}
// Silently ignore store in sloppy mode.
}
@ -2532,8 +2532,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) {
__ push(Immediate(key->value()));
__ push(eax);
__ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy),
4);
: Runtime::kStoreToSuper_Sloppy));
}
@ -2543,10 +2542,9 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) {
// stack : receiver ('this'), home_object, key
__ push(eax);
__ CallRuntime(
(is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy),
4);
__ CallRuntime((is_strict(language_mode())
? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy));
}
@ -2669,7 +2667,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadFromSuper, 4);
__ CallRuntime(Runtime::kLoadFromSuper);
// Replace home_object with target function.
__ mov(Operand(esp, kPointerSize), eax);
@ -2727,7 +2725,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - home_object
// - key
// - language_mode
__ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
// Replace home_object with target function.
__ mov(Operand(esp, kPointerSize), eax);
@ -2783,7 +2781,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
__ push(Immediate(Smi::FromInt(scope()->start_position())));
// Do the runtime call.
__ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
}
@ -2802,7 +2800,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
// the object holding it (returned in edx).
__ push(context_register());
__ push(Immediate(callee->name()));
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
__ CallRuntime(Runtime::kLoadLookupSlot);
__ push(eax); // Function.
__ push(edx); // Receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
@ -3445,7 +3443,7 @@ void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
Label done_convert;
__ JumpIfSmi(eax, &done_convert, Label::kNear);
__ Push(eax);
__ CallRuntime(Runtime::kToInteger, 1);
__ CallRuntime(Runtime::kToInteger);
__ bind(&done_convert);
context()->Plug(eax);
}
@ -3466,7 +3464,7 @@ void FullCodeGenerator::EmitToName(CallRuntime* expr) {
__ j(below_equal, &done_convert, Label::kNear);
__ bind(&convert);
__ Push(eax);
__ CallRuntime(Runtime::kToName, 1);
__ CallRuntime(Runtime::kToName);
__ bind(&done_convert);
context()->Plug(eax);
}
@ -3956,7 +3954,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) {
__ jmp(&done, Label::kNear);
__ bind(&runtime);
__ CallRuntime(Runtime::kCreateIterResultObject, 2);
__ CallRuntime(Runtime::kCreateIterResultObject);
__ bind(&done);
context()->Plug(eax);
@ -4046,8 +4044,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForStackValue(property->key());
__ CallRuntime(is_strict(language_mode())
? Runtime::kDeleteProperty_Strict
: Runtime::kDeleteProperty_Sloppy,
2);
: Runtime::kDeleteProperty_Sloppy);
context()->Plug(eax);
} else if (proxy != NULL) {
Variable* var = proxy->var();
@ -4059,7 +4056,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
__ mov(eax, NativeContextOperand());
__ push(ContextOperand(eax, Context::EXTENSION_INDEX));
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
__ CallRuntime(Runtime::kDeleteProperty_Sloppy);
context()->Plug(eax);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
// Result of deleting non-global variables is false. 'this' is
@ -4071,7 +4068,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
// context where the variable was introduced.
__ push(context_register());
__ push(Immediate(var->name()));
__ CallRuntime(Runtime::kDeleteLookupSlot, 2);
__ CallRuntime(Runtime::kDeleteLookupSlot);
context()->Plug(eax);
}
} else {
@ -4508,7 +4505,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
switch (op) {
case Token::IN:
VisitForStackValue(expr->right());
__ CallRuntime(Runtime::kHasProperty, 2);
__ CallRuntime(Runtime::kHasProperty);
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ cmp(eax, isolate()->factory()->true_value());
Split(equal, if_true, if_false, fall_through);

View File

@ -241,7 +241,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// an argument to the runtime call.
__ push(ebx);
__ push(eax); // initial map
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ pop(ebx);
// Continue with JSObject being successfully allocated
@ -269,7 +269,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ mov(edi, Operand(esp, offset));
__ push(edi); // constructor function
__ push(edx); // new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ mov(ebx, eax); // store result in ebx
// New object allocated.
@ -389,7 +389,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -422,7 +422,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
__ j(greater, &okay); // Signed comparison.
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -559,7 +559,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
ExternalReference::address_of_real_stack_limit(masm->isolate());
__ cmp(ecx, Operand::StaticVariable(stack_limit));
__ j(above_equal, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -591,7 +591,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ cmp(esp, Operand::StaticVariable(stack_limit));
__ j(above_equal, &ok);
__ push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -749,7 +749,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ Push(Smi::FromInt(static_cast<int>(type)));
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ Pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -932,7 +932,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// stubs that tail call the runtime on deopts passing their parameters in
// registers.
__ pushad();
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ popad();
// Tear down internal frame.
}
@ -959,7 +959,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass deoptimization type to the runtime system.
__ push(Immediate(Smi::FromInt(static_cast<int>(type))));
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
// Tear down internal frame.
}
@ -1072,7 +1072,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1181,7 +1181,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1251,14 +1251,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1377,7 +1377,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ PopReturnAddressTo(ecx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -1463,7 +1463,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
__ Push(ebx); // the first argument
__ Push(edi); // constructor function
__ Push(edx); // new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(FieldOperand(eax, JSValue::kValueOffset));
}
__ Ret();
@ -1569,7 +1569,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
__ Push(edi);
__ Push(edx);
__ Push(eax);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ Pop(edx);
__ Pop(edi);
__ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset));
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1767,7 +1767,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -1812,7 +1812,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -1932,7 +1932,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(edi);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2119,7 +2119,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -2185,7 +2185,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ int3();
}
}
@ -2314,7 +2314,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
__ PushReturnAddressFrom(ebx);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
}
@ -2326,7 +2326,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ push(eax);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
Label skip;
@ -2365,7 +2365,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ j(above_equal, &ok, Label::kNear);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ jmp(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);

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);
__ TailCallRuntime(Runtime::kMathPowRT);
// 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);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ 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);
__ TailCallRuntime(Runtime::kArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -1174,7 +1174,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ mov(Operand(esp, 4 * kPointerSize), edx);
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -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);
__ TailCallRuntime(Runtime::kRegExpExec);
#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);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ 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);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (7) Not a long external string? If yes, go to (10).
@ -1906,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
__ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
@ -1915,9 +1915,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -2249,7 +2248,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ push(edx);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to edi and exit the internal frame.
__ mov(edi, eax);
@ -2614,7 +2613,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);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
@ -2622,7 +2621,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
__ Push(object);
__ Push(function);
__ PushReturnAddressFrom(scratch);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -2683,11 +2682,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ push(object_);
__ push(index_); // Consumed by runtime conversion function.
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
if (!index_.is(eax)) {
// Save the conversion result before the pop instructions below
@ -2717,7 +2716,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ push(object_);
__ SmiTag(index_);
__ push(index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
if (!result_.is(eax)) {
__ mov(result_, eax);
}
@ -2763,7 +2762,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
if (!result_.is(eax)) {
__ mov(result_, eax);
}
@ -3013,7 +3012,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// eax: string
@ -3058,7 +3057,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -3071,7 +3070,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3090,7 +3089,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3125,7 +3124,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -3288,7 +3287,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ Push(edx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3333,7 +3332,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset));
@ -3629,9 +3628,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ push(right);
__ push(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3678,14 +3677,14 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(eax, edx);
__ ret(0);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
__ PopReturnAddressTo(ecx);
__ Push(edx);
__ Push(eax);
__ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition()))));
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -3702,7 +3701,7 @@ void CompareICStub::GenerateMiss(MacroAssembler* masm) {
__ push(edx); // And also use them as the arguments.
__ push(eax);
__ push(Immediate(Smi::FromInt(op())));
__ CallRuntime(Runtime::kCompareIC_Miss, 3);
__ CallRuntime(Runtime::kCompareIC_Miss);
// Compute the entry point of the rewritten stub.
__ lea(edi, FieldOperand(eax, Code::kHeaderSize));
__ pop(eax);
@ -5157,7 +5156,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);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5280,8 +5279,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(cell_reg); // Push return address.
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5452,7 +5450,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
ExternalReference delete_extensions =

View File

@ -1900,20 +1900,27 @@ void MacroAssembler::CallExternalReference(ExternalReference ref,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
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
// smarter.
Move(eax, Immediate(num_arguments));
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
// ----------- S t a t e -------------
// -- esp[0] : return address
// -- esp[8] : argument num_arguments - 1
// ...
// -- esp[8 * num_arguments] : argument 0 (receiver)
//
// For runtime functions with variable arguments:
// -- eax : number of arguments
// -----------------------------------
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
// 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
// smarter.
mov(eax, Immediate(function->nargs));
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -671,28 +671,29 @@ class MacroAssembler: public Assembler {
// Call a runtime routine.
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, kSaveFPRegs);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id, int num_arguments,
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
}
// Convenience function: call an external reference.
void CallExternalReference(ExternalReference ref, int num_arguments);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
void TailCallRuntime(Runtime::FunctionId fid);
// 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

@ -222,8 +222,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -325,7 +327,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);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -334,7 +336,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);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -707,8 +709,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -733,7 +734,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(ip, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -745,7 +746,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -309,8 +309,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -323,8 +322,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -339,8 +337,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -353,8 +350,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Perform tail call to the entry.
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -472,7 +468,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}
@ -777,7 +773,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}

View File

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

View File

@ -130,9 +130,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -319,7 +320,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);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -329,7 +330,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);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -379,7 +380,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -768,8 +769,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -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);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);

View File

@ -293,8 +293,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadWithVectorDescriptor::NameRegister(),
LoadWithVectorDescriptor::SlotRegister(),
LoadWithVectorDescriptor::VectorRegister());
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -305,8 +304,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -324,8 +322,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadWithVectorDescriptor::VectorRegister());
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -336,8 +333,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -480,7 +476,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
ASM_LOCATION("KeyedStoreIC::GenerateMiss");
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}
@ -769,7 +765,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}

View File

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

View File

@ -297,8 +297,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -323,7 +325,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -332,7 +334,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -724,8 +726,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ push(scratch2()); // restore old return address
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -750,7 +751,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -766,7 +767,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// 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);
__ TailCallRuntime(Runtime::kSetProperty);
}

View File

@ -672,8 +672,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -691,8 +690,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -703,8 +701,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -722,8 +719,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -756,7 +752,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}
@ -798,7 +794,7 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}

View File

@ -215,8 +215,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -315,7 +317,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);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -324,7 +326,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);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -698,8 +700,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -722,7 +723,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(at, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -734,7 +735,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// 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);
__ TailCallRuntime(Runtime::kSetProperty);
}

View File

@ -316,8 +316,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -330,8 +329,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -346,8 +344,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -359,8 +356,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -749,7 +745,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}
@ -775,7 +771,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}

View File

@ -215,8 +215,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -315,7 +317,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);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -324,7 +326,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);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -698,8 +700,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -722,7 +723,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(at, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -734,7 +735,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// 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);
__ TailCallRuntime(Runtime::kSetProperty);
}

View File

@ -313,8 +313,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -327,8 +326,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -343,8 +341,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -356,8 +353,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -747,7 +743,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}
@ -773,7 +769,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}

View File

@ -220,8 +220,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -324,7 +326,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);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -333,7 +335,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);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -704,8 +706,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
holder());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -729,7 +730,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(ip, value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -741,7 +742,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// 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);
__ TailCallRuntime(Runtime::kSetProperty);
}

View File

@ -319,8 +319,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -333,8 +332,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -349,8 +347,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -362,8 +359,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -482,7 +478,7 @@ static void StoreIC_PushArgs(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}
@ -781,7 +777,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}

View File

@ -112,8 +112,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -326,7 +328,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -335,7 +337,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -715,8 +717,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ PushReturnAddressFrom(scratch2());
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -741,7 +742,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ PushReturnAddressFrom(scratch1());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -757,7 +758,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ PushReturnAddressFrom(scratch1());
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// 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);
__ TailCallRuntime(Runtime::kSetProperty);
}

View File

@ -672,8 +672,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -692,8 +691,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -705,8 +703,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -725,8 +722,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -761,7 +757,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}
@ -792,7 +788,7 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}

View File

@ -297,8 +297,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ CallRuntime(id);
}
@ -323,7 +325,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kStoreIC_Slow, 5);
__ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@ -332,7 +334,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@ -724,8 +726,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
holder());
__ push(scratch2()); // restore old return address
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
NamedLoadHandlerCompiler::kInterceptorArgsLength);
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@ -750,7 +751,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStoreCallbackProperty, 5);
__ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@ -766,7 +767,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3);
__ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// 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);
__ TailCallRuntime(Runtime::kSetProperty);
}

View File

@ -672,8 +672,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kLoadIC_Miss);
}
@ -691,8 +690,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
: Runtime::kGetProperty,
2);
: Runtime::kGetProperty);
}
@ -703,8 +701,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
LoadIC_PushArgs(masm);
// Perform tail call to the entry.
int arg_count = 4;
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
}
@ -722,8 +719,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
// Do tail-call to runtime routine.
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
: Runtime::kKeyedGetProperty,
2);
: Runtime::kKeyedGetProperty);
}
@ -756,7 +752,7 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kStoreIC_Miss);
}
@ -798,7 +794,7 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
StoreIC_PushArgs(masm);
// Do tail-call to runtime routine.
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5);
__ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
}

View File

@ -195,7 +195,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ bind(&symbol_descriptive_string);
{
__ Push(a0);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -277,7 +277,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a0, a1, a3); // first argument, constructor, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(a0);
}
__ Ret(USE_DELAY_SLOT);
@ -459,7 +459,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor, new_target and the object to the stack,
// and then the initial map as an argument to the runtime call.
__ Push(a1, a3, t4, a2);
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ Pop(a1, a3, t4);
// Continue with JSObject being successfully allocated.
@ -488,7 +488,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor and new_target twice, second pair as arguments
// to the runtime call.
__ Push(a1, a3, a1, a3); // constructor function, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ mov(t4, v0);
__ Pop(a1, a3);
@ -624,7 +624,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -653,7 +653,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm, Register argc,
__ Branch(&okay, gt, a2, Operand(t3));
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -807,7 +807,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ Subu(t1, sp, Operand(t0));
__ LoadRoot(a2, Heap::kRealStackLimitRootIndex);
__ Branch(&ok, hs, t1, Operand(a2));
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -837,7 +837,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ LoadRoot(at, Heap::kStackLimitRootIndex);
__ Branch(&ok, hs, sp, Operand(at));
__ push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -958,7 +958,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ li(a1, Operand(Smi::FromInt(static_cast<int>(type))));
__ push(a1);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -1153,7 +1153,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// registers.
__ MultiPush(kJSCallerSaved | kCalleeSaved);
// Pass the function and deoptimization type to the runtime system.
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ MultiPop(kJSCallerSaved | kCalleeSaved);
}
@ -1179,7 +1179,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass the function and deoptimization type to the runtime system.
__ li(a0, Operand(Smi::FromInt(static_cast<int>(type))));
__ push(a0);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
}
// Get the full codegen state from the stack and untag it -> t2.
@ -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);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
@ -1346,7 +1346,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ push(a0);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
// If the code object is null, just return to the unoptimized code.
@ -1379,7 +1379,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ Branch(&ok, hs, sp, Operand(at));
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ Jump(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);
@ -1457,7 +1457,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ sw(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1566,7 +1566,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ sw(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1637,14 +1637,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ sw(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1733,7 +1733,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a3, a0);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ mov(a0, v0);
__ Pop(a1, a3);
__ lw(a2, FieldMemOperand(v0, FixedArray::kLengthOffset));
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1926,7 +1926,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ Push(a1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -1973,7 +1973,7 @@ void Builtins::Generate_CallBoundFunction(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -2074,7 +2074,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2137,7 +2137,7 @@ void Builtins::Generate_ConstructBoundFunction(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -2340,7 +2340,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -2418,7 +2418,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ break_(0xCC);
}
}

View File

@ -728,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
int ncr; // NaN compare result.
if (cc == lt || cc == le) {
@ -742,9 +742,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -978,7 +977,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);
__ TailCallRuntime(Runtime::kMathPowRT);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1532,12 +1531,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
DCHECK(Smi::FromInt(0) == 0);
__ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -1608,7 +1607,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(a1);
__ TailCallRuntime(Runtime::kArguments, 1);
__ TailCallRuntime(Runtime::kArguments);
}
@ -1636,7 +1635,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a3, a2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1850,7 +1849,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// t1 = argument count (tagged)
__ bind(&runtime);
__ Push(a1, a3, t1);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1869,7 +1868,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1963,7 +1962,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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -1991,7 +1990,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -2000,7 +1999,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);
__ TailCallRuntime(Runtime::kRegExpExec);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2285,7 +2284,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ Branch(&runtime, eq, v0, Operand(a1));
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ bind(&failure);
// For failure and exception return null.
@ -2381,7 +2380,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -2747,7 +2746,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(a1, a2, a3);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to a1 and exit the internal frame.
__ mov(a1, v0);
@ -2815,11 +2814,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_, index_);
}
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
// Save the conversion result before the pop instructions below
@ -2847,7 +2846,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
__ sll(index_, index_, kSmiTagSize);
__ Push(object_, index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
__ Move(result_, v0);
@ -2894,7 +2893,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
__ Move(result_, v0);
call_helper.AfterCall(masm);
@ -3155,7 +3154,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// v0: original string
@ -3200,7 +3199,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ mov(v0, a0);
__ bind(&slow_string);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -3210,7 +3209,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3227,7 +3226,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3259,7 +3258,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -3397,7 +3396,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a0);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3436,7 +3435,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ lw(a1, FieldMemOperand(a1, Oddball::kToNumberOffset));
@ -3729,9 +3728,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3775,7 +3774,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Ret(USE_DELAY_SLOT);
__ subu(v0, a0, a1);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ li(a2, Operand(Smi::FromInt(GREATER)));
@ -3783,7 +3782,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ li(a2, Operand(Smi::FromInt(LESS)));
}
__ Push(a1, a0, a2);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -5175,7 +5174,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ bind(&slow_case);
__ SmiTag(slot_reg);
__ Push(slot_reg);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5289,8 +5288,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(slot_reg, value_reg);
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5414,7 +5412,7 @@ static void CallApiFunctionAndReturn(
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -4521,20 +4521,13 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
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
// smarter.
PrepareCEntryArgs(num_arguments);
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
PrepareCEntryArgs(function->nargs);
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -1244,6 +1244,14 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
CallRuntime(function, function->nargs, kSaveFPRegs);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
BranchDelaySlot bd = PROTECT) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles, bd);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
@ -1256,14 +1264,9 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
int num_arguments,
BranchDelaySlot bd = PROTECT);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
void TailCallRuntime(Runtime::FunctionId fid);
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);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -275,7 +275,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a0, a1, a3); // first argument, constructor, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(a0);
}
__ sd(a0, FieldMemOperand(v0, JSValue::kValueOffset));
@ -455,7 +455,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor, new_target and the object to the stack,
// and then the initial map as an argument to the runtime call.
__ Push(a1, a3, t0, a2);
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ Pop(a1, a3, t0);
// Continue with JSObject being successfully allocated.
@ -484,7 +484,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor and new_target twice, second pair as arguments
// to the runtime call.
__ Push(a1, a3, a1, a3); // constructor function, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ mov(t0, v0);
__ Pop(a1, a3);
@ -618,7 +618,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -646,7 +646,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm, Register argc,
__ Branch(&okay, gt, a2, Operand(a7)); // Signed comparison.
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -798,7 +798,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ Dsubu(a5, sp, Operand(a4));
__ LoadRoot(a2, Heap::kRealStackLimitRootIndex);
__ Branch(&ok, hs, a5, Operand(a2));
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -828,7 +828,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ LoadRoot(at, Heap::kStackLimitRootIndex);
__ Branch(&ok, hs, sp, Operand(at));
__ push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -949,7 +949,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ li(a1, Operand(Smi::FromInt(static_cast<int>(type))));
__ push(a1);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -1144,7 +1144,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// registers.
__ MultiPush(kJSCallerSaved | kCalleeSaved);
// Pass the function and deoptimization type to the runtime system.
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ MultiPop(kJSCallerSaved | kCalleeSaved);
}
@ -1170,7 +1170,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass the function and deoptimization type to the runtime system.
__ li(a0, Operand(Smi::FromInt(static_cast<int>(type))));
__ push(a0);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
}
// Get the full codegen state from the stack and untag it -> a6.
@ -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);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
@ -1337,7 +1337,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ push(a0);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
// If the code object is null, just return to the unoptimized code.
@ -1370,7 +1370,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ Branch(&ok, hs, sp, Operand(at));
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ Jump(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);
@ -1448,7 +1448,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ sd(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1557,7 +1557,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ sd(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1628,14 +1628,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ sd(a1, MemOperand(sp));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1725,7 +1725,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a3, a0);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ mov(a0, v0);
__ Pop(a1, a3);
__ ld(a2, FieldMemOperand(v0, FixedArray::kLengthOffset));
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1917,7 +1917,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ Push(a1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -1964,7 +1964,7 @@ void Builtins::Generate_CallBoundFunction(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -2065,7 +2065,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2127,7 +2127,7 @@ void Builtins::Generate_ConstructBoundFunction(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -2330,7 +2330,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -2408,7 +2408,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ break_(0xCC);
}
}

View File

@ -725,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
int ncr; // NaN compare result.
if (cc == lt || cc == le) {
@ -739,9 +739,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -976,7 +975,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);
__ TailCallRuntime(Runtime::kMathPowRT);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1534,12 +1533,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
DCHECK(Smi::FromInt(0) == 0);
__ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -1610,7 +1609,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(a1);
__ TailCallRuntime(Runtime::kArguments, 1);
__ TailCallRuntime(Runtime::kArguments);
}
@ -1638,7 +1637,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a3, a2);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1852,7 +1851,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// a5 = argument count (tagged)
__ bind(&runtime);
__ Push(a1, a3, a5);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1871,7 +1870,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1965,7 +1964,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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -1994,7 +1993,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -2003,7 +2002,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);
__ TailCallRuntime(Runtime::kRegExpExec);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2320,7 +2319,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ Branch(&runtime, eq, v0, Operand(a1));
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ bind(&failure);
// For failure and exception return null.
@ -2416,7 +2415,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -2824,7 +2823,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(a1, a2, a3);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to a1 and exit the internal frame.
__ mov(a1, v0);
@ -2853,11 +2852,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_, index_);
}
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
// Save the conversion result before the pop instructions below
@ -2886,7 +2885,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
__ SmiTag(index_);
__ Push(object_, index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
__ Move(result_, v0);
@ -2925,7 +2924,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
__ Move(result_, v0);
call_helper.AfterCall(masm);
@ -3187,7 +3186,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// v0: original string
@ -3232,7 +3231,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ mov(v0, a0);
__ bind(&slow_string);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -3242,7 +3241,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3259,7 +3258,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3291,7 +3290,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -3429,7 +3428,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(a1, a0);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3468,7 +3467,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ ld(a1, FieldMemOperand(a1, Oddball::kToNumberOffset));
@ -3761,9 +3760,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3807,7 +3806,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ Ret(USE_DELAY_SLOT);
__ dsubu(v0, a0, a1);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ li(a2, Operand(Smi::FromInt(GREATER)));
@ -3815,7 +3814,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ li(a2, Operand(Smi::FromInt(LESS)));
}
__ Push(a1, a0, a2);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -5201,7 +5200,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ bind(&slow_case);
__ SmiTag(slot_reg);
__ Push(slot_reg);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5315,8 +5314,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(slot_reg, value_reg);
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5441,7 +5439,7 @@ static void CallApiFunctionAndReturn(
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -5054,20 +5054,13 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
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
// smarter.
PrepareCEntryArgs(num_arguments);
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
PrepareCEntryArgs(function->nargs);
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -1355,16 +1355,24 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
BranchDelaySlot bd = PROTECT);
void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, kSaveFPRegs);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id, int num_arguments,
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
BranchDelaySlot bd = PROTECT) {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles, bd);
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles, bd);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
BranchDelaySlot bd = PROTECT) {
CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles, bd);
}
// Convenience function: call an external reference.
@ -1372,14 +1380,8 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
int num_arguments,
BranchDelaySlot bd = PROTECT);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
void TailCallRuntime(Runtime::FunctionId fid);
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);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -270,7 +270,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r5, r4, r6); // first argument, constructor, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(r5);
}
__ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0);
@ -456,7 +456,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor, new_target and the object to the stack,
// and then the initial map as an argument to the runtime call.
__ Push(r4, r6, r7, r5);
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ Pop(r4, r6, r7);
// Continue with JSObject being successfully allocated
@ -485,7 +485,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Push the constructor and new_target twice, second pair as arguments
// to the runtime call.
__ Push(r4, r6, r4, r6);
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ mr(r7, r3);
__ Pop(r4, r6);
@ -618,7 +618,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ push(r4);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -647,7 +647,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm, Register argc,
__ bgt(&okay); // Signed comparison.
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -800,7 +800,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ LoadRoot(r0, Heap::kRealStackLimitRootIndex);
__ cmpl(r6, r0);
__ bge(&ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -830,7 +830,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ cmp(sp, r0);
__ bge(&ok);
__ push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -946,7 +946,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// the runtime system.
__ LoadSmiLiteral(r4, Smi::FromInt(static_cast<int>(type)));
__ Push(kInterpreterAccumulatorRegister, r4);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
}
@ -1139,7 +1139,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// registers.
__ MultiPush(kJSCallerSaved | kCalleeSaved);
// Pass the function and deoptimization type to the runtime system.
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ MultiPop(kJSCallerSaved | kCalleeSaved);
}
@ -1165,7 +1165,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass the function and deoptimization type to the runtime system.
__ LoadSmiLiteral(r3, Smi::FromInt(static_cast<int>(type)));
__ push(r3);
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
}
// Get the full codegen state from the stack and untag it -> r9.
@ -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);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
@ -1331,7 +1331,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ push(r3);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
// If the code object is null, just return to the unoptimized code.
@ -1379,7 +1379,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ bge(&ok);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ Jump(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);
@ -1457,7 +1457,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ StoreP(r4, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1566,7 +1566,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ StoreP(r4, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1637,14 +1637,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ StoreP(r4, MemOperand(sp, 0));
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1738,7 +1738,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r4, r6, r3);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ Pop(r4, r6);
__ LoadP(r5, FieldMemOperand(r3, FixedArray::kLengthOffset));
__ SmiUntag(r5);
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1928,7 +1928,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameAndConstantPoolScope frame(masm, StackFrame::INTERNAL);
__ push(r4);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -2092,7 +2092,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r4);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2299,7 +2299,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -2374,7 +2374,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bkpt(0);
}
}

View File

@ -708,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
int ncr; // NaN compare result
if (cc == lt || cc == le) {
@ -722,9 +722,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -947,7 +946,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);
__ TailCallRuntime(Runtime::kMathPowRT);
// The stub is called from non-optimized code, which expects the result
// as heap number in exponent.
@ -1482,12 +1481,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ LoadSmiLiteral(scratch, Smi::FromInt(0));
__ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
__ Push(object, function);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -1592,7 +1591,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// by calling the runtime system.
__ bind(&slow);
__ push(r4);
__ TailCallRuntime(Runtime::kArguments, 1);
__ TailCallRuntime(Runtime::kArguments);
}
@ -1620,7 +1619,7 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(r4, r6, r5);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1862,7 +1861,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// r8 = argument count (tagged)
__ bind(&runtime);
__ Push(r4, r6, r8);
__ TailCallRuntime(Runtime::kNewSloppyArguments, 3);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -1881,7 +1880,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ Push(receiver, key); // Receiver, key.
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ bind(&slow);
PropertyAccessCompiler::TailCallBuiltin(
@ -1973,7 +1972,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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -1999,7 +1998,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ StoreP(r6, MemOperand(sp, 3 * kPointerSize));
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -2008,7 +2007,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);
__ TailCallRuntime(Runtime::kRegExpExec);
#else // V8_INTERPRETED_REGEXP
// Stack frame on entry.
@ -2303,7 +2302,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ beq(&runtime);
// For exception, throw the exception again.
__ TailCallRuntime(Runtime::kRegExpExecReThrow, 4);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ bind(&failure);
// For failure and exception return null.
@ -2392,7 +2391,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (6) Not a long external string? If yes, go to (8).
@ -2760,7 +2759,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(r4, r5, r6);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to r4 and exit the internal frame.
__ mr(r4, r3);
@ -2819,11 +2818,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_, index_);
}
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
// Save the conversion result before the pop instructions below
// have a chance to overwrite it.
@ -2850,7 +2849,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
call_helper.BeforeCall(masm);
__ SmiTag(index_);
__ Push(object_, index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
__ Move(result_, r3);
call_helper.AfterCall(masm);
__ b(&exit_);
@ -2890,7 +2889,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
__ Move(result_, r3);
call_helper.AfterCall(masm);
__ b(&exit_);
@ -3144,7 +3143,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// r3: original string
@ -3184,7 +3183,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ blr();
__ bind(&slow_string);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -3195,7 +3194,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3217,7 +3216,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ bind(&not_smi);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3247,7 +3246,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(r3); // Push argument.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -3402,7 +3401,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
// tagged as a small integer.
__ bind(&runtime);
__ Push(r4, r3);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3444,7 +3443,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ LoadP(r4, FieldMemOperand(r4, Oddball::kToNumberOffset));
@ -3728,9 +3727,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ bind(&runtime);
__ Push(left, right);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3776,7 +3775,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(r3, r3, r4);
__ Ret();
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (op() == Token::LT || op() == Token::LTE) {
__ LoadSmiLiteral(r5, Smi::FromInt(GREATER));
@ -3784,7 +3783,7 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ LoadSmiLiteral(r5, Smi::FromInt(LESS));
}
__ Push(r4, r3, r5);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -3800,7 +3799,7 @@ void CompareICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(r4, r3);
__ LoadSmiLiteral(r0, Smi::FromInt(op()));
__ push(r0);
__ CallRuntime(Runtime::kCompareIC_Miss, 3);
__ CallRuntime(Runtime::kCompareIC_Miss);
// Compute the entry point of the rewritten stub.
__ addi(r5, r3, Operand(Code::kHeaderSize - kHeapObjectTag));
// Restore registers.
@ -5173,7 +5172,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
// Fallback to runtime.
__ SmiTag(slot);
__ Push(slot);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5301,8 +5300,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(slot, value);
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5438,7 +5436,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -2312,20 +2312,13 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
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
// smarter.
mov(r3, Operand(num_arguments));
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
mov(r3, Operand(function->nargs));
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -931,28 +931,29 @@ class MacroAssembler : public Assembler {
// Call a runtime routine.
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, kSaveFPRegs);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id, int num_arguments,
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
}
// Convenience function: call an external reference.
void CallExternalReference(const ExternalReference& ext, int num_arguments);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
void TailCallRuntime(Runtime::FunctionId fid);
int CalculateStackPassedWords(int num_reg_arguments,
int num_double_arguments);

View File

@ -1027,29 +1027,29 @@ namespace internal {
// Most intrinsics are implemented in the runtime/ directory, but ICs are
// implemented in ic.cc for now.
#define FOR_EACH_INTRINSIC_IC(F) \
F(LoadIC_Miss, 3, 1) \
F(KeyedLoadIC_Miss, 3, 1) \
F(CallIC_Miss, 3, 1) \
F(StoreIC_Miss, 3, 1) \
F(StoreIC_Slow, 3, 1) \
F(KeyedStoreIC_Miss, 3, 1) \
F(KeyedStoreIC_Slow, 3, 1) \
F(StoreCallbackProperty, 5, 1) \
F(LoadPropertyWithInterceptorOnly, 3, 1) \
F(LoadPropertyWithInterceptor, 3, 1) \
F(LoadElementWithInterceptor, 2, 1) \
F(StorePropertyWithInterceptor, 3, 1) \
F(CompareIC_Miss, 3, 1) \
F(BinaryOpIC_Miss, 2, 1) \
F(CompareNilIC_Miss, 1, 1) \
F(Unreachable, 0, 1) \
F(ToBooleanIC_Miss, 1, 1) \
F(KeyedLoadIC_MissFromStubFailure, 4, 1) \
F(KeyedStoreIC_MissFromStubFailure, 3, 1) \
F(StoreIC_MissFromStubFailure, 3, 1) \
F(ElementsTransitionAndStoreIC_Miss, 4, 1) \
F(BinaryOpIC_MissWithAllocationSite, 3, 1) \
F(LoadIC_MissFromStubFailure, 0, 1)
F(CallIC_Miss, 3, 1) \
F(CompareIC_Miss, 3, 1) \
F(CompareNilIC_Miss, 1, 1) \
F(ElementsTransitionAndStoreIC_Miss, 5, 1) \
F(KeyedLoadIC_Miss, 4, 1) \
F(KeyedLoadIC_MissFromStubFailure, 4, 1) \
F(KeyedStoreIC_Miss, 5, 1) \
F(KeyedStoreIC_MissFromStubFailure, 5, 1) \
F(KeyedStoreIC_Slow, 5, 1) \
F(LoadElementWithInterceptor, 2, 1) \
F(LoadIC_Miss, 4, 1) \
F(LoadIC_MissFromStubFailure, 4, 1) \
F(LoadPropertyWithInterceptor, 3, 1) \
F(LoadPropertyWithInterceptorOnly, 3, 1) \
F(StoreCallbackProperty, 5, 1) \
F(StoreIC_Miss, 5, 1) \
F(StoreIC_MissFromStubFailure, 5, 1) \
F(StoreIC_Slow, 5, 1) \
F(StorePropertyWithInterceptor, 3, 1) \
F(ToBooleanIC_Miss, 1, 1) \
F(Unreachable, 0, 1)
#define FOR_EACH_INTRINSIC_RETURN_OBJECT(F) \

View File

@ -230,7 +230,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ Push(rbx);
__ Push(rax); // initial map
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ Pop(rbx);
__ Pop(rdx);
@ -268,7 +268,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ Push(rdx);
__ Push(rdi); // constructor function
__ Push(rdx); // new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ movp(rbx, rax); // store result in rbx
__ Pop(rdx);
__ Pop(rdi);
@ -388,7 +388,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(rdi);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -423,7 +423,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
__ j(greater, &okay); // Signed comparison.
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -628,7 +628,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ subp(rdx, rcx);
__ CompareRoot(rdx, Heap::kRealStackLimitRootIndex);
__ j(above_equal, &ok, Label::kNear);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -658,7 +658,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ CompareRoot(rsp, Heap::kStackLimitRootIndex);
__ j(above_equal, &ok, Label::kNear);
__ Push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ Pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -800,7 +800,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ Push(Smi::FromInt(static_cast<int>(type)));
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ Pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -984,7 +984,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// stubs that tail call the runtime on deopts passing their parameters in
// registers.
__ Pushad();
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ Popad();
// Tear down internal frame.
}
@ -1013,7 +1013,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass the deoptimization type to the runtime system.
__ Push(Smi::FromInt(static_cast<int>(type)));
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
// Tear down internal frame.
}
@ -1126,7 +1126,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1242,7 +1242,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1316,7 +1316,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
{
StackArgumentsAccessor args(rsp, 0);
__ movp(args.GetReceiverOperand(), rdi);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1446,7 +1446,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx);
__ Push(rax);
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -1532,7 +1532,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
__ Push(rbx); // the first argument
__ Push(rdi); // constructor function
__ Push(rdx); // new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(FieldOperand(rax, JSValue::kValueOffset));
}
__ Ret();
@ -1671,7 +1671,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -1730,7 +1730,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ int3();
}
}
@ -1774,7 +1774,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
__ Push(rdi);
__ Push(rdx);
__ Push(rax);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ Pop(rdx);
__ Pop(rdi);
__ SmiToInteger32(rbx, FieldOperand(rax, FixedArray::kLengthOffset));
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1974,7 +1974,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ Push(rdi);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -2018,7 +2018,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -2140,7 +2140,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(rdi);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2394,7 +2394,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
__ PushReturnAddressFrom(rbx);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
}
@ -2406,7 +2406,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ Push(rax);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
Label skip;
@ -2442,7 +2442,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ j(above_equal, &ok);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ jmp(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);

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);
__ TailCallRuntime(Runtime::kMathPowRT);
// 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);
__ TailCallRuntime(Runtime::kArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -865,7 +865,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ movp(args.GetArgumentOperand(0), rdx);
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -889,7 +889,7 @@ void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
__ PushReturnAddressFrom(scratch);
// Perform tail call to the entry.
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor, 2);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ 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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kRegExpExec);
#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);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
// Do the runtime call to execute the regexp.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (7) Not a long external string? If yes, go to (10).
@ -1763,13 +1763,12 @@ 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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
__ Push(Smi::FromInt(NegativeComparisonResult(cc)));
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(
is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare,
3);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -2106,7 +2105,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(rdx);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to edi and exit the internal frame.
__ movp(rdi, rax);
@ -2565,7 +2564,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Invalidate the instanceof cache.
__ Move(rax, Smi::FromInt(0));
__ StoreRoot(rax, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
@ -2573,7 +2572,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
__ Push(object);
__ Push(function);
__ PushReturnAddressFrom(kScratchRegister);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -2632,11 +2631,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_);
__ Push(index_); // Consumed by runtime conversion function.
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
if (!index_.is(rax)) {
// Save the conversion result before the pop instructions below
@ -2665,7 +2664,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ Push(object_);
__ Integer32ToSmi(index_, index_);
__ Push(index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
if (!result_.is(rax)) {
__ movp(result_, rax);
}
@ -2703,7 +2702,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ Push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
if (!result_.is(rax)) {
__ movp(result_, rax);
}
@ -2950,7 +2949,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// rax: string
@ -2996,7 +2995,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -3009,7 +3008,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -3028,7 +3027,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -3063,7 +3062,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -3238,7 +3237,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ Push(rdx);
__ Push(rax);
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3283,7 +3282,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ movp(rax, FieldOperand(rax, Oddball::kToNumberOffset));
@ -3565,9 +3564,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ Push(right);
__ PushReturnAddressFrom(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3612,14 +3611,14 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ subp(rax, rdx);
__ ret(0);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
__ PopReturnAddressTo(rcx);
__ Push(rdx);
__ Push(rax);
__ Push(Smi::FromInt(NegativeComparisonResult(GetCondition())));
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -3636,7 +3635,7 @@ void CompareICStub::GenerateMiss(MacroAssembler* masm) {
__ Push(rdx);
__ Push(rax);
__ Push(Smi::FromInt(op()));
__ CallRuntime(Runtime::kCompareIC_Miss, 3);
__ CallRuntime(Runtime::kCompareIC_Miss);
// Compute the entry point of the rewritten stub.
__ leap(rdi, FieldOperand(rax, Code::kHeaderSize));
@ -4891,7 +4890,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(kScratchRegister);
__ Push(slot_reg);
__ Push(kScratchRegister);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -5014,8 +5013,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(kScratchRegister);
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5189,7 +5187,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
__ bind(&delete_allocated_handles);

View File

@ -662,27 +662,23 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
}
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
int num_arguments) {
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
// ----------- S t a t e -------------
// -- rsp[0] : return address
// -- rsp[8] : argument num_arguments - 1
// ...
// -- rsp[8 * num_arguments] : argument 0 (receiver)
//
// For runtime functions with variable arguments:
// -- rax : number of 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
// smarter.
Set(rax, num_arguments);
JumpToExternalReference(ext);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
int num_arguments) {
TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments);
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
Set(rax, function->nargs);
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}

View File

@ -1404,32 +1404,32 @@ class MacroAssembler: public Assembler {
SaveFPRegsMode save_doubles = kDontSaveFPRegs);
// Call a runtime function and save the value of XMM registers.
void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
void CallRuntimeSaveDoubles(Runtime::FunctionId fid) {
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, kSaveFPRegs);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id,
int num_arguments,
void CallRuntime(Runtime::FunctionId fid,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
const Runtime::Function* function = Runtime::FunctionForId(fid);
CallRuntime(function, function->nargs, save_doubles);
}
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId fid, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
}
// Convenience function: call an external reference.
void CallExternalReference(const ExternalReference& ext,
int num_arguments);
// Tail call of a runtime routine (jump).
// Like JumpToExternalReference, but also takes care of passing the number
// of parameters.
void TailCallExternalReference(const ExternalReference& ext,
int num_arguments);
// Convenience function: tail call a runtime routine (jump)
void TailCallRuntime(Runtime::FunctionId fid);
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid, int num_arguments);
// Jump to a runtime routine.
// Jump to a runtime routines
void JumpToExternalReference(const ExternalReference& ext);
// Before calling a C-function from generated code, align arguments on stack.

View File

@ -241,7 +241,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// an argument to the runtime call.
__ push(ebx);
__ push(eax); // initial map
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ CallRuntime(Runtime::kFinalizeInstanceSize);
__ pop(ebx);
// Continue with JSObject being successfully allocated
@ -269,7 +269,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ mov(edi, Operand(esp, offset));
__ push(edi); // constructor function
__ push(edx); // new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ mov(ebx, eax); // store result in ebx
// New object allocated.
@ -389,7 +389,7 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
@ -422,7 +422,7 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
__ j(greater, &okay); // Signed comparison.
// Out of stack space.
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&okay);
}
@ -559,7 +559,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
ExternalReference::address_of_real_stack_limit(masm->isolate());
__ cmp(ecx, Operand::StaticVariable(stack_limit));
__ j(above_equal, &ok);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ bind(&ok);
// If ok, push undefined as the initial value for all register file entries.
@ -591,7 +591,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ cmp(esp, Operand::StaticVariable(stack_limit));
__ j(above_equal, &ok);
__ push(kInterpreterBytecodeArrayRegister);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
__ pop(kInterpreterBytecodeArrayRegister);
__ bind(&ok);
}
@ -749,7 +749,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Pass the deoptimization type to the runtime system.
__ Push(Smi::FromInt(static_cast<int>(type)));
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
__ Pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
// Tear down internal frame.
@ -932,7 +932,7 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
// stubs that tail call the runtime on deopts passing their parameters in
// registers.
__ pushad();
__ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ CallRuntime(Runtime::kNotifyStubFailure, save_doubles);
__ popad();
// Tear down internal frame.
}
@ -959,7 +959,7 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
// Pass deoptimization type to the runtime system.
__ push(Immediate(Smi::FromInt(static_cast<int>(type))));
__ CallRuntime(Runtime::kNotifyDeoptimized, 1);
__ CallRuntime(Runtime::kNotifyDeoptimized);
// Tear down internal frame.
}
@ -1072,7 +1072,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&receiver_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1181,7 +1181,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ bind(&target_not_callable);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction, 1);
__ TailCallRuntime(Runtime::kThrowApplyNonFunction);
}
}
@ -1251,14 +1251,14 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&target_not_constructor);
{
__ mov(Operand(esp, kPointerSize), edi);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
// 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);
__ TailCallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -1377,7 +1377,7 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
__ PopReturnAddressTo(ecx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString, 1);
__ TailCallRuntime(Runtime::kSymbolDescriptiveString);
}
}
@ -1463,7 +1463,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
__ Push(ebx); // the first argument
__ Push(edi); // constructor function
__ Push(edx); // new target
__ CallRuntime(Runtime::kNewObject, 2);
__ CallRuntime(Runtime::kNewObject);
__ Pop(FieldOperand(eax, JSValue::kValueOffset));
}
__ Ret();
@ -1569,7 +1569,7 @@ void Builtins::Generate_Apply(MacroAssembler* masm) {
__ Push(edi);
__ Push(edx);
__ Push(eax);
__ CallRuntime(Runtime::kCreateListFromArrayLike, 1);
__ CallRuntime(Runtime::kCreateListFromArrayLike);
__ Pop(edx);
__ Pop(edi);
__ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset));
@ -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);
__ TailCallRuntime(Runtime::kThrowStackOverflow);
__ bind(&done);
}
@ -1774,7 +1774,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError);
}
}
@ -1819,7 +1819,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
}
__ bind(&done);
}
@ -1939,7 +1939,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(edi);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
__ CallRuntime(Runtime::kThrowCalledNonCallable);
}
}
@ -2126,7 +2126,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
{
FrameScope frame(masm, StackFrame::MANUAL);
EnterArgumentsAdaptorFrame(masm);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
__ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
}
__ bind(&no_strong_error);
@ -2192,7 +2192,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&stack_overflow);
{
FrameScope frame(masm, StackFrame::MANUAL);
__ CallRuntime(Runtime::kThrowStackOverflow, 0);
__ CallRuntime(Runtime::kThrowStackOverflow);
__ int3();
}
}
@ -2321,7 +2321,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
__ PushReturnAddressFrom(ebx);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation);
}
}
@ -2333,7 +2333,7 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
// Pass function as argument.
__ push(eax);
__ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
__ CallRuntime(Runtime::kCompileForOnStackReplacement);
}
Label skip;
@ -2372,7 +2372,7 @@ void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
__ j(above_equal, &ok, Label::kNear);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kStackGuard, 0);
__ CallRuntime(Runtime::kStackGuard);
}
__ jmp(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);

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);
__ TailCallRuntime(Runtime::kMathPowRT);
// 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);
__ TailCallRuntime(Runtime::kLoadElementWithInterceptor);
__ 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);
__ TailCallRuntime(Runtime::kArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewSloppyArguments);
}
@ -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);
__ TailCallRuntime(Runtime::kNewStrictArguments);
}
@ -875,7 +875,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ mov(Operand(esp, 4 * kPointerSize), edx);
__ bind(&runtime);
__ TailCallRuntime(Runtime::kNewRestParam, 4);
__ TailCallRuntime(Runtime::kNewRestParam);
}
@ -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);
__ TailCallRuntime(Runtime::kRegExpExec);
#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);
__ TailCallRuntime(Runtime::kRegExpExecReThrow);
__ 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);
__ TailCallRuntime(Runtime::kRegExpExec);
// Deferred code for string handling.
// (7) Not a long external string? If yes, go to (10).
@ -1613,7 +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);
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
} else {
__ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
@ -1622,9 +1622,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);
__ TailCallRuntime(is_strong(strength()) ? Runtime::kCompare_Strong
: Runtime::kCompare);
}
__ bind(&miss);
@ -1956,7 +1955,7 @@ void CallICStub::GenerateMiss(MacroAssembler* masm) {
__ push(edx);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss, 3);
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to edi and exit the internal frame.
__ mov(edi, eax);
@ -2326,7 +2325,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);
__ TailCallRuntime(Runtime::kHasInPrototypeChain);
// Slow-case: Call the %InstanceOf runtime function.
__ bind(&slow_case);
@ -2334,7 +2333,7 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
__ Push(object);
__ Push(function);
__ PushReturnAddressFrom(scratch);
__ TailCallRuntime(Runtime::kInstanceOf, 2);
__ TailCallRuntime(Runtime::kInstanceOf);
}
@ -2393,11 +2392,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ push(object_);
__ push(index_); // Consumed by runtime conversion function.
if (index_flags_ == STRING_INDEX_IS_NUMBER) {
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero);
} else {
DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
// NumberToSmi discards numbers that are not exact integers.
__ CallRuntime(Runtime::kNumberToSmi, 1);
__ CallRuntime(Runtime::kNumberToSmi);
}
if (!index_.is(eax)) {
// Save the conversion result before the pop instructions below
@ -2427,7 +2426,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
__ push(object_);
__ SmiTag(index_);
__ push(index_);
__ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
__ CallRuntime(Runtime::kStringCharCodeAtRT);
if (!result_.is(eax)) {
__ mov(result_, eax);
}
@ -2473,7 +2472,7 @@ void StringCharFromCodeGenerator::GenerateSlow(
__ bind(&slow_case_);
call_helper.BeforeCall(masm);
__ push(code_);
__ CallRuntime(Runtime::kStringCharFromCode, 1);
__ CallRuntime(Runtime::kStringCharFromCode);
if (!result_.is(eax)) {
__ mov(result_, eax);
}
@ -2723,7 +2722,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// Just jump to runtime to create the sub string.
__ bind(&runtime);
__ TailCallRuntime(Runtime::kSubString, 3);
__ TailCallRuntime(Runtime::kSubString);
__ bind(&single_char);
// eax: string
@ -2768,7 +2767,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kStringToNumber, 1);
__ TailCallRuntime(Runtime::kStringToNumber);
__ bind(&not_string);
Label not_oddball;
@ -2781,7 +2780,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToNumber, 1);
__ TailCallRuntime(Runtime::kToNumber);
}
@ -2800,7 +2799,7 @@ void ToLengthStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToLength, 1);
__ TailCallRuntime(Runtime::kToLength);
}
@ -2835,7 +2834,7 @@ void ToStringStub::Generate(MacroAssembler* masm) {
__ pop(ecx); // Pop return address.
__ push(eax); // Push argument.
__ push(ecx); // Push return address.
__ TailCallRuntime(Runtime::kToString, 1);
__ TailCallRuntime(Runtime::kToString);
}
@ -2998,7 +2997,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
__ Push(edx);
__ Push(eax);
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
@ -3043,7 +3042,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);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
if (!Token::IsEqualityOp(op())) {
__ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset));
@ -3311,9 +3310,9 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
__ push(right);
__ push(tmp1);
if (equality) {
__ TailCallRuntime(Runtime::kStringEquals, 2);
__ TailCallRuntime(Runtime::kStringEquals);
} else {
__ TailCallRuntime(Runtime::kStringCompare, 2);
__ TailCallRuntime(Runtime::kStringCompare);
}
__ bind(&miss);
@ -3360,14 +3359,14 @@ void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) {
__ sub(eax, edx);
__ ret(0);
} else if (is_strong(strength())) {
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0);
__ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion);
} else {
__ PopReturnAddressTo(ecx);
__ Push(edx);
__ Push(eax);
__ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition()))));
__ PushReturnAddressFrom(ecx);
__ TailCallRuntime(Runtime::kCompare, 3);
__ TailCallRuntime(Runtime::kCompare);
}
__ bind(&miss);
@ -3384,7 +3383,7 @@ void CompareICStub::GenerateMiss(MacroAssembler* masm) {
__ push(edx); // And also use them as the arguments.
__ push(eax);
__ push(Immediate(Smi::FromInt(op())));
__ CallRuntime(Runtime::kCompareIC_Miss, 3);
__ CallRuntime(Runtime::kCompareIC_Miss);
// Compute the entry point of the rewritten stub.
__ lea(edi, FieldOperand(eax, Code::kHeaderSize));
__ pop(eax);
@ -4839,7 +4838,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);
__ TailCallRuntime(Runtime::kLoadGlobalViaContext);
}
@ -4962,8 +4961,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
__ Push(cell_reg); // Push return address.
__ TailCallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
2);
: Runtime::kStoreGlobalViaContext_Sloppy);
}
@ -5134,7 +5132,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
// Re-throw by promoting a scheduled exception.
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0);
__ TailCallRuntime(Runtime::kPromoteScheduledException);
// HandleScope limit has changed. Delete allocated extensions.
ExternalReference delete_extensions =