[vmkit-commits] [vmkit] r61640 - /vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Jan 4 14:06:08 PST 2009
Author: geoffray
Date: Sun Jan 4 16:06:08 2009
New Revision: 61640
URL: http://llvm.org/viewvc/llvm-project?rev=61640&view=rev
Log:
Bugfix for allocated arrays.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=61640&r1=61639&r2=61640&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Sun Jan 4 16:06:08 2009
@@ -1689,7 +1689,11 @@
if (cl && (!cl->isClass() || cl->asClass()->isResolved())) {
if (alreadyResolved) *alreadyResolved = cl;
node = module->getNativeClass(cl);
- if (module->isStaticCompiling() && cl->isArray()) {
+ // Since we only allocate for array classes that we own and
+ // ony primitive arrays are already allocated, verify that the class
+ // array is not external.
+ if (module->isStaticCompiling() && cl->isArray() &&
+ node->getType() != module->JavaClassArrayType) {
node = new LoadInst(node, "", currentBlock);
}
if (node->getType() != module->JavaCommonClassType) {
More information about the vmkit-commits
mailing list