[vmkit-commits] [vmkit] r140473 - in /vmkit/trunk/lib/J3/Compiler: JavaAOTCompiler.cpp LLVMInfo.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Sep 25 13:06:36 PDT 2011
Author: geoffray
Date: Sun Sep 25 15:06:36 2011
New Revision: 140473
URL: http://llvm.org/viewvc/llvm-project?rev=140473&view=rev
Log:
Cleanup and fix bug where the code pointer of methods was not set because of old method.code check.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.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=140473&r1=140472&r2=140473&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp Sun Sep 25 15:06:36 2011
@@ -1050,7 +1050,7 @@
MethodElts.push_back(ConstantInt::get(Type::getInt8Ty(getLLVMContext()), method.canBeInlined));
// code
- if (method.code == NULL) {
+ if (getMethodInfo(&method)->methodFunction == NULL) {
MethodElts.push_back(Constant::getNullValue(JavaIntrinsics.ptrType));
} else {
Function* func = getMethod(&method);
@@ -2343,6 +2343,8 @@
while (!toCompile.empty()) {
JavaMethod* meth = toCompile.back();
+ // parseFunction may introduce new functions to compile, so
+ // pop toCompile before calling parseFunction.
toCompile.pop_back();
parseFunction(meth);
}
Modified: vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp?rev=140473&r1=140472&r2=140473&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LLVMInfo.cpp Sun Sep 25 15:06:36 2011
@@ -142,8 +142,6 @@
Function* LLVMMethodInfo::getMethod() {
if (!methodFunction) {
- mvm::ThreadAllocator allocator;
- JnjvmClassLoader* JCL = methodDef->classDef->classLoader;
if (Compiler->emitFunctionName() || JITEmitDebugInfo) {
const UTF8* jniConsClName = methodDef->classDef->name;
const UTF8* jniConsName = methodDef->name;
@@ -152,15 +150,10 @@
sint32 mnlen = jniConsName->size;
sint32 mtlen = jniConsType->size;
+ mvm::ThreadAllocator allocator;
char* buf = (char*)allocator.Allocate(
3 + JNI_NAME_PRE_LEN + 1 + ((mnlen + clen + mtlen) << 3));
- bool j3 = false;
- if (isNative(methodDef->access)) {
- // Verify if it's defined by J3
- JCL->nativeLookup(methodDef, j3, buf);
- }
-
methodDef->jniConsFromMethOverloaded(buf + 1);
memcpy(buf, "JnJVM", 5);
More information about the vmkit-commits
mailing list