[vmkit-commits] [vmkit] r57323 - /vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu Oct 9 02:50:41 PDT 2008
Author: geoffray
Date: Thu Oct 9 04:50:39 2008
New Revision: 57323
URL: http://llvm.org/viewvc/llvm-project?rev=57323&view=rev
Log:
Equality of UTF8 can only be made by looking at the contents. Class loaders
may define UTF8s on their own.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h?rev=57323&r1=57322&r2=57323&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h Thu Oct 9 04:50:39 2008
@@ -147,20 +147,9 @@
/// of this.
const UTF8* extract(UTF8Map* map, uint32 start, uint32 len) const;
- /// equals - Returns whether two UTF8s are equals. When the JnJVM executes
- /// in single mode, equality is just a pointer comparison. When executing
- /// in multiple mode, we compare the contents of the UTF8s.
-#if defined(ISOLATE) || defined(ISOLATE_SHARING)
bool equals(const UTF8* other) const {
- return this == other;
- }
-
- bool lessThan(const UTF8* other) const {
- return this < other;
- }
-#else
- bool equals(const UTF8* other) const {
- if (size != other->size) return false;
+ if (other == this) return true;
+ else if (size != other->size) return false;
else return !memcmp(elements, other->elements, size * sizeof(uint16));
}
@@ -170,7 +159,6 @@
else return memcmp((const char*)elements, (const char*)other->elements,
size * sizeof(uint16)) < 0;
}
-#endif
/// print - Prints the UTF8 for debugging purposes.
virtual void print(mvm::PrintBuffer* buf) const;
More information about the vmkit-commits
mailing list