[llvm-commits] [vmkit] r50605 - /vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat May 3 08:16:59 PDT 2008
Author: geoffray
Date: Sat May 3 10:16:58 2008
New Revision: 50605
URL: http://llvm.org/viewvc/llvm-project?rev=50605&view=rev
Log:
Compare the primitive type of the base classes. If they are not equal, throw
an ArrayStoreException.
Modified:
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp
Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp?rev=50605&r1=50604&r2=50605&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp Sat May 3 10:16:58 2008
@@ -48,9 +48,11 @@
ClassArray* ts = (ClassArray*)src->classOf;
ClassArray* td = (ClassArray*)dst->classOf;
- AssessorDesc* srcFuncs = ts->funcs();
- AssessorDesc* dstFuncs = ts->funcs();
CommonClass* dstType = td->baseClass();
+ CommonClass* srcType = ts->baseClass();
+ AssessorDesc* srcPrim = AssessorDesc::bogusClassToPrimitive(srcType);
+ AssessorDesc* dstPrim = AssessorDesc::bogusClassToPrimitive(dstType);
+ AssessorDesc* srcFuncs = ts->funcs();
if (len > src->size) {
vm->indexOutOfBounds(src, len);
@@ -66,7 +68,7 @@
vm->indexOutOfBounds(src, sstart);
} else if (len < 0) {
vm->indexOutOfBounds(src, len);
- } else if (srcFuncs != dstFuncs) {
+ } else if (srcPrim != dstPrim) {
vm->arrayStoreException();
}
More information about the llvm-commits
mailing list