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

Unified Diff: runtime/vm/intrinsifier_arm.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.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 78ab5db9093471948abdda49f72fa5739df37f67..e878d033bdc1b7c73d269f0bc34330f742dae26c 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -1574,38 +1574,6 @@ void Intrinsifier::String_getHashCode(Assembler* assembler) {
}
-void Intrinsifier::StringBaseCodeUnitAt(Assembler* assembler) {
- Label fall_through, try_two_byte_string;
-
- __ ldr(R1, Address(SP, 0 * kWordSize)); // Index.
- __ ldr(R0, Address(SP, 1 * kWordSize)); // String.
- __ tst(R1, Operand(kSmiTagMask));
- __ b(&fall_through, NE); // Index is not a Smi.
- // Range check.
- __ ldr(R2, FieldAddress(R0, String::length_offset()));
- __ cmp(R1, Operand(R2));
- __ b(&fall_through, CS); // Runtime throws exception.
- __ CompareClassId(R0, kOneByteStringCid, R3);
- __ b(&try_two_byte_string, NE);
- __ SmiUntag(R1);
- __ AddImmediate(R0, OneByteString::data_offset() - kHeapObjectTag);
- __ ldrb(R0, Address(R0, R1));
- __ SmiTag(R0);
- __ Ret();
-
- __ Bind(&try_two_byte_string);
- __ CompareClassId(R0, kTwoByteStringCid, R3);
- __ b(&fall_through, NE);
- ASSERT(kSmiTagShift == 1);
- __ AddImmediate(R0, TwoByteString::data_offset() - kHeapObjectTag);
- __ ldrh(R0, Address(R0, R1));
- __ SmiTag(R0);
- __ Ret();
-
- __ Bind(&fall_through);
-}
-
-
void GenerateSubstringMatchesSpecialization(Assembler* assembler,
intptr_t receiver_cid,
intptr_t other_cid,
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698