[vmkit-commits] [vmkit] r140791 - in /vmkit/trunk/lib/J3/Compiler: JavaAOTCompiler.cpp JavaLLVMCompiler.cpp LLVMInfo.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu Sep 29 10:20:03 PDT 2011
Author: geoffray
Date: Thu Sep 29 12:20:03 2011
New Revision: 140791
URL: http://llvm.org/viewvc/llvm-project?rev=140791&view=rev
Log:
Do not customize when not precompiling, and don't create a llvm Function if a method is abstract.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
Modified: vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp?rev=140791&r1=140790&r2=140791&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp Thu Sep 29 12:20:03 2011
@@ -1053,6 +1053,7 @@
if (getMethodInfo(&method)->methodFunction == NULL) {
MethodElts.push_back(Constant::getNullValue(JavaIntrinsics.ptrType));
} else {
+ assert(!isAbstract(method.access));
Function* func = getMethod(&method, NULL);
MethodElts.push_back(ConstantExpr::getCast(Instruction::BitCast, func,
JavaIntrinsics.ptrType));
@@ -1604,7 +1605,7 @@
}
} else {
// We're not precompiling, get the method.
- return getMethod(meth, customizeFor);
+ return getMethod(meth, NULL);
}
}
@@ -2189,7 +2190,9 @@
cl->setOwnerClass(JavaThread::get());
for (uint32 i = 0; i < cl->nbVirtualMethods; ++i) {
- M->getMethod(&cl->virtualMethods[i], NULL);
+ if (!isAbstract(cl->virtualMethods[i].access)) {
+ M->getMethod(&cl->virtualMethods[i], NULL);
+ }
}
for (uint32 i = 0; i < cl->nbStaticMethods; ++i) {
@@ -2222,13 +2225,11 @@
}
for (uint32 i = 0; i < cl->nbStaticMethods; ++i) {
- if (!isAbstract(cl->staticMethods[i].access)) {
- Function* F = M->getMethod(&cl->staticMethods[i], NULL);
- M->setMethod(F, ptr, F->getName().data());
- cl->staticMethods[i].compiledPtr();
- // Set native so that we don't try to inline it.
- cl->staticMethods[i].setNative();
- }
+ Function* F = M->getMethod(&cl->staticMethods[i], NULL);
+ M->setMethod(F, ptr, F->getName().data());
+ cl->staticMethods[i].compiledPtr();
+ // Set native so that we don't try to inline it.
+ cl->staticMethods[i].setNative();
}
}
}
Modified: vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp?rev=140791&r1=140790&r2=140791&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp Thu Sep 29 12:20:03 2011
@@ -53,6 +53,7 @@
}
Function* JavaLLVMCompiler::parseFunction(JavaMethod* meth, Class* customizeFor) {
+ assert(!isAbstract(meth->access));
LLVMMethodInfo* LMI = getMethodInfo(meth);
Function* func = LMI->getMethod(customizeFor);
Modified: vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp?rev=140791&r1=140790&r2=140791&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp Thu Sep 29 12:20:03 2011
@@ -167,6 +167,7 @@
}
Function* LLVMMethodInfo::getMethod(Class* customizeFor) {
+ assert(!isAbstract(methodDef->access));
bool customizing = false;
Function* result = NULL;
if (customizeFor != NULL && isCustomizable) {
More information about the vmkit-commits
mailing list