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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index a1851a6e37a62217b00ff9bc4c98733d7714f02c..311fa3b9b90e150e30ae4bf15b49e082fb89c85d 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -1509,6 +1509,19 @@ bool Intrinsifier::FixedSizeArrayIterator_hasNext(Assembler* assembler) {
}
+bool Intrinsifier::String_getHashCode(Assembler* assembler) {
+ Label fall_through;
+ __ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object.
+ __ movq(RAX, FieldAddress(RAX, String::hash_offset()));
+ __ cmpq(RAX, Immediate(0));
+ __ j(EQUAL, &fall_through, Assembler::kNearJump);
+ __ ret();
+ __ Bind(&fall_through);
+ // Hash not yet computed.
+ return false;
+}
+
+
bool Intrinsifier::String_getLength(Assembler* assembler) {
__ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object.
__ movq(RAX, FieldAddress(RAX, String::length_offset()));
@@ -1539,19 +1552,6 @@ bool Intrinsifier::String_charCodeAt(Assembler* assembler) {
}
-bool Intrinsifier::String_hashCode(Assembler* assembler) {
- Label fall_through;
- __ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object.
- __ movq(RAX, FieldAddress(RAX, String::hash_offset()));
- __ cmpq(RAX, Immediate(0));
- __ j(EQUAL, &fall_through, Assembler::kNearJump);
- __ ret();
- __ Bind(&fall_through);
- // Hash not yet computed.
- return false;
-}
-
-
bool Intrinsifier::String_isEmpty(Assembler* assembler) {
Label is_true;
const Bool& bool_true = Bool::ZoneHandle(Bool::True());

Powered by Google App Engine
This is Rietveld 408576698