Index: src/x87/code-stubs-x87.cc |
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc |
index 8f28607491a2413dc22fd2e1b989a2c4fe546eee..4aa993f54fc73e715656fb36af0a35c926aafcc7 100644 |
--- a/src/x87/code-stubs-x87.cc |
+++ b/src/x87/code-stubs-x87.cc |
@@ -1437,18 +1437,10 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) { |
// Inline comparison of ASCII strings. |
if (cc == equal) { |
- StringCompareStub::GenerateFlatAsciiStringEquals(masm, |
- edx, |
- eax, |
- ecx, |
- ebx); |
+ StringHelper::GenerateFlatAsciiStringEquals(masm, edx, eax, ecx, ebx); |
} else { |
- StringCompareStub::GenerateCompareFlatAsciiStrings(masm, |
- edx, |
- eax, |
- ecx, |
- ebx, |
- edi); |
+ StringHelper::GenerateCompareFlatAsciiStrings(masm, edx, eax, ecx, ebx, |
+ edi); |
} |
#ifdef DEBUG |
__ Abort(kUnexpectedFallThroughFromStringComparison); |
@@ -2871,11 +2863,10 @@ void SubStringStub::Generate(MacroAssembler* masm) { |
} |
-void StringCompareStub::GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
- Register left, |
- Register right, |
- Register scratch1, |
- Register scratch2) { |
+void StringHelper::GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
+ Register left, Register right, |
+ Register scratch1, |
+ Register scratch2) { |
Register length = scratch1; |
// Compare lengths. |
@@ -2907,12 +2898,9 @@ void StringCompareStub::GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
} |
-void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
- Register left, |
- Register right, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3) { |
+void StringHelper::GenerateCompareFlatAsciiStrings( |
+ MacroAssembler* masm, Register left, Register right, Register scratch1, |
+ Register scratch2, Register scratch3) { |
Counters* counters = masm->isolate()->counters(); |
__ IncrementCounter(counters->string_compare_native(), 1); |
@@ -2973,13 +2961,9 @@ void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
} |
-void StringCompareStub::GenerateAsciiCharsCompareLoop( |
- MacroAssembler* masm, |
- Register left, |
- Register right, |
- Register length, |
- Register scratch, |
- Label* chars_not_equal, |
+void StringHelper::GenerateAsciiCharsCompareLoop( |
+ MacroAssembler* masm, Register left, Register right, Register length, |
+ Register scratch, Label* chars_not_equal, |
Label::Distance chars_not_equal_near) { |
// Change index to run from -length to -1 by adding length to string |
// start. This means that loop ends when index reaches zero, which |
@@ -3033,7 +3017,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { |
__ pop(ecx); |
__ add(esp, Immediate(2 * kPointerSize)); |
__ push(ecx); |
- GenerateCompareFlatAsciiStrings(masm, edx, eax, ecx, ebx, edi); |
+ StringHelper::GenerateCompareFlatAsciiStrings(masm, edx, eax, ecx, ebx, edi); |
// Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
// tagged as a small integer. |
@@ -3306,11 +3290,10 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) { |
// Compare flat ASCII strings. Returns when done. |
if (equality) { |
- StringCompareStub::GenerateFlatAsciiStringEquals( |
- masm, left, right, tmp1, tmp2); |
+ StringHelper::GenerateFlatAsciiStringEquals(masm, left, right, tmp1, tmp2); |
} else { |
- StringCompareStub::GenerateCompareFlatAsciiStrings( |
- masm, left, right, tmp1, tmp2, tmp3); |
+ StringHelper::GenerateCompareFlatAsciiStrings(masm, left, right, tmp1, tmp2, |
+ tmp3); |
} |
// Handle more complex cases in runtime. |