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

Unified Diff: runtime/vm/intrinsifier_mips.cc

Issue 1961393002: VM: Optimized code for all of [External]{One|Two}ByteString::codeUnitAt. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comment Created 4 years, 7 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
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_mips.cc
diff --git a/runtime/vm/intrinsifier_mips.cc b/runtime/vm/intrinsifier_mips.cc
index e98fc1da012789c09a15dba1cce0714c6b3a7b4b..2398a7b957d512cc3a278c788e4733e2fa33f164 100644
--- a/runtime/vm/intrinsifier_mips.cc
+++ b/runtime/vm/intrinsifier_mips.cc
@@ -1682,41 +1682,6 @@ void Intrinsifier::String_getHashCode(Assembler* assembler) {
}
-void Intrinsifier::StringBaseCodeUnitAt(Assembler* assembler) {
- Label fall_through, try_two_byte_string;
-
- __ lw(T1, Address(SP, 0 * kWordSize)); // Index.
- __ lw(T0, Address(SP, 1 * kWordSize)); // String.
-
- // Checks.
- __ andi(CMPRES1, T1, Immediate(kSmiTagMask));
- __ bne(CMPRES1, ZR, &fall_through); // Index is not a Smi.
- __ lw(T2, FieldAddress(T0, String::length_offset())); // Range check.
- // Runtime throws exception.
- __ BranchUnsignedGreaterEqual(T1, T2, &fall_through);
- __ LoadClassId(CMPRES1, T0); // Class ID check.
- __ BranchNotEqual(
- CMPRES1, Immediate(kOneByteStringCid), &try_two_byte_string);
-
- // Grab byte and return.
- __ SmiUntag(T1);
- __ addu(T2, T0, T1);
- __ lbu(V0, FieldAddress(T2, OneByteString::data_offset()));
- __ Ret();
- __ delay_slot()->SmiTag(V0);
-
- __ Bind(&try_two_byte_string);
- __ BranchNotEqual(CMPRES1, Immediate(kTwoByteStringCid), &fall_through);
- ASSERT(kSmiTagShift == 1);
- __ addu(T2, T0, T1);
- __ lhu(V0, FieldAddress(T2, TwoByteString::data_offset()));
- __ Ret();
- __ delay_slot()->SmiTag(V0);
-
- __ Bind(&fall_through);
-}
-
-
void GenerateSubstringMatchesSpecialization(Assembler* assembler,
intptr_t receiver_cid,
intptr_t other_cid,
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698