Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 1765823002: [compiler] Introduce code stubs for string relational comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index bac3c1e0df21a624b99affa2b1cbb94fbc0652b3..b9df93364fdafbb0e8e8193f76ada0d0035dda0f 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -2864,44 +2864,6 @@ void StringHelper::GenerateOneByteCharsCompareLoop(
}
-void StringCompareStub::Generate(MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- edx : left string
- // -- eax : right string
- // -- esp[0] : return address
- // -----------------------------------
- __ AssertString(edx);
- __ AssertString(eax);
-
- Label not_same;
- __ cmp(edx, eax);
- __ j(not_equal, &not_same, Label::kNear);
- __ Move(eax, Immediate(Smi::FromInt(EQUAL)));
- __ IncrementCounter(isolate()->counters()->string_compare_native(), 1);
- __ Ret();
-
- __ bind(&not_same);
-
- // Check that both objects are sequential one-byte strings.
- Label runtime;
- __ JumpIfNotBothSequentialOneByteStrings(edx, eax, ecx, ebx, &runtime);
-
- // Compare flat one-byte strings.
- __ IncrementCounter(isolate()->counters()->string_compare_native(), 1);
- StringHelper::GenerateCompareFlatOneByteStrings(masm, edx, eax, ecx, ebx,
- edi);
-
- // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
- // tagged as a small integer.
- __ bind(&runtime);
- __ PopReturnAddressTo(ecx);
- __ Push(edx);
- __ Push(eax);
- __ PushReturnAddressFrom(ecx);
- __ TailCallRuntime(Runtime::kStringCompare);
-}
-
-
void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- edx : left

Powered by Google App Engine
This is Rietveld 408576698