[llvm-commits] [vmkit] r52715 - in /vmkit/trunk: ./ autoconf/ include/ lib/ lib/JnJVM/Classpath/ lib/JnJVM/VMCore/ lib/Mvm/ lib/N3/VMCore/ tools/
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed Jun 25 05:06:16 PDT 2008
Author: geoffray
Date: Wed Jun 25 07:06:15 2008
New Revision: 52715
URL: http://llvm.org/viewvc/llvm-project?rev=52715&view=rev
Log:
Remove warnings on macro and pointer-to-function casts.
Modified:
vmkit/trunk/Makefile.config.in
vmkit/trunk/autoconf/configure.ac
vmkit/trunk/configure
vmkit/trunk/include/debug.h
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h
vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp
vmkit/trunk/lib/Makefile
vmkit/trunk/lib/Mvm/CommandLine.cpp
vmkit/trunk/lib/N3/VMCore/CLIJit.cpp
vmkit/trunk/lib/N3/VMCore/Opcodes.cpp
vmkit/trunk/lib/N3/VMCore/PNetLib.cpp
vmkit/trunk/lib/N3/VMCore/VMClass.cpp
vmkit/trunk/tools/Makefile
Modified: vmkit/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/Makefile.config.in (original)
+++ vmkit/trunk/Makefile.config.in Wed Jun 25 07:06:15 2008
@@ -1 +1,3 @@
GCLIB = @GC_LIBS@
+WITH_N3 = @WITH_N3@
+WITH_JNJVM = @WITH_JNJVM@
Modified: vmkit/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/autoconf/configure.ac (original)
+++ vmkit/trunk/autoconf/configure.ac Wed Jun 25 07:06:15 2008
@@ -256,16 +256,22 @@
[[gnuclasspathinstallationprefix=/usr/local/classpath]]
)
-if test "x${gnuclasspathlocalprefix}" = x; then
+WITH_JNJVM=0;
+
+if test "x${gnuclasspathinstallationprefix}" != x; then
echo Using ${gnuclasspathinstallationprefix} as GNU CLASSPATH installation prefix;
classpathglibj=${gnuclasspathinstallationprefix}/share/classpath/glibj.zip;
classpathlibs=${gnuclasspathinstallationprefix}/lib/classpath/;
classpathinclude=${gnuclasspathlocalprefix}/include;
-else
+ WITH_JNJVM=1;
+fi
+
+if test "x${gnuclasspathlocalprefix}" != x; then
echo Using ${gnuclasspathlocalprefix} as GNU CLASSPATH local prefix;
classpathglibj=${gnuclasspathlocalprefix}/lib/;
classpathlibs=${gnuclasspathlocalprefix}/lib/;
classpathinclude=${gnuclasspathlocalprefix}/include;
+ WITH_JNJVM=1;
fi
@@ -273,6 +279,7 @@
AC_SUBST([classpathlibs])
AC_SUBST([classpathinclude])
AC_SUBST([gnuclasspathversion])
+AC_SUBST([WITH_JNJVM])
dnl **************************************************************************
dnl Local PNet directory
@@ -286,13 +293,15 @@
]]
)
-AM_CONDITIONAL([WITH_N3], [test "x$pnetlocalprefix" != "x"])
if test "x$pnetlocalprefix" != x; then
echo Using ${pnetlocalprefix} as PNET local prefix;
- AC_DEFINE([WITH_N3], [1], [Compiling N3])
+ WITH_N3=1;
+else
+ WITH_N3=0;
fi
AC_SUBST([pnetlocalprefix])
+AC_SUBST([WITH_N3])
dnl===-----------------------------------------------------------------------===
dnl===
Modified: vmkit/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/configure (original)
+++ vmkit/trunk/configure Wed Jun 25 07:06:15 2008
@@ -695,9 +695,9 @@
classpathlibs
classpathinclude
gnuclasspathversion
-WITH_N3_TRUE
-WITH_N3_FALSE
+WITH_JNJVM
pnetlocalprefix
+WITH_N3
CXX
CXXFLAGS
ac_ct_CXX
@@ -3988,16 +3988,22 @@
fi
-if test "x${gnuclasspathlocalprefix}" = x; then
+WITH_JNJVM=0;
+
+if test "x${gnuclasspathinstallationprefix}" != x; then
echo Using ${gnuclasspathinstallationprefix} as GNU CLASSPATH installation prefix;
classpathglibj=${gnuclasspathinstallationprefix}/share/classpath/glibj.zip;
classpathlibs=${gnuclasspathinstallationprefix}/lib/classpath/;
classpathinclude=${gnuclasspathlocalprefix}/include;
-else
+ WITH_JNJVM=1;
+fi
+
+if test "x${gnuclasspathlocalprefix}" != x; then
echo Using ${gnuclasspathlocalprefix} as GNU CLASSPATH local prefix;
classpathglibj=${gnuclasspathlocalprefix}/lib/;
classpathlibs=${gnuclasspathlocalprefix}/lib/;
classpathinclude=${gnuclasspathlocalprefix}/include;
+ WITH_JNJVM=1;
fi
@@ -4007,6 +4013,7 @@
+
# Check whether --with-pnet-local-prefix was given.
if test "${with_pnet_local_prefix+set}" = set; then
withval=$with_pnet_local_prefix; pnetlocalprefix=$withval
@@ -4018,28 +4025,17 @@
fi
-
-
-if test "x$pnetlocalprefix" != "x"; then
- WITH_N3_TRUE=
- WITH_N3_FALSE='#'
-else
- WITH_N3_TRUE='#'
- WITH_N3_FALSE=
-fi
-
if test "x$pnetlocalprefix" != x; then
echo Using ${pnetlocalprefix} as PNET local prefix;
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_N3 1
-_ACEOF
-
+ WITH_N3=1;
+else
+ WITH_N3=0;
fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7220,13 +7216,6 @@
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${WITH_N3_TRUE}" && test -z "${WITH_N3_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"WITH_N3\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"WITH_N3\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -7839,9 +7828,9 @@
classpathlibs!$classpathlibs$ac_delim
classpathinclude!$classpathinclude$ac_delim
gnuclasspathversion!$gnuclasspathversion$ac_delim
-WITH_N3_TRUE!$WITH_N3_TRUE$ac_delim
-WITH_N3_FALSE!$WITH_N3_FALSE$ac_delim
+WITH_JNJVM!$WITH_JNJVM$ac_delim
pnetlocalprefix!$pnetlocalprefix$ac_delim
+WITH_N3!$WITH_N3$ac_delim
CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
ac_ct_CXX!$ac_ct_CXX$ac_delim
Modified: vmkit/trunk/include/debug.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/debug.h?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/include/debug.h (original)
+++ vmkit/trunk/include/debug.h Wed Jun 25 07:06:15 2008
@@ -63,7 +63,7 @@
#endif
#else
-#define PRINT_DEBUG(symb, level, color, fmt, args...)
+#define PRINT_DEBUG(symb, level, color, fmt, args...) do {} while(0);
#endif
Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc Wed Jun 25 07:06:15 2008
@@ -78,7 +78,7 @@
void* res = dlopen(buf, RTLD_LAZY | RTLD_LOCAL);
if (res != 0) {
vm->nativeLibs.push_back(res);
- onLoad_t onLoad = (onLoad_t)dlsym(res, "JNI_OnLoad");
+ onLoad_t onLoad = (onLoad_t)(intptr_t)dlsym(res, "JNI_OnLoad");
if (onLoad) onLoad(&vm->javavmEnv, 0);
return 1;
} else {
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Wed Jun 25 07:06:15 2008
@@ -833,24 +833,6 @@
func->setLinkage(GlobalValue::ExternalLinkage);
-
- if (compilingMethod->name ==
- compilingClass->isolate->asciizConstructUTF8("main")) {
- llvmFunction->print(llvm::cout);
- printf("\n");
- void* res = mvm::jit::executionEngine->getPointerToGlobal(llvmFunction);
- void* base = res;
- while (base < (void*)((char*)res + 100)) {
- printf("%08x\t", (unsigned)base);
- int n= mvm::jit::disassemble((unsigned int *)base);
- printf("\n");
- base= ((void *)((char *)base + n));
- }
- printf("\n");
- fflush(stdout);
- }
-
-
PRINT_DEBUG(JNJVM_COMPILE, 1, COLOR_NORMAL, "--> end compiling %s\n",
compilingMethod->printString());
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp Wed Jun 25 07:06:15 2008
@@ -106,9 +106,9 @@
PRINT_DEBUG(JNJVM_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
bytecodes[i]);
- PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "compiling ");
- PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]]);
- PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "\n");
+ PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "compiling ", 0);
+ PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]], 0);
+ PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "\n", 0);
Opinfo* opinfo = &(opcodeInfos[i]);
if (opinfo->newBlock) {
@@ -2142,9 +2142,9 @@
PRINT_DEBUG(JNJVM_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
bytecodes[i]);
- PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "exploring ");
- PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]]);
- PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "\n");
+ PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "exploring ",0);
+ PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]], 0);
+ PRINT_DEBUG(JNJVM_COMPILE, 1, LIGHT_BLUE, "\n", 0);
switch (bytecodes[i]) {
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Wed Jun 25 07:06:15 2008
@@ -512,7 +512,7 @@
}
-void* Signdef::staticCallBuf() {
+intptr_t Signdef::staticCallBuf() {
if (!_staticCallBuf) {
LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this);
LSI->getStaticBuf();
@@ -520,7 +520,7 @@
return _staticCallBuf;
}
-void* Signdef::virtualCallBuf() {
+intptr_t Signdef::virtualCallBuf() {
if (!_virtualCallBuf) {
LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this);
LSI->getVirtualBuf();
@@ -528,7 +528,7 @@
return _virtualCallBuf;
}
-void* Signdef::staticCallAP() {
+intptr_t Signdef::staticCallAP() {
if (!_staticCallAP) {
LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this);
LSI->getStaticAP();
@@ -536,7 +536,7 @@
return _staticCallAP;
}
-void* Signdef::virtualCallAP() {
+intptr_t Signdef::virtualCallAP() {
if (!_virtualCallAP) {
LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this);
LSI->getVirtualAP();
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h Wed Jun 25 07:06:15 2008
@@ -141,15 +141,15 @@
class Signdef : public Typedef {
private:
- mvm::Code* _staticCallBuf;
- mvm::Code* _virtualCallBuf;
- mvm::Code* _staticCallAP;
- mvm::Code* _virtualCallAP;
-
- void* staticCallBuf();
- void* virtualCallBuf();
- void* staticCallAP();
- void* virtualCallAP();
+ intptr_t _staticCallBuf;
+ intptr_t _virtualCallBuf;
+ intptr_t _staticCallAP;
+ intptr_t _virtualCallAP;
+
+ intptr_t staticCallBuf();
+ intptr_t virtualCallBuf();
+ intptr_t staticCallAP();
+ intptr_t virtualCallAP();
public:
std::vector<Typedef*> args;
@@ -161,39 +161,39 @@
static Signdef* signDup(const UTF8* name, Jnjvm* vm);
- void* getStaticCallBuf() {
+ intptr_t getStaticCallBuf() {
if(!_staticCallBuf) return staticCallBuf();
return _staticCallBuf;
}
- void* getVirtualCallBuf() {
+ intptr_t getVirtualCallBuf() {
if(!_virtualCallBuf) return virtualCallBuf();
return _virtualCallBuf;
}
- void* getStaticCallAP() {
+ intptr_t getStaticCallAP() {
if (!_staticCallAP) return staticCallAP();
return _staticCallAP;
}
- void* getVirtualCallAP() {
+ intptr_t getVirtualCallAP() {
if (!_virtualCallAP) return virtualCallAP();
return _virtualCallAP;
}
- void setStaticCallBuf(mvm::Code* code) {
+ void setStaticCallBuf(intptr_t code) {
_staticCallBuf = code;
}
- void setVirtualCallBuf(mvm::Code* code) {
+ void setVirtualCallBuf(intptr_t code) {
_virtualCallBuf = code;
}
- void setStaticCallAP(mvm::Code* code) {
+ void setStaticCallAP(intptr_t code) {
_staticCallAP = code;
}
- void setVirtualCallAP(mvm::Code* code) {
+ void setVirtualCallAP(intptr_t code) {
_virtualCallAP = code;
}
Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Wed Jun 25 07:06:15 2008
@@ -245,8 +245,8 @@
void Jnjvm::readClass(Class* cl) {
- PRINT_DEBUG(JNJVM_LOAD, 0, COLOR_NORMAL, "; ");
- PRINT_DEBUG(JNJVM_LOAD, 0, LIGHT_GREEN, "reading ");
+ PRINT_DEBUG(JNJVM_LOAD, 0, COLOR_NORMAL, "; ", 0);
+ PRINT_DEBUG(JNJVM_LOAD, 0, LIGHT_GREEN, "reading ", 0);
PRINT_DEBUG(JNJVM_LOAD, 0, COLOR_NORMAL, "%s::%s\n", printString(),
cl->printString());
@@ -326,8 +326,8 @@
JavaMethod* meth = cl->lookupMethodDontThrow(clinitName, clinitType, true,
false);
- PRINT_DEBUG(JNJVM_LOAD, 0, COLOR_NORMAL, "; ");
- PRINT_DEBUG(JNJVM_LOAD, 0, LIGHT_GREEN, "clinit ");
+ PRINT_DEBUG(JNJVM_LOAD, 0, COLOR_NORMAL, "; ", 0);
+ PRINT_DEBUG(JNJVM_LOAD, 0, LIGHT_GREEN, "clinit ", 0);
PRINT_DEBUG(JNJVM_LOAD, 0, COLOR_NORMAL, "%s::%s\n", printString(),
cl->printString());
@@ -336,7 +336,7 @@
if (meth) {
JavaObject* exc = 0;
try{
- clinit_t pred = (clinit_t)meth->compiledPtr();
+ clinit_t pred = (clinit_t)(intptr_t)meth->compiledPtr();
pred(JavaThread::get()->isolate);
} catch(...) {
exc = JavaThread::getJavaException();
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Wed Jun 25 07:06:15 2008
@@ -803,7 +803,7 @@
// Lock here because we are called by arbitrary code
llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
virtualBufFunction = createFunctionCallBuf(true);
- signature->setVirtualCallBuf((mvm::Code*)
+ signature->setVirtualCallBuf((intptr_t)
mvm::jit::executionEngine->getPointerToGlobal(virtualBufFunction));
}
return virtualBufFunction;
@@ -814,7 +814,7 @@
// Lock here because we are called by arbitrary code
llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
virtualAPFunction = createFunctionCallAP(true);
- signature->setVirtualCallAP((mvm::Code*)
+ signature->setVirtualCallAP((intptr_t)
mvm::jit::executionEngine->getPointerToGlobal(virtualAPFunction));
}
return virtualAPFunction;
@@ -825,7 +825,7 @@
// Lock here because we are called by arbitrary code
llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
staticBufFunction = createFunctionCallBuf(false);
- signature->setStaticCallBuf((mvm::Code*)
+ signature->setStaticCallBuf((intptr_t)
mvm::jit::executionEngine->getPointerToGlobal(staticBufFunction));
}
return staticBufFunction;
@@ -836,7 +836,7 @@
// Lock here because we are called by arbitrary code
llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
staticAPFunction = createFunctionCallAP(false);
- signature->setStaticCallAP((mvm::Code*)
+ signature->setStaticCallAP((intptr_t)
mvm::jit::executionEngine->getPointerToGlobal(staticAPFunction));
}
return staticAPFunction;
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Wed Jun 25 07:06:15 2008
@@ -110,6 +110,25 @@
void* res = mvm::jit::executionEngine->getPointerToGlobal(func);
mvm::Code* m = mvm::jit::getCodeFromPointer(res);
if (m) m->setMetaInfo(meth);
+
+ /*
+ if (compilingMethod->name ==
+ compilingClass->isolate->asciizConstructUTF8("main")) {
+ llvmFunction->print(llvm::cout);
+ printf("\n");
+ void* res = mvm::jit::executionEngine->getPointerToGlobal(llvmFunction);
+ void* base = res;
+ while (base < (void*)((char*)res + 100)) {
+ printf("%08x\t", (unsigned)base);
+ int n= mvm::jit::disassemble((unsigned int *)base);
+ printf("\n");
+ base= ((void *)((char *)base + n));
+ }
+ printf("\n");
+ fflush(stdout);
+ }
+ */
+
return res;
}
Modified: vmkit/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Makefile?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/Makefile (original)
+++ vmkit/trunk/lib/Makefile Wed Jun 25 07:06:15 2008
@@ -8,7 +8,18 @@
##===----------------------------------------------------------------------===##
LEVEL = ..
-PARALLEL_DIRS = Mvm JnJVM N3
+PARALLEL_DIRS = Mvm
+
+include $(LEVEL)/Makefile.config
+
+ifeq ($(WITH_JNJVM), 1)
+PARALLEL_DIRS += JnJVM
+endif
+
+ifeq ($(WITH_N3), 1)
+PARALLEL_DIRS += N3
+endif
+
LIBRARYNAME = Main
include $(LEVEL)/Makefile.common
Modified: vmkit/trunk/lib/Mvm/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommandLine.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommandLine.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommandLine.cpp Wed Jun 25 07:06:15 2008
@@ -131,7 +131,7 @@
return;
}
- boot_t func = (boot_t)dlsym(handle, "boot");
+ boot_t func = (boot_t)(intptr_t)dlsym(handle, "boot");
if (func == 0) {
fprintf(stderr, "\t Unable to find %s boot method\n", argv[1]);
@@ -140,7 +140,7 @@
}
func();
- vmlet_main_t vmlet = (vmlet_main_t)dlsym(handle, "start_app");
+ vmlet_main_t vmlet = (vmlet_main_t)(intptr_t)dlsym(handle, "start_app");
vmlets[argv[1]] = vmlet;
Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/CLIJit.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Wed Jun 25 07:06:15 2008
@@ -1988,6 +1988,7 @@
Constant* CLIJit::constantVMObjectNull;
+#if N3_EXECUTE > 1
static void printArgs(std::vector<llvm::Value*> args, BasicBlock* insertAt) {
for (std::vector<llvm::Value*>::iterator i = args.begin(),
e = args.end(); i!= e; ++i) {
@@ -2009,6 +2010,7 @@
}
}
+#endif
Value* CLIJit::invoke(Value *F, std::vector<llvm::Value*> args,
const char* Name,
Modified: vmkit/trunk/lib/N3/VMCore/Opcodes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Opcodes.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/Opcodes.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/Opcodes.cpp Wed Jun 25 07:06:15 2008
@@ -217,8 +217,8 @@
PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
bytecodes[i]);
PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "compiling %s::", compilingMethod->printString());
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]]);
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]], 0);
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
}
Opinfo* opinfo = &(opcodeInfos[i]);
@@ -1779,8 +1779,8 @@
PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
bytecodes[i + 1]);
PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "compiling %s::", compilingMethod->printString());
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]]);
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]], 0);
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
switch (bytecodes[++i]) {
@@ -1951,8 +1951,8 @@
PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
bytecodes[i]);
PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "exploring %s::", compilingMethod->printString());
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]]);
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNames[bytecodes[i]], 0);
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
}
switch (bytecodes[i]) {
@@ -2380,9 +2380,9 @@
PRINT_DEBUG(N3_COMPILE, 1, COLOR_NORMAL, "\t[at %5d] %-5d ", i,
bytecodes[i + 1]);
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "exploring ");
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]]);
- PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n");
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "exploring ", 0);
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_CYAN, OpcodeNamesFE[bytecodes[i + 1]], 0);
+ PRINT_DEBUG(N3_COMPILE, 1, LIGHT_BLUE, "\n", 0);
switch (bytecodes[++i]) {
Modified: vmkit/trunk/lib/N3/VMCore/PNetLib.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/PNetLib.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/PNetLib.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/PNetLib.cpp Wed Jun 25 07:06:15 2008
@@ -1204,7 +1204,6 @@
void NativeUtil::initialise() {
- void* p;
- p = (void*)&System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray;
- p = (void*)&System_Type_GetTypeFromHandle;
+ intptr_t p;
+ p = (intptr_t)&System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray;
}
Modified: vmkit/trunk/lib/N3/VMCore/VMClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMClass.cpp?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/VMClass.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/VMClass.cpp Wed Jun 25 07:06:15 2008
@@ -215,14 +215,15 @@
VMMethod* meth = cl->lookupMethodDontThrow(N3::clinitName, args,
true, false);
- PRINT_DEBUG(N3_LOAD, 0, COLOR_NORMAL, "; ");
- PRINT_DEBUG(N3_LOAD, 0, LIGHT_GREEN, "clinit ");
+ PRINT_DEBUG(N3_LOAD, 0, COLOR_NORMAL, "; ", 0);
+ PRINT_DEBUG(N3_LOAD, 0, LIGHT_GREEN, "clinit ", 0);
PRINT_DEBUG(N3_LOAD, 0, COLOR_NORMAL, "%s::%s\n", printString(),
cl->printString());
if (meth) {
llvm::Function* pred = meth->compiledPtr();
- clinit_t res = (clinit_t)mvm::jit::executionEngine->getPointerToGlobal(pred);
+ clinit_t res = (clinit_t)
+ (intptr_t)mvm::jit::executionEngine->getPointerToGlobal(pred);
res();
}
Modified: vmkit/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/Makefile?rev=52715&r1=52714&r2=52715&view=diff
==============================================================================
--- vmkit/trunk/tools/Makefile (original)
+++ vmkit/trunk/tools/Makefile Wed Jun 25 07:06:15 2008
@@ -8,7 +8,18 @@
##===----------------------------------------------------------------------===##
LEVEL = ..
-PARALLEL_DIRS = jnjvm n3
+PARALLEL_DIRS =
+
+include $(LEVEL)/Makefile.config
+
+ifeq ($(WITH_JNJVM), 1)
+ PARALLEL_DIRS += jnjvm
+endif
+
+ifeq ($(WITH_N3), 1)
+ PARALLEL_DIRS += n3
+endif
+
include $(LEVEL)/Makefile.common
More information about the llvm-commits
mailing list