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

Unified Diff: src/x64/code-stubs-x64.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/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 5bfa347a320820a8fae7a75c41d1bb635a371ca6..7dbac5d125e97a6f9888c21622f7ce4e6b2ecf29 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2817,45 +2817,6 @@ void StringHelper::GenerateOneByteCharsCompareLoop(
}
-void StringCompareStub::Generate(MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- rdx : left string
- // -- rax : right string
- // -- rsp[0] : return address
- // -----------------------------------
- __ AssertString(rdx);
- __ AssertString(rax);
-
- // Check for identity.
- Label not_same;
- __ cmpp(rdx, rax);
- __ j(not_equal, &not_same, Label::kNear);
- __ Move(rax, Smi::FromInt(EQUAL));
- __ IncrementCounter(isolate()->counters()->string_compare_native(), 1);
- __ Ret();
-
- __ bind(&not_same);
-
- // Check that both are sequential one-byte strings.
- Label runtime;
- __ JumpIfNotBothSequentialOneByteStrings(rdx, rax, rcx, rbx, &runtime);
-
- // Inline comparison of one-byte strings.
- __ IncrementCounter(isolate()->counters()->string_compare_native(), 1);
- StringHelper::GenerateCompareFlatOneByteStrings(masm, rdx, rax, rcx, rbx, rdi,
- r8);
-
- // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
- // tagged as a small integer.
- __ bind(&runtime);
- __ PopReturnAddressTo(rcx);
- __ Push(rdx);
- __ Push(rax);
- __ PushReturnAddressFrom(rcx);
- __ TailCallRuntime(Runtime::kStringCompare);
-}
-
-
void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- rdx : left

Powered by Google App Engine
This is Rietveld 408576698