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

Unified Diff: runtime/vm/intrinsifier_ia32.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_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index a6056ac3d0cc3caa380cf0113c22d9a3f04c77c7..7efac5107d0fc72481b4b34d070fbf3e8838c016 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -1606,6 +1606,19 @@ bool Intrinsifier::FixedSizeArrayIterator_hasNext(Assembler* assembler) {
}
+bool Intrinsifier::String_getHashCode(Assembler* assembler) {
+ Label fall_through;
+ __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object.
+ __ movl(EAX, FieldAddress(EAX, String::hash_offset()));
+ __ cmpl(EAX, Immediate(0));
+ __ j(EQUAL, &fall_through, Assembler::kNearJump);
+ __ ret();
+ __ Bind(&fall_through);
+ // Hash not yet computed.
+ return false;
+}
+
+
bool Intrinsifier::String_getLength(Assembler* assembler) {
__ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object.
__ movl(EAX, FieldAddress(EAX, String::length_offset()));
@@ -1636,19 +1649,6 @@ bool Intrinsifier::String_charCodeAt(Assembler* assembler) {
}
-bool Intrinsifier::String_hashCode(Assembler* assembler) {
- Label fall_through;
- __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object.
- __ movl(EAX, FieldAddress(EAX, String::hash_offset()));
- __ cmpl(EAX, 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