From 899c4284d50603a6276a8bf5c988d30cdd192411 Mon Sep 17 00:00:00 2001 From: mstarzinger Date: Wed, 5 Aug 2015 04:20:07 -0700 Subject: [PATCH] Cleanup unnecessary duplication of runtime functions. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1269323003 Cr-Commit-Position: refs/heads/master@{#30023} --- src/arm/code-stubs-arm.cc | 8 ++++---- src/arm64/code-stubs-arm64.cc | 8 ++++---- src/code-stubs.cc | 6 +++--- src/compiler/linkage.cc | 2 +- src/compiler/simplified-lowering.cc | 2 +- src/hydrogen.cc | 2 +- src/ia32/code-stubs-ia32.cc | 8 ++++---- src/mips/code-stubs-mips.cc | 8 ++++---- src/mips64/code-stubs-mips64.cc | 8 ++++---- src/ppc/code-stubs-ppc.cc | 8 ++++---- src/runtime/runtime-maths.cc | 8 +------- src/runtime/runtime-numbers.cc | 8 +------- src/runtime/runtime-regexp.cc | 8 +------- src/runtime/runtime-scopes.cc | 26 ++++++++++---------------- src/runtime/runtime-strings.cc | 24 +++--------------------- src/runtime/runtime.h | 11 ++--------- src/x64/code-stubs-x64.cc | 8 ++++---- src/x87/code-stubs-x87.cc | 8 ++++---- test/mjsunit/regress/string-compare-memcmp.js | 2 +- 19 files changed, 57 insertions(+), 106 deletions(-) diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index d0d0993..b10fcad 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -1597,7 +1597,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { // by calling the runtime system. __ bind(&slow); __ push(r1); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3312,7 +3312,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // r0: original string @@ -3499,7 +3499,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) // tagged as a small integer. __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3780,7 +3780,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc index f75539d..7d8a4a6 100644 --- a/src/arm64/code-stubs-arm64.cc +++ b/src/arm64/code-stubs-arm64.cc @@ -1745,7 +1745,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { // the runtime system. __ Bind(&slow); __ Push(key); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3695,7 +3695,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ Bind(&miss); @@ -4024,7 +4024,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { __ Ret(); __ Bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // x1: result_length @@ -4232,7 +4232,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Call the runtime. // Returns -1 (less), 0 (equal), or 1 (greater) tagged as a small integer. - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } diff --git a/src/code-stubs.cc b/src/code-stubs.cc index c7f4d4b..5e2c4e7 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -698,7 +698,7 @@ void TypeofStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {} void NumberToStringStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { NumberToStringDescriptor call_descriptor(isolate()); descriptor->Initialize( - Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); + Runtime::FunctionForId(Runtime::kNumberToString)->entry); } @@ -727,7 +727,7 @@ void CreateWeakCellStub::InitializeDescriptor(CodeStubDescriptor* d) {} void RegExpConstructResultStub::InitializeDescriptor( CodeStubDescriptor* descriptor) { descriptor->Initialize( - Runtime::FunctionForId(Runtime::kRegExpConstructResultRT)->entry); + Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); } @@ -774,7 +774,7 @@ void BinaryOpWithAllocationSiteStub::InitializeDescriptor( void StringAddStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { - descriptor->Initialize(Runtime::FunctionForId(Runtime::kStringAddRT)->entry); + descriptor->Initialize(Runtime::FunctionForId(Runtime::kStringAdd)->entry); } diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc index 51b29e3..bae73df 100644 --- a/src/compiler/linkage.cc +++ b/src/compiler/linkage.cc @@ -207,7 +207,7 @@ int Linkage::FrameStateInputCount(Runtime::FunctionId function) { case Runtime::kPushBlockContext: case Runtime::kPushCatchContext: case Runtime::kReThrow: - case Runtime::kStringCompareRT: + case Runtime::kStringCompare: case Runtime::kStringEquals: case Runtime::kToFastProperties: // TODO(jarin): Is it safe? case Runtime::kTraceEnter: diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index 006b6ab..5ecd30c 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -1341,7 +1341,7 @@ void SimplifiedLowering::DoStoreElement(Node* node) { Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) { Runtime::FunctionId f = - requires_ordering ? Runtime::kStringCompareRT : Runtime::kStringEquals; + requires_ordering ? Runtime::kStringCompare : Runtime::kStringEquals; ExternalReference ref(f, jsgraph()->isolate()); Operator::Properties props = node->op()->properties(); // TODO(mstarzinger): We should call StringCompareStub here instead, once an diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 7342b40..794a38b 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -2505,7 +2505,7 @@ HValue* HGraphBuilder::BuildUncheckedStringAdd( // Fallback to the runtime to add the two strings. Add(left, right); Push(Add(isolate()->factory()->empty_string(), - Runtime::FunctionForId(Runtime::kStringAddRT), 2)); + Runtime::FunctionForId(Runtime::kStringAdd), 2)); } if_sameencodingandsequential.End(); } diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc index 026a310..23f02a7 100644 --- a/src/ia32/code-stubs-ia32.cc +++ b/src/ia32/code-stubs-ia32.cc @@ -787,7 +787,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { __ pop(ebx); // Return address. __ push(edx); __ push(ebx); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3335,7 +3335,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // eax: string @@ -3558,7 +3558,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) // tagged as a small integer. __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3870,7 +3870,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index 70df019..65b5ee5 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -1683,7 +1683,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { // by calling the runtime system. __ bind(&slow); __ push(a1); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3456,7 +3456,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // v0: original string @@ -3650,7 +3650,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { StringHelper::GenerateCompareFlatOneByteStrings(masm, a1, a0, a2, a3, t0, t1); __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3960,7 +3960,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc index 59d36c5..55bf6e4 100644 --- a/src/mips64/code-stubs-mips64.cc +++ b/src/mips64/code-stubs-mips64.cc @@ -1683,7 +1683,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { // by calling the runtime system. __ bind(&slow); __ push(a1); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3488,7 +3488,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // v0: original string @@ -3682,7 +3682,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { StringHelper::GenerateCompareFlatOneByteStrings(masm, a1, a0, a2, a3, a4, a5); __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3992,7 +3992,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc index 13e0948..353a92d 100644 --- a/src/ppc/code-stubs-ppc.cc +++ b/src/ppc/code-stubs-ppc.cc @@ -1686,7 +1686,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { // by calling the runtime system. __ bind(&slow); __ push(r4); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3481,7 +3481,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // r3: original string @@ -3694,7 +3694,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) // tagged as a small integer. __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3998,7 +3998,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/src/runtime/runtime-maths.cc b/src/runtime/runtime-maths.cc index 474b463..23b58cf 100644 --- a/src/runtime/runtime-maths.cc +++ b/src/runtime/runtime-maths.cc @@ -135,7 +135,7 @@ RUNTIME_FUNCTION(Runtime_MathFloor) { // Slow version of Math.pow. We check for fast paths for special cases. // Used if VFP3 is not available. -RUNTIME_FUNCTION(Runtime_MathPowSlow) { +RUNTIME_FUNCTION(Runtime_MathPow) { HandleScope scope(isolate); DCHECK(args.length() == 2); isolate->counters()->math_pow()->Increment(); @@ -238,12 +238,6 @@ RUNTIME_FUNCTION(Runtime_MathFround) { } -RUNTIME_FUNCTION(Runtime_MathPow) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_MathPowSlow(args, isolate); -} - - RUNTIME_FUNCTION(Runtime_IsMinusZero) { SealHandleScope shs(isolate); DCHECK(args.length() == 1); diff --git a/src/runtime/runtime-numbers.cc b/src/runtime/runtime-numbers.cc index 3be4cc0..d9a0c9f 100644 --- a/src/runtime/runtime-numbers.cc +++ b/src/runtime/runtime-numbers.cc @@ -231,7 +231,7 @@ RUNTIME_FUNCTION(Runtime_StringParseFloat) { } -RUNTIME_FUNCTION(Runtime_NumberToStringRT) { +RUNTIME_FUNCTION(Runtime_NumberToString) { HandleScope scope(isolate); DCHECK(args.length() == 1); CONVERT_NUMBER_ARG_HANDLE_CHECKED(number, 0); @@ -558,12 +558,6 @@ RUNTIME_FUNCTION(Runtime_MaxSmi) { } -RUNTIME_FUNCTION(Runtime_NumberToString) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_NumberToStringRT(args, isolate); -} - - RUNTIME_FUNCTION(Runtime_IsSmi) { SealHandleScope shs(isolate); DCHECK(args.length() == 1); diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc index e742d64..1ad6a1d 100644 --- a/src/runtime/runtime-regexp.cc +++ b/src/runtime/runtime-regexp.cc @@ -784,7 +784,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExec) { } -RUNTIME_FUNCTION(Runtime_RegExpConstructResultRT) { +RUNTIME_FUNCTION(Runtime_RegExpConstructResult) { HandleScope handle_scope(isolate); DCHECK(args.length() == 3); CONVERT_SMI_ARG_CHECKED(size, 0); @@ -805,12 +805,6 @@ RUNTIME_FUNCTION(Runtime_RegExpConstructResultRT) { } -RUNTIME_FUNCTION(Runtime_RegExpConstructResult) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_RegExpConstructResultRT(args, isolate); -} - - static JSRegExp::Flags RegExpFlagsFromString(Handle flags, bool* success) { uint32_t value = JSRegExp::NONE; diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc index 0d69d0a..ff7e783 100644 --- a/src/runtime/runtime-scopes.cc +++ b/src/runtime/runtime-scopes.cc @@ -1082,7 +1082,16 @@ RUNTIME_FUNCTION(Runtime_StoreLookupSlot) { } -RUNTIME_FUNCTION(Runtime_GetArgumentsProperty) { +RUNTIME_FUNCTION(Runtime_ArgumentsLength) { + SealHandleScope shs(isolate); + DCHECK(args.length() == 0); + JavaScriptFrameIterator it(isolate); + JavaScriptFrame* frame = it.frame(); + return Smi::FromInt(frame->GetArgumentsLength()); +} + + +RUNTIME_FUNCTION(Runtime_Arguments) { SealHandleScope shs(isolate); DCHECK(args.length() == 1); CONVERT_ARG_HANDLE_CHECKED(Object, raw_key, 0); @@ -1157,20 +1166,5 @@ RUNTIME_FUNCTION(Runtime_GetArgumentsProperty) { Object::GetProperty(isolate->initial_object_prototype(), key)); return *result; } - - -RUNTIME_FUNCTION(Runtime_ArgumentsLength) { - SealHandleScope shs(isolate); - DCHECK(args.length() == 0); - JavaScriptFrameIterator it(isolate); - JavaScriptFrame* frame = it.frame(); - return Smi::FromInt(frame->GetArgumentsLength()); -} - - -RUNTIME_FUNCTION(Runtime_Arguments) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); -} } // namespace internal } // namespace v8 diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc index 3b9cfbf..d49d660 100644 --- a/src/runtime/runtime-strings.cc +++ b/src/runtime/runtime-strings.cc @@ -281,7 +281,7 @@ RUNTIME_FUNCTION(Runtime_StringLocaleCompare) { } -RUNTIME_FUNCTION(Runtime_SubStringRT) { +RUNTIME_FUNCTION(Runtime_SubString) { HandleScope scope(isolate); DCHECK(args.length() == 3); @@ -309,13 +309,7 @@ RUNTIME_FUNCTION(Runtime_SubStringRT) { } -RUNTIME_FUNCTION(Runtime_SubString) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_SubStringRT(args, isolate); -} - - -RUNTIME_FUNCTION(Runtime_StringAddRT) { +RUNTIME_FUNCTION(Runtime_StringAdd) { HandleScope scope(isolate); DCHECK(args.length() == 2); CONVERT_ARG_HANDLE_CHECKED(String, str1, 0); @@ -328,12 +322,6 @@ RUNTIME_FUNCTION(Runtime_StringAddRT) { } -RUNTIME_FUNCTION(Runtime_StringAdd) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_StringAddRT(args, isolate); -} - - RUNTIME_FUNCTION(Runtime_InternalizeString) { HandleScope handles(isolate); RUNTIME_ASSERT(args.length() == 1); @@ -428,7 +416,7 @@ RUNTIME_FUNCTION(Runtime_CharFromCode) { } -RUNTIME_FUNCTION(Runtime_StringCompareRT) { +RUNTIME_FUNCTION(Runtime_StringCompare) { HandleScope handle_scope(isolate); DCHECK(args.length() == 2); @@ -497,12 +485,6 @@ RUNTIME_FUNCTION(Runtime_StringCompareRT) { } -RUNTIME_FUNCTION(Runtime_StringCompare) { - SealHandleScope shs(isolate); - return __RT_impl_Runtime_StringCompareRT(args, isolate); -} - - RUNTIME_FUNCTION(Runtime_StringBuilderConcat) { HandleScope scope(isolate); DCHECK(args.length() == 3); diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 39656fa..21f38e5 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -384,12 +384,11 @@ namespace internal { F(MathExpRT, 1, 1) \ F(MathClz32, 1, 1) \ F(MathFloor, 1, 1) \ - F(MathPowSlow, 2, 1) \ + F(MathPow, 2, 1) \ F(MathPowRT, 2, 1) \ F(RoundNumber, 1, 1) \ F(MathSqrt, 1, 1) \ F(MathFround, 1, 1) \ - F(MathPow, 2, 1) \ F(IsMinusZero, 1, 1) @@ -402,7 +401,7 @@ namespace internal { F(StringToNumber, 1, 1) \ F(StringParseInt, 2, 1) \ F(StringParseFloat, 1, 1) \ - F(NumberToStringRT, 1, 1) \ + F(NumberToString, 1, 1) \ F(NumberToStringSkipCache, 1, 1) \ F(NumberToInteger, 1, 1) \ F(NumberToIntegerMapMinusZero, 1, 1) \ @@ -426,7 +425,6 @@ namespace internal { F(NumberCompare, 3, 1) \ F(SmiLexicographicCompare, 2, 1) \ F(MaxSmi, 0, 1) \ - F(NumberToString, 1, 1) \ F(IsSmi, 1, 1) \ F(IsNonNegativeSmi, 1, 1) \ F(GetRootNaN, 0, 1) @@ -528,7 +526,6 @@ namespace internal { F(StringReplaceGlobalRegExpWithString, 4, 1) \ F(StringSplit, 3, 1) \ F(RegExpExec, 4, 1) \ - F(RegExpConstructResultRT, 3, 1) \ F(RegExpConstructResult, 3, 1) \ F(RegExpInitializeAndCompile, 3, 1) \ F(MaterializeRegExpLiteral, 4, 1) \ @@ -562,7 +559,6 @@ namespace internal { F(DeclareModules, 1, 1) \ F(DeleteLookupSlot, 2, 1) \ F(StoreLookupSlot, 4, 1) \ - F(GetArgumentsProperty, 1, 1) \ F(ArgumentsLength, 0, 1) \ F(Arguments, 1, 1) @@ -610,15 +606,12 @@ namespace internal { F(StringIndexOf, 3, 1) \ F(StringLastIndexOf, 3, 1) \ F(StringLocaleCompare, 2, 1) \ - F(SubStringRT, 3, 1) \ F(SubString, 3, 1) \ - F(StringAddRT, 2, 1) \ F(StringAdd, 2, 1) \ F(InternalizeString, 1, 1) \ F(StringMatch, 3, 1) \ F(StringCharCodeAtRT, 2, 1) \ F(CharFromCode, 1, 1) \ - F(StringCompareRT, 2, 1) \ F(StringCompare, 2, 1) \ F(StringBuilderConcat, 3, 1) \ F(StringBuilderJoin, 3, 1) \ diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc index 4efbc69..20bc660 100644 --- a/src/x64/code-stubs-x64.cc +++ b/src/x64/code-stubs-x64.cc @@ -592,7 +592,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { __ PopReturnAddressTo(rbx); __ Push(rdx); __ PushReturnAddressFrom(rbx); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3275,7 +3275,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // rax: string @@ -3512,7 +3512,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) // tagged as a small integer. __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3810,7 +3810,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc index a9a777e..aba556d 100644 --- a/src/x87/code-stubs-x87.cc +++ b/src/x87/code-stubs-x87.cc @@ -488,7 +488,7 @@ void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { __ pop(ebx); // Return address. __ push(edx); __ push(ebx); - __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1); + __ TailCallRuntime(Runtime::kArguments, 1, 1); } @@ -3045,7 +3045,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { // Just jump to runtime to create the sub string. __ bind(&runtime); - __ TailCallRuntime(Runtime::kSubStringRT, 3, 1); + __ TailCallRuntime(Runtime::kSubString, 3, 1); __ bind(&single_char); // eax: string @@ -3268,7 +3268,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) // tagged as a small integer. __ bind(&runtime); - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } @@ -3552,7 +3552,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { if (equality) { __ TailCallRuntime(Runtime::kStringEquals, 2, 1); } else { - __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1); + __ TailCallRuntime(Runtime::kStringCompare, 2, 1); } __ bind(&miss); diff --git a/test/mjsunit/regress/string-compare-memcmp.js b/test/mjsunit/regress/string-compare-memcmp.js index ae4b33a..45f4734 100644 --- a/test/mjsunit/regress/string-compare-memcmp.js +++ b/test/mjsunit/regress/string-compare-memcmp.js @@ -4,4 +4,4 @@ // Flags: --allow-natives-syntax -assertEquals(-1, %StringCompareRT("abc\u0102", "abc\u0201")); +assertEquals(-1, %StringCompare("abc\u0102", "abc\u0201")); -- 2.7.4