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

Unified Diff: runtime/vm/intrinsifier_arm64.cc

Issue 2912863006: Inline instance object hash code into object header on 64 bit. (Closed)
Patch Set: Add assembler tests and other feedback from Ryan Created 3 years, 6 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/intermediate_language_dbc.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_arm64.cc
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index 80d51eb3e4c0c564710339473e61c281d61f3275..3c5f4f6c341544c753153f0fa936edda62308192 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -1832,6 +1832,23 @@ void Intrinsifier::String_getHashCode(Assembler* assembler) {
}
+void Intrinsifier::Object_getHash(Assembler* assembler) {
+ __ ldr(R0, Address(SP, 0 * kWordSize));
+ __ ldr(R0, FieldAddress(R0, String::hash_offset()), kUnsignedWord);
+ __ SmiTag(R0);
+ __ ret();
+}
+
+
+void Intrinsifier::Object_setHash(Assembler* assembler) {
+ __ ldr(R0, Address(SP, 1 * kWordSize)); // Object.
+ __ ldr(R1, Address(SP, 0 * kWordSize)); // Value.
+ __ SmiUntag(R1);
+ __ str(R1, FieldAddress(R0, String::hash_offset()), kUnsignedWord);
+ __ ret();
+}
+
+
void GenerateSubstringMatchesSpecialization(Assembler* assembler,
intptr_t receiver_cid,
intptr_t other_cid,
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698