From nicolas.geoffray at lip6.fr Mon Jun 13 15:20:22 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 13 Jun 2011 22:20:22 -0000 Subject: [vmkit-commits] [vmkit] r132943 - /vmkit/trunk/lib/J3/Classpath/ClasspathVMSystemProperties.inc Message-ID: <20110613222022.392B72A6C131@llvm.org> Author: geoffray Date: Mon Jun 13 17:20:22 2011 New Revision: 132943 URL: http://llvm.org/viewvc/llvm-project?rev=132943&view=rev Log: Remove dangling if...else. Patch by Marcus! Modified: vmkit/trunk/lib/J3/Classpath/ClasspathVMSystemProperties.inc Modified: vmkit/trunk/lib/J3/Classpath/ClasspathVMSystemProperties.inc URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Classpath/ClasspathVMSystemProperties.inc?rev=132943&r1=132942&r2=132943&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Classpath/ClasspathVMSystemProperties.inc (original) +++ vmkit/trunk/lib/J3/Classpath/ClasspathVMSystemProperties.inc Mon Jun 13 17:20:22 2011 @@ -115,8 +115,8 @@ tmp = getenv("USERNAME"); if (!tmp) tmp = getenv("LOGNAME"); - else if (!tmp) tmp = getenv("NAME"); - else if (!tmp) tmp = ""; + if (!tmp) tmp = getenv("NAME"); + if (!tmp) tmp = ""; setProperty(vm, prop, "user.name", tmp); tmp = getenv("HOME"); From nicolas.geoffray at lip6.fr Sun Jun 19 10:00:27 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Sun, 19 Jun 2011 17:00:27 -0000 Subject: [vmkit-commits] [vmkit] r133398 - in /vmkit/trunk: include/mvm/GC/GC.h include/mvm/UTF8.h lib/Mvm/Allocator/gcalloc.h lib/Mvm/MMTk/MvmGC.cpp lib/Mvm/MMTk/MvmGC.h mmtk/mmtk-j3/MMTkObject.h mmtk/mmtk-j3/Strings.cpp Message-ID: <20110619170028.02CC22A6C12C@llvm.org> Author: geoffray Date: Sun Jun 19 12:00:27 2011 New Revision: 133398 URL: http://llvm.org/viewvc/llvm-project?rev=133398&view=rev Log: Remove warnings from clang++. Modified: vmkit/trunk/include/mvm/GC/GC.h vmkit/trunk/include/mvm/UTF8.h vmkit/trunk/lib/Mvm/Allocator/gcalloc.h vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp vmkit/trunk/lib/Mvm/MMTk/MvmGC.h vmkit/trunk/mmtk/mmtk-j3/MMTkObject.h vmkit/trunk/mmtk/mmtk-j3/Strings.cpp Modified: vmkit/trunk/include/mvm/GC/GC.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/GC/GC.h?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/include/mvm/GC/GC.h (original) +++ vmkit/trunk/include/mvm/GC/GC.h Sun Jun 19 12:00:27 2011 @@ -13,7 +13,7 @@ #include -struct VirtualTable; +class VirtualTable; class gcRoot { public: Modified: vmkit/trunk/include/mvm/UTF8.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/UTF8.h?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/include/mvm/UTF8.h (original) +++ vmkit/trunk/include/mvm/UTF8.h Sun Jun 19 12:00:27 2011 @@ -111,8 +111,8 @@ this->size = size; } - UTF8Builder *append(const UTF8 *utf8, uint32 start=0, uint32 length=0xffffffff) { - length = length == 0xffffffff ? utf8->size : length; + UTF8Builder *append(const UTF8 *utf8, uint32 start=0, ssize_t length=-1) { + length = length == -1 ? utf8->size : length; uint32 req = cur + length; if(req > size) { Modified: vmkit/trunk/lib/Mvm/Allocator/gcalloc.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/gcalloc.h?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Allocator/gcalloc.h (original) +++ vmkit/trunk/lib/Mvm/Allocator/gcalloc.h Sun Jun 19 12:00:27 2011 @@ -120,7 +120,7 @@ if(fl->chunk_nbb()) { // printf("0 Filled %p with %d bytes\n", header->chunk(), header->nbb()); - memset(header->chunk(), 0, header->nbb()); + memset((void*)header->chunk(), 0, header->nbb()); header->free(); fl->reject(header); } else { @@ -138,7 +138,7 @@ GCChunkNode *new_header = alloc_chunk(new_nbb, old_header->isCollectable(), old_header->mark()); uintptr_t old = old_header->nbb(); uintptr_t nbb = old < new_nbb ? old : new_nbb; - memcpy(new_header->chunk(), old_header->chunk(), nbb); + memcpy((void*)new_header->chunk(), (void*)old_header->chunk(), nbb); return new_header; } Modified: vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp (original) +++ vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp Sun Jun 19 12:00:27 2011 @@ -24,7 +24,7 @@ VirtualTable* VT = (VirtualTable*)_VT; sz = llvm::RoundUpToAlignment(sz, sizeof(void*)); res = (gc*)malloc(sz); - memset(res, 0, sz); + memset((void*)res, 0, sz); lock.acquire(); __InternalSet__.insert(res); @@ -47,7 +47,7 @@ extern "C" void* AllocateMagicArray(int32_t sz, void* length) { gc* res = (gc*)malloc(sz); - memset(res, 0, sz); + memset((void*)res, 0, sz); ((void**)res)[0] = length; return res; } Modified: vmkit/trunk/lib/Mvm/MMTk/MvmGC.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/MMTk/MvmGC.h?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/MMTk/MvmGC.h (original) +++ vmkit/trunk/lib/Mvm/MMTk/MvmGC.h Sun Jun 19 12:00:27 2011 @@ -16,7 +16,8 @@ #define gc_allocator std::allocator -struct VirtualTable { +class VirtualTable { + public: uintptr_t destructor; uintptr_t operatorDelete; uintptr_t tracer; Modified: vmkit/trunk/mmtk/mmtk-j3/MMTkObject.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-j3/MMTkObject.h?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/mmtk/mmtk-j3/MMTkObject.h (original) +++ vmkit/trunk/mmtk/mmtk-j3/MMTkObject.h Sun Jun 19 12:00:27 2011 @@ -16,7 +16,7 @@ namespace mmtk { -class MMTkObject; +struct MMTkObject; struct MMTkClass { MMTkObject* delegatee; Modified: vmkit/trunk/mmtk/mmtk-j3/Strings.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-j3/Strings.cpp?rev=133398&r1=133397&r2=133398&view=diff ============================================================================== --- vmkit/trunk/mmtk/mmtk-j3/Strings.cpp (original) +++ vmkit/trunk/mmtk/mmtk-j3/Strings.cpp Sun Jun 19 12:00:27 2011 @@ -34,8 +34,8 @@ extern "C" sint32 Java_org_j3_mmtk_Strings_copyStringToChars__Ljava_lang_String_2_3CII( - MMTkObject* obj, MMTkString* str, MMTkArray* dst, uint32 dstBegin, - uint32 dstEnd) { + MMTkObject* obj, MMTkString* str, MMTkArray* dst, sint32 dstBegin, + sint32 dstEnd) { sint32 len = str->count; sint32 n = (dstBegin + len <= dstEnd) ? len : (dstEnd - dstBegin); From nicolas.geoffray at lip6.fr Thu Jun 30 04:32:15 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 11:32:15 -0000 Subject: [vmkit-commits] [vmkit] r134141 - in /vmkit/trunk: ./ include/mvm/ lib/J3/Classpath/ lib/J3/Compiler/ lib/J3/VMCore/ lib/Mvm/ lib/Mvm/Allocator/ lib/Mvm/CommonThread/ lib/Mvm/Compiler/ lib/Mvm/MMTk/ lib/Mvm/Runtime/ mmtk/inline/ tools/ tools/j3/ tools/vmjc/ Message-ID: <20110630113215.C50222A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 06:32:15 2011 New Revision: 134141 URL: http://llvm.org/viewvc/llvm-project?rev=134141&view=rev Log: Major BUILD revamp and cleanup. vmkit can now only be compiled with an llvm-based compiler (clang or llvm-gcc). Modified: vmkit/trunk/Makefile vmkit/trunk/Makefile.rules vmkit/trunk/include/mvm/JIT.h vmkit/trunk/include/mvm/MethodInfo.h vmkit/trunk/include/mvm/VirtualMachine.h vmkit/trunk/lib/J3/Classpath/Makefile vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp vmkit/trunk/lib/J3/Compiler/Makefile vmkit/trunk/lib/J3/VMCore/JavaClass.cpp vmkit/trunk/lib/J3/VMCore/JavaClass.h vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp vmkit/trunk/lib/J3/VMCore/Jnjvm.h vmkit/trunk/lib/J3/VMCore/LockedMap.cpp vmkit/trunk/lib/J3/VMCore/LockedMap.h vmkit/trunk/lib/J3/VMCore/Makefile vmkit/trunk/lib/Mvm/Allocator/Makefile vmkit/trunk/lib/Mvm/CommonThread/Makefile vmkit/trunk/lib/Mvm/Compiler/JIT.cpp vmkit/trunk/lib/Mvm/Compiler/Makefile vmkit/trunk/lib/Mvm/MMTk/Makefile vmkit/trunk/lib/Mvm/Makefile vmkit/trunk/lib/Mvm/Runtime/Makefile vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp vmkit/trunk/mmtk/inline/Makefile vmkit/trunk/tools/Makefile vmkit/trunk/tools/j3/Main.cpp vmkit/trunk/tools/j3/Makefile vmkit/trunk/tools/vmjc/Makefile vmkit/trunk/tools/vmjc/vmjc.cpp Modified: vmkit/trunk/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/Makefile (original) +++ vmkit/trunk/Makefile Thu Jun 30 06:32:15 2011 @@ -13,13 +13,7 @@ # Top-Level vmkit Build Stages: # -DIRS := lib tools/vmjc - -ifeq ($(GC_MMTK), 1) - DIRS += mmtk -endif - -DIRS += tools +DIRS := lib/Mvm/StaticGCPass lib tools/vmjc mmtk tools EXTRA_DIST=include Modified: vmkit/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.rules?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/Makefile.rules (original) +++ vmkit/trunk/Makefile.rules Thu Jun 30 06:32:15 2011 @@ -1,52 +1,28 @@ -LTO_OPTS = -std-compile-opts +VMJC := $(ToolDir)/vmjc$(EXEEXT) -ifdef VMKIT_RUNTIME +############################################################################### +# VMKIT_RUNTIME: Provide rules to build a .cpp file with LLVM instructions +# generating code matching the .ll files. +############################################################################### +ifdef VMKIT_RUNTIME .PRECIOUS: LLVMRuntime.inc -# All of these files depend on tblgen and the .td files. LLVMRuntime.inc : $(LLVMAS) $(LLC) $(VMKIT_RUNTIME) - -LLVMRuntime.gen.ll : $(VMKIT_RUNTIME) - $(Verb) cat $(VMKIT_RUNTIME) > LLVMRuntime.gen.ll - -LLVMRuntime.inc : LLVMRuntime.gen.ll $(Echo) "Building LLVM runtime with $(VMKIT_RUNTIME)" - $(Verb) $(LLVMAS) -f $( LLVMAssembly.gen.ll - -LLVMAssembly.s : LLVMAssembly.gen.ll - $(Echo) "Building LLVM assembly with $(VMKIT_ASSEMBLY)" - $(Verb) $(LLVMAS) -f $( $@ + +FrametablesSymbols.inc: $(ProjLibsPaths) + $(Verb) nm $(ProjLibsPaths) | grep __frametable | sed 's/\([a-f0-9]*\)\s\([a-zA-Z]*\)\s\([a-zA-Z0-9_]*\)/\&\3,/' > $@ + +all-local:: FrametablesExterns.inc FrametablesSymbols.inc -endif clean-local:: - $(Verb) $(RM) -rf classes $(JARNAME).jar $(JARNAME).bc $(JARNAME)-optimized.bc + -$(Verb) $(RM) -f FrametablesExterns.inc FrametablesSymbols.inc + endif Modified: vmkit/trunk/include/mvm/JIT.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/JIT.h?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/include/mvm/JIT.h (original) +++ vmkit/trunk/include/mvm/JIT.h Thu Jun 30 06:32:15 2011 @@ -194,7 +194,6 @@ static void initialise(llvm::CodeGenOpt::Level = llvm::CodeGenOpt::Default, llvm::Module* TheModule = 0, llvm::TargetMachine* TheTarget = 0); - static void loadBytecodeFile(const std::string& str); static int disassemble(unsigned int* addr); Modified: vmkit/trunk/include/mvm/MethodInfo.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/MethodInfo.h?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/include/mvm/MethodInfo.h (original) +++ vmkit/trunk/include/mvm/MethodInfo.h Thu Jun 30 06:32:15 2011 @@ -2,7 +2,7 @@ // // The VMKit project // -// This file is distributed under the University of Pierre et Marie Curie +// This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// @@ -41,6 +41,12 @@ int16_t LiveOffsets[1]; }; +class CamlFrames { +public: + uint16_t NumDescriptors; + CamlFrame* frames() const; +}; + class CamlMethodInfo : public MethodInfo { public: CamlFrame* CF; Modified: vmkit/trunk/include/mvm/VirtualMachine.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/VirtualMachine.h?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/include/mvm/VirtualMachine.h (original) +++ vmkit/trunk/include/mvm/VirtualMachine.h Thu Jun 30 06:32:15 2011 @@ -20,6 +20,7 @@ namespace mvm { +class CamlFrames; class MethodInfo; class FunctionMap { @@ -45,7 +46,7 @@ /// removeMethodInfos - Remove all MethodInfo owned by the given owner. void removeMethodInfos(void* owner); - FunctionMap(); + FunctionMap(CamlFrames** frames); }; /// VirtualMachine - This class is the root of virtual machine classes. It @@ -53,8 +54,8 @@ /// class VirtualMachine : public mvm::PermanentObject { protected: - VirtualMachine(mvm::BumpPtrAllocator &Alloc) : - allocator(Alloc) { + VirtualMachine(mvm::BumpPtrAllocator &Alloc, mvm::CamlFrames** frames) : + allocator(Alloc), FunctionsCache(frames) { mainThread = NULL; numberOfThreads = 0; doExit = false; Modified: vmkit/trunk/lib/J3/Classpath/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Classpath/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Classpath/Makefile (original) +++ vmkit/trunk/lib/J3/Classpath/Makefile Thu Jun 30 06:32:15 2011 @@ -16,16 +16,8 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = Classpath -else - LIBRARYNAME = Classpath -endif +MODULE_WITH_GC = Classpath include $(LEVEL)/Makefile.common CXX.Flags += -I$(PROJ_SRC_DIR)/../VMCore $(CLASSPATH_FLAGS) - -ifeq ($(ISOLATE_BUILD), 1) - CXX.Flags += -I$(PROJ_SRC_DIR)/../Isolate -endif Modified: vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp (original) +++ vmkit/trunk/lib/J3/Compiler/JavaJITCompiler.cpp Thu Jun 30 06:32:15 2011 @@ -428,7 +428,7 @@ JavaJITCompiler* Comp = JavaJITCompiler::CreateCompiler("JITModule"); JnjvmBootstrapLoader* loader = new(Allocator, "Bootstrap loader") JnjvmBootstrapLoader(Allocator, Comp, true); - Jnjvm* vm = new(Allocator, "VM") Jnjvm(Allocator, loader); + Jnjvm* vm = new(Allocator, "VM") Jnjvm(Allocator, NULL, loader); vm->runApplication(argc + 1, newArgv); vm->waitForExit(); Modified: vmkit/trunk/lib/J3/Compiler/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Compiler/Makefile (original) +++ vmkit/trunk/lib/J3/Compiler/Makefile Thu Jun 30 06:32:15 2011 @@ -10,19 +10,9 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = J3Compiler -else - LIBRARYNAME = J3Compiler -endif - +MODULE_WITH_GC = J3Compiler EXTRA_DIST = ExceptionsCheck.inc ExceptionsDwarf.inc - include $(LEVEL)/Makefile.common CXX.Flags += -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath $(CLASSPATH_FLAGS) -I$(PROJ_SRC_DIR)/../VMCore - -ifeq ($(ISOLATE_BUILD), 1) - CXX.Flags += -I$(PROJ_SRC_DIR)/../Isolate -endif Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/J3/VMCore/JavaClass.cpp Thu Jun 30 06:32:15 2011 @@ -1836,3 +1836,12 @@ delegatee = getClassDelegatee(JavaThread::get()->getJVM()); JavaObject::notifyAll(delegatee); } + +void JavaField::setInstanceObjectField(JavaObject* obj, JavaObject* val) { + llvm_gcroot(obj, 0); + llvm_gcroot(val, 0); + if (val != NULL) assert(val->getVirtualTable()); + assert(classDef->isResolved()); + JavaObject** ptr = (JavaObject**)((uint64)obj + ptrOffset); + mvm::Collector::objectReferenceWriteBarrier((gc*)obj, (gc**)ptr, (gc*)val); +} Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.h?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/J3/VMCore/JavaClass.h Thu Jun 30 06:32:15 2011 @@ -1310,14 +1310,8 @@ return ((JavaObject**)ptr)[0]; } - void setInstanceObjectField(JavaObject* obj, JavaObject* val) { - llvm_gcroot(obj, 0); - llvm_gcroot(val, 0); - if (val != NULL) assert(val->getVirtualTable()); - assert(classDef->isResolved()); - JavaObject** ptr = (JavaObject**)((uint64)obj + ptrOffset); - mvm::Collector::objectReferenceWriteBarrier((gc*)obj, (gc**)ptr, (gc*)val); - } + // This can't be inlined because of a linker bug. + void setInstanceObjectField(JavaObject* obj, JavaObject* val); bool isReference() { uint16 val = type->elements[0]; Modified: vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/J3/VMCore/Jnjvm.cpp Thu Jun 30 06:32:15 2011 @@ -1319,8 +1319,10 @@ mainThread->start((void (*)(mvm::Thread*))mainJavaStart); } -Jnjvm::Jnjvm(mvm::BumpPtrAllocator& Alloc, JnjvmBootstrapLoader* loader) : - VirtualMachine(Alloc), lockSystem(Alloc) { +Jnjvm::Jnjvm(mvm::BumpPtrAllocator& Alloc, + mvm::CamlFrames** frames, + JnjvmBootstrapLoader* loader) : + VirtualMachine(Alloc, frames), lockSystem(Alloc) { classpath = getenv("CLASSPATH"); if (!classpath) classpath = "."; @@ -1453,7 +1455,7 @@ JavaCompiler* Comp = new JavaCompiler(); JnjvmBootstrapLoader* loader = new(Allocator, "Bootstrap loader") JnjvmBootstrapLoader(Allocator, Comp, true); - Jnjvm* vm = new(Allocator, "VM") Jnjvm(Allocator, loader); + Jnjvm* vm = new(Allocator, "VM") Jnjvm(Allocator, NULL, loader); vm->runApplication(argc + 1, newArgv); vm->waitForExit(); Modified: vmkit/trunk/lib/J3/VMCore/Jnjvm.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/Jnjvm.h?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/Jnjvm.h (original) +++ vmkit/trunk/lib/J3/VMCore/Jnjvm.h Thu Jun 30 06:32:15 2011 @@ -15,6 +15,7 @@ #include "types.h" #include "mvm/Allocator.h" +#include "mvm/MethodInfo.h" #include "mvm/Object.h" #include "mvm/VirtualMachine.h" #include "mvm/Threads/Cond.h" @@ -335,7 +336,9 @@ /// Jnjvm - Allocates a new JVM. /// - Jnjvm(mvm::BumpPtrAllocator& Alloc, JnjvmBootstrapLoader* loader); + Jnjvm(mvm::BumpPtrAllocator& Alloc, + mvm::CamlFrames** frames, + JnjvmBootstrapLoader* loader); /// runApplication - Runs the application with the given command line. /// User-visible function, inherited by the VirtualMachine class. Modified: vmkit/trunk/lib/J3/VMCore/LockedMap.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/LockedMap.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/LockedMap.cpp (original) +++ vmkit/trunk/lib/J3/VMCore/LockedMap.cpp Thu Jun 30 06:32:15 2011 @@ -15,6 +15,20 @@ using namespace j3; +bool ltutf8::operator()(const UTF8* s1, const UTF8* s2) const { + return s1->lessThan(s2); +} + +bool ltarray16::operator()(const ArrayUInt16* s1, const ArrayUInt16* s2) const { + llvm_gcroot(s1, 0); + llvm_gcroot(s2, 0); + if (ArrayUInt16::getSize(s1) < ArrayUInt16::getSize(s2)) return true; + else if (ArrayUInt16::getSize(s1) > ArrayUInt16::getSize(s2)) return false; + else return memcmp((const char*)ArrayUInt16::getElements(s1), + (const char*)ArrayUInt16::getElements(s2), + ArrayUInt16::getSize(s1) * sizeof(uint16)) < 0; +} + void StringMap::insert(JavaString* str) { const ArrayUInt16* array = NULL; llvm_gcroot(str, 0); Modified: vmkit/trunk/lib/J3/VMCore/LockedMap.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/LockedMap.h?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/LockedMap.h (original) +++ vmkit/trunk/lib/J3/VMCore/LockedMap.h Thu Jun 30 06:32:15 2011 @@ -37,43 +37,29 @@ class UserCommonClass; class UserClassArray; -struct ltutf8 -{ - bool operator()(const UTF8* s1, const UTF8* s2) const - { - return s1->lessThan(s2); - } +struct ltutf8 { + bool operator()(const UTF8* s1, const UTF8* s2) const; }; -struct ltarray16 -{ - bool operator()(const ArrayUInt16* s1, const ArrayUInt16* s2) const - { - llvm_gcroot(s1, 0); - llvm_gcroot(s2, 0); - if (ArrayUInt16::getSize(s1) < ArrayUInt16::getSize(s2)) return true; - else if (ArrayUInt16::getSize(s1) > ArrayUInt16::getSize(s2)) return false; - else return memcmp((const char*)ArrayUInt16::getElements(s1), - (const char*)ArrayUInt16::getElements(s2), - ArrayUInt16::getSize(s1) * sizeof(uint16)) < 0; - } +struct ltarray16 { + bool operator()(const ArrayUInt16* s1, const ArrayUInt16* s2) const; }; - class MapNoGC { - public: - static void gcroot(void* val, void* unused) - __attribute__ ((always_inline)) {} - - }; - - class MapWithGC { - public: - static void gcroot(void* val, void* unused) - __attribute__ ((always_inline)) { - llvm_gcroot(val, unused); - } - - }; +class MapNoGC { +public: + static void gcroot(void* val, void* unused) + __attribute__ ((always_inline)) {} + +}; + +class MapWithGC { +public: + static void gcroot(void* val, void* unused) + __attribute__ ((always_inline)) { + llvm_gcroot(val, unused); + } + +}; template { -#ifdef USE_GC_BOEHM -public: - void* operator new(size_t sz, mvm::BumpPtrAllocator& allocator) { - return GC_MALLOC(sz); - } -#endif }; class StringMap : Modified: vmkit/trunk/lib/J3/VMCore/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/Makefile (original) +++ vmkit/trunk/lib/J3/VMCore/Makefile Thu Jun 30 06:32:15 2011 @@ -10,17 +10,8 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = J3 -else - LIBRARYNAME = J3 -endif - +MODULE_WITH_GC = J3 include $(LEVEL)/Makefile.common -CXX.Flags += -I$(PROJ_OBJ_DIR)/../Classpath -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath $(CLASSPATH_FLAGS) -I$(PROJ_SRC_DIR)/../../../include/j3 - -ifeq ($(ISOLATE_BUILD), 1) - CXX.Flags += -I$(PROJ_SRC_DIR)/../Isolate -endif +CXX.Flags += -I$(PROJ_OBJ_DIR)/../Classpath -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath $(CLASSPATH_FLAGS) -I$(PROJ_SRC_DIR)/../../../include/j3 -Wno-mismatched-tags Modified: vmkit/trunk/lib/Mvm/Allocator/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Allocator/Makefile (original) +++ vmkit/trunk/lib/Mvm/Allocator/Makefile Thu Jun 30 06:32:15 2011 @@ -10,11 +10,7 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = Allocator -else - LIBRARYNAME = Allocator -endif +MODULE_WITH_GC = Allocator include $(LEVEL)/Makefile.common Modified: vmkit/trunk/lib/Mvm/CommonThread/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/CommonThread/Makefile (original) +++ vmkit/trunk/lib/Mvm/CommonThread/Makefile Thu Jun 30 06:32:15 2011 @@ -10,12 +10,7 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = CommonThread -else - LIBRARYNAME = CommonThread -endif - +MODULE_WITH_GC = CommonThread include $(LEVEL)/Makefile.common Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original) +++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Thu Jun 30 06:32:15 2011 @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -58,11 +57,6 @@ using namespace mvm; using namespace llvm; - -static cl::list -LoadBytecodeFiles("load-bc", cl::desc("Load bytecode file"), cl::ZeroOrMore, - cl::CommaSeparated); - cl::opt EmitDebugInfo("emit-debug-info", cl::desc("Emit debugging information"), cl::init(false)); @@ -118,18 +112,6 @@ static MvmJITListener JITListener; -void MvmModule::loadBytecodeFile(const std::string& str) { - SMDiagnostic Err; - Module* M = ParseIRFile(str, Err, globalModule->getContext()); - if (M) { - M->setTargetTriple(getHostTriple()); - Linker::LinkModules(globalModule, M, 0); - delete M; - } else { - Err.Print("load bytecode", errs()); - } -} - typedef void (*BootType)(uintptr_t Plan); typedef void (*BootHeapType)(intptr_t initial, intptr_t max); @@ -176,10 +158,6 @@ //LLVMContext& Context = globalModule->getContext(); //MetadataTypeKind = Context.getMDKindID("HighLevelType"); - for (std::vector::iterator i = LoadBytecodeFiles.begin(), - e = LoadBytecodeFiles.end(); i != e; ++i) { - loadBytecodeFile(*i); - } } BaseIntrinsics::BaseIntrinsics(llvm::Module* module) { Modified: vmkit/trunk/lib/Mvm/Compiler/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Compiler/Makefile (original) +++ vmkit/trunk/lib/Mvm/Compiler/Makefile Thu Jun 30 06:32:15 2011 @@ -10,11 +10,7 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = MvmCompiler -else - LIBRARYNAME = MvmCompiler -endif +MODULE_WITH_GC = MvmCompiler VMKIT_RUNTIME = $(PROJ_SRC_DIR)/LLVMRuntime.ll BUILT_SOURCES = LLVMRuntime.inc Modified: vmkit/trunk/lib/Mvm/MMTk/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/MMTk/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/MMTk/Makefile (original) +++ vmkit/trunk/lib/Mvm/MMTk/Makefile Thu Jun 30 06:32:15 2011 @@ -10,10 +10,6 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - MODULE_NAME = MMTk -else - LIBRARYNAME = MMTk -endif +MODULE_WITH_GC = MMTk include $(LEVEL)/Makefile.common Modified: vmkit/trunk/lib/Mvm/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Makefile (original) +++ vmkit/trunk/lib/Mvm/Makefile Thu Jun 30 06:32:15 2011 @@ -10,8 +10,6 @@ include $(LEVEL)/Makefile.config -EXTRA_DIST = BoehmGC GCMmap2 MMTk - -DIRS = Allocator CommonThread $(GCLIB) Runtime Compiler StaticGCPass JITGCPass +DIRS = CommonThread MMTk Runtime Compiler JITGCPass include $(LEVEL)/Makefile.common Modified: vmkit/trunk/lib/Mvm/Runtime/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Runtime/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Runtime/Makefile (original) +++ vmkit/trunk/lib/Mvm/Runtime/Makefile Thu Jun 30 06:32:15 2011 @@ -10,22 +10,6 @@ include $(LEVEL)/Makefile.config -ifeq ($(WITH_LLVM_GCC), 1) - - MODULE_NAME = Mvm - -else - LIBRARYNAME = Mvm - - VMKIT_ASSEMBLY = $(PROJ_SRC_DIR)/LLVMAssembly.ll - BUILT_SOURCES = LLVMAssembly.s - - ifeq ($(WITH_64), 1) - VMKIT_ASSEMBLY += $(PROJ_SRC_DIR)/LLVMAssembly64.ll - endif - - SOURCES = LLVMAssembly.s $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp)) - -endif +MODULE_WITH_GC = Mvm include $(LEVEL)/Makefile.common Modified: vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp (original) +++ vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp Thu Jun 30 06:32:15 2011 @@ -15,12 +15,6 @@ #include #include -#if defined(__MACH__) -#define SELF_HANDLE RTLD_DEFAULT -#else -#define SELF_HANDLE 0 -#endif - using namespace mvm; void CamlMethodInfo::scan(uintptr_t closure, void* ip, void* addr) { @@ -51,11 +45,6 @@ void DefaultMethodInfo::scan(uintptr_t closure, void* ip, void* addr) { } -struct CamlFrames { - uint16_t NumDescriptors; - CamlFrame frames[1]; -}; - struct CamlFrameDecoder { CamlFrames* frames ; uint32 currentDescriptor; @@ -64,7 +53,7 @@ CamlFrameDecoder(CamlFrames* frames) { this->frames = frames; currentDescriptor = 0; - currentFrame = &(frames->frames[0]); + currentFrame = frames->frames(); } bool hasNext() { @@ -88,23 +77,33 @@ } }; +CamlFrame* CamlFrames::frames() const { + intptr_t ptr = reinterpret_cast(this) + sizeof(uint32_t); + // If the frames structure was not 4-aligned, manually do it here. + if (ptr & 2) { + ptr -= sizeof(uint16_t); + } + return reinterpret_cast(ptr); +} + static BumpPtrAllocator* StaticAllocator = NULL; -FunctionMap::FunctionMap() { - CamlFrames* frames = - (CamlFrames*)dlsym(SELF_HANDLE, "camlVmkitoptimized__frametable"); - if (frames == NULL) return; - +FunctionMap::FunctionMap(CamlFrames** allFrames) { + if (allFrames == NULL) return; StaticAllocator = new BumpPtrAllocator(); - CamlFrameDecoder decoder(frames); - Dl_info info; - while (decoder.hasNext()) { - CamlFrame* frame = decoder.next(); - int res = dladdr(frame->ReturnAddress, &info); - assert(res != 0 && "No frame"); - StaticCamlMethodInfo* MI = new(*StaticAllocator, "StaticCamlMethodInfo") - StaticCamlMethodInfo(frame, info.dli_sname); - addMethodInfo(MI, frame->ReturnAddress); + int i = 0; + CamlFrames* frames = NULL; + while ((frames = allFrames[i++]) != NULL) { + CamlFrameDecoder decoder(frames); + Dl_info info; + while (decoder.hasNext()) { + CamlFrame* frame = decoder.next(); + int res = dladdr(frame->ReturnAddress, &info); + assert(res != 0 && "No frame"); + StaticCamlMethodInfo* MI = new(*StaticAllocator, "StaticCamlMethodInfo") + StaticCamlMethodInfo(frame, info.dli_sname); + addMethodInfo(MI, frame->ReturnAddress); + } } } Modified: vmkit/trunk/mmtk/inline/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/inline/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/mmtk/inline/Makefile (original) +++ vmkit/trunk/mmtk/inline/Makefile Thu Jun 30 06:32:15 2011 @@ -10,7 +10,7 @@ include $(LEVEL)/Makefile.config -MODULE_NAME = InlineMMTk +MODULE_WITH_GC = InlineMMTk include $(LEVEL)/Makefile.common Modified: vmkit/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/tools/Makefile (original) +++ vmkit/trunk/tools/Makefile Thu Jun 30 06:32:15 2011 @@ -8,24 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL = .. -PARALLEL_DIRS += vmkit - include $(LEVEL)/Makefile.config -ifeq ($(WITH_J3), 1) - PARALLEL_DIRS += j3 - PARALLEL_DIRS += vmjc - PARALLEL_DIRS += llcj -endif - -ifeq ($(WITH_N3_MONO), 1) - PARALLEL_DIRS += n3-mono -endif - -ifeq ($(WITH_N3_PNETLIB), 1) - PARALLEL_DIRS += n3-pnetlib -endif - +PARALLEL_DIRS = j3 vmjc llcj include $(LEVEL)/Makefile.common Modified: vmkit/trunk/tools/j3/Main.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/j3/Main.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/tools/j3/Main.cpp (original) +++ vmkit/trunk/tools/j3/Main.cpp Thu Jun 30 06:32:15 2011 @@ -9,6 +9,7 @@ #include "MvmGC.h" #include "mvm/JIT.h" +#include "mvm/MethodInfo.h" #include "mvm/Object.h" #include "mvm/VirtualMachine.h" #include "mvm/Threads/Thread.h" @@ -25,8 +26,14 @@ using namespace j3; using namespace mvm; +#include "FrametablesExterns.inc" + +CamlFrames* frametables[] = { + #include "FrametablesSymbols.inc" +}; + int main(int argc, char **argv, char **envp) { - llvm::llvm_shutdown_obj X; + llvm::llvm_shutdown_obj X; // Initialize base components. MvmModule::initialise(); @@ -40,7 +47,7 @@ JavaJITCompiler* Comp = JavaJITCompiler::CreateCompiler("JITModule"); JnjvmBootstrapLoader* loader = new(Allocator, "Bootstrap loader") JnjvmBootstrapLoader(Allocator, Comp, true); - Jnjvm* vm = new(Allocator, "VM") Jnjvm(Allocator, loader); + Jnjvm* vm = new(Allocator, "VM") Jnjvm(Allocator, (CamlFrames**)frametables, loader); // Run the application. vm->runApplication(argc, argv); Modified: vmkit/trunk/tools/j3/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/j3/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/tools/j3/Makefile (original) +++ vmkit/trunk/tools/j3/Makefile Thu Jun 30 06:32:15 2011 @@ -1,6 +1,6 @@ -##===- tools/jnjvm/Makefile --------------------------------*- Makefile -*-===## +##===- tools/j3/Makefile -----------------------------------*- Makefile -*-===## # -# The vmkit project +# The VMKit project # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. @@ -11,38 +11,9 @@ include $(LEVEL)/Makefile.config TOOLNAME = j3 - -ifeq ($(WITH_LLVM_GCC), 1) - - MODULESNAME = j3 - USEDMODULES = J3.bc Classpath.bc J3Compiler.bc Allocator.bc CommonThread.bc \ - Mvm.bc MvmCompiler.bc - - ifeq ($(GC_MMTK), 1) - USEDMODULES += FinalMMTk.bc InlineMMTk.bc - else - USEDMODULES += $(GCLIB).bc - endif - - ifeq ($(ISOLATE_SHARING_BUILD), 1) - USEDMODULES += Isolate.bc - endif - - BUILT_SOURCES = j3.s - SOURCES = j3.s $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp)) - -else - -USEDLIBS = J3.a Classpath.a J3.a J3Compiler.a Allocator.a \ - Mvm.a MvmCompiler.a $(GCLIB).a Allocator.a CommonThread.a - - ifeq ($(ISOLATE_SHARING_BUILD), 1) - USEDLIBS += Isolate - endif - -endif - -LINK_COMPONENTS = jit nativecodegen scalaropts instrumentation ipa ipo bitreader asmparser linker - +USEDLIBS = Classpath.a J3.a J3Compiler.a Mvm.a MvmCompiler.a CommonThread.a FinalMMTk.a InlineMMTk.a +BUILT_SOURCES = FrametablesSymbols.inc FrametablesExterns.inc +BUILD_FRAMETABLE = 1 +LINK_COMPONENTS = jit nativecodegen scalaropts instrumentation ipa ipo asmparser linker include $(LEVEL)/Makefile.common Modified: vmkit/trunk/tools/vmjc/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vmjc/Makefile?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/tools/vmjc/Makefile (original) +++ vmkit/trunk/tools/vmjc/Makefile Thu Jun 30 06:32:15 2011 @@ -1,4 +1,4 @@ -##===- tools/vmjc/Makefile --------------------------------*- Makefile -*-===## +##===- tools/vmjc/Makefile ---------------------------------*- Makefile -*-===## # # The VMKit project # @@ -13,22 +13,7 @@ EXTRA_DIST = libvmjc TOOLNAME = vmjc - - -ifeq ($(WITH_LLVM_GCC), 1) - MODULESNAME = vmkit - USEDMODULES = J3.bc Classpath.bc J3Compiler.bc Allocator.bc \ - CommonThread.bc Mvm.bc MvmCompiler.bc $(GCLIB).bc - - BUILT_SOURCES = vmkit.s - SOURCES = vmkit.s $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp)) - -else - - USEDLIBS = J3.a Classpath.a J3.a J3Compiler.a Allocator.a \ - Mvm.a MvmCompiler.a $(GCLIB).a Allocator.a CommonThread.a -endif - +USEDLIBS = J3.a Classpath.a J3.a J3Compiler.a Mvm.a MvmCompiler.a MMTk.a CommonThread.a LINK_COMPONENTS = jit nativecodegen scalaropts instrumentation ipa ipo bitwriter bitreader asmparser linker include $(LEVEL)/Makefile.common Modified: vmkit/trunk/tools/vmjc/vmjc.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vmjc/vmjc.cpp?rev=134141&r1=134140&r2=134141&view=diff ============================================================================== --- vmkit/trunk/tools/vmjc/vmjc.cpp (original) +++ vmkit/trunk/tools/vmjc/vmjc.cpp Thu Jun 30 06:32:15 2011 @@ -15,6 +15,7 @@ // //===----------------------------------------------------------------------===// +#include #include "llvm/LinkAllPasses.h" #include "llvm/LinkAllVMCore.h" #include "llvm/Module.h" @@ -24,6 +25,7 @@ #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/IRReader.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PassNameParser.h" @@ -106,6 +108,24 @@ WithClinit("with-clinit", cl::desc("Classes to clinit"), cl::ZeroOrMore, cl::CommaSeparated); + +static cl::list +LoadBytecodeFiles("load-bc", cl::desc("Load bytecode file"), cl::ZeroOrMore, + cl::CommaSeparated); + +static void loadBytecodeFile(const std::string& str) { + SMDiagnostic Err; + Module* M = ParseIRFile(str, Err, mvm::MvmModule::globalModule->getContext()); + if (M) { + M->setTargetTriple(mvm::MvmModule::getHostTriple()); + Linker::LinkModules(mvm::MvmModule::globalModule, M, 0); + delete M; + } else { + Err.Print("load bytecode", errs()); + } +} + + int main(int argc, char **argv) { llvm_shutdown_obj X; // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "vmkit .class -> .ll compiler\n"); @@ -174,6 +194,11 @@ mvm::MvmModule::initialise(); } + for (std::vector::iterator i = LoadBytecodeFiles.begin(), + e = LoadBytecodeFiles.end(); i != e; ++i) { + loadBytecodeFile(*i); + } + JavaAOTCompiler* Comp = new JavaAOTCompiler("AOT"); mvm::Collector::initialise(); @@ -187,7 +212,7 @@ if (AssumeCompiled) Comp->assumeCompiled = true; if (DisableCooperativeGC) Comp->disableCooperativeGC(); - Jnjvm* vm = new(allocator, "Bootstrap loader") Jnjvm(allocator, loader); + Jnjvm* vm = new(allocator, "Bootstrap loader") Jnjvm(allocator, NULL, loader); for (std::vector::iterator i = Properties.begin(), e = Properties.end(); i != e; ++i) { From nicolas.geoffray at lip6.fr Thu Jun 30 05:24:22 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 12:24:22 -0000 Subject: [vmkit-commits] [vmkit] r134143 - in /vmkit/trunk: lib/Mvm/Allocator/ lib/Mvm/BoehmGC/ lib/Mvm/GCMmap2/ patches/ Message-ID: <20110630122422.44BAB2A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 07:24:22 2011 New Revision: 134143 URL: http://llvm.org/viewvc/llvm-project?rev=134143&view=rev Log: Remove unused directories. Removed: vmkit/trunk/lib/Mvm/Allocator/ vmkit/trunk/lib/Mvm/BoehmGC/ vmkit/trunk/lib/Mvm/GCMmap2/ vmkit/trunk/patches/ From nicolas.geoffray at lip6.fr Thu Jun 30 05:46:54 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 12:46:54 -0000 Subject: [vmkit-commits] [vmkit] r134145 - in /vmkit/trunk: lib/N3/ tools/n3-mono/ tools/n3-pnetlib/ tools/testAllocator/ tools/testCollector/ tools/vtoffset/ Message-ID: <20110630124654.6A8292A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 07:46:54 2011 New Revision: 134145 URL: http://llvm.org/viewvc/llvm-project?rev=134145&view=rev Log: Remove unused directories. Removed: vmkit/trunk/lib/N3/ vmkit/trunk/tools/n3-mono/ vmkit/trunk/tools/n3-pnetlib/ vmkit/trunk/tools/testAllocator/ vmkit/trunk/tools/testCollector/ vmkit/trunk/tools/vtoffset/ From nicolas.geoffray at lip6.fr Thu Jun 30 05:50:20 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 12:50:20 -0000 Subject: [vmkit-commits] [vmkit] r134146 - /vmkit/trunk/tools/vmkit/ Message-ID: <20110630125020.2E9282A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 07:50:20 2011 New Revision: 134146 URL: http://llvm.org/viewvc/llvm-project?rev=134146&view=rev Log: Remove unused vmkit tool. Removed: vmkit/trunk/tools/vmkit/ From nicolas.geoffray at lip6.fr Thu Jun 30 05:56:48 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 12:56:48 -0000 Subject: [vmkit-commits] [vmkit] r134147 - in /vmkit/trunk: Makefile.common.in Makefile.config.in include/mvm/Threads/Locks.h include/mvm/VirtualMachine.h lib/J3/Compiler/JavaLLVMCompiler.cpp lib/Mvm/CommonThread/ctthread.cpp mmtk/mmtk-alloc/Makefile mmtk/mmtk-j3/Makefile Message-ID: <20110630125648.38B942A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 07:56:47 2011 New Revision: 134147 URL: http://llvm.org/viewvc/llvm-project?rev=134147&view=rev Log: Remove all references of WITH_LLVM_GCC, now that it is required to have it. Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/Makefile.config.in vmkit/trunk/include/mvm/Threads/Locks.h vmkit/trunk/include/mvm/VirtualMachine.h vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp vmkit/trunk/mmtk/mmtk-alloc/Makefile vmkit/trunk/mmtk/mmtk-j3/Makefile Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134147&r1=134146&r2=134147&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 07:56:47 2011 @@ -20,9 +20,7 @@ # Define BYTECODE_LIBRARY before including LLVM's Makefile.common to get # dependencies right. -ifeq ($(WITH_LLVM_GCC), 1) - BYTECODE_LIBRARY = 1 -endif +BYTECODE_LIBRARY = 1 # Include LLVM's Master Makefile. include $(LLVM_OBJ_ROOT)/Makefile.common Modified: vmkit/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=134147&r1=134146&r2=134147&view=diff ============================================================================== --- vmkit/trunk/Makefile.config.in (original) +++ vmkit/trunk/Makefile.config.in Thu Jun 30 07:56:47 2011 @@ -15,6 +15,5 @@ SERVICE_BUILD = @SERVICE_BUILD@ SINGLE_BUILD = @SINGLE_BUILD@ WITH_64 = @WITH_64@ -WITH_LLVM_GCC = @WITH_LLVM_GCC@ ANT = @ANT@ Modified: vmkit/trunk/include/mvm/Threads/Locks.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Locks.h?rev=134147&r1=134146&r2=134147&view=diff ============================================================================== --- vmkit/trunk/include/mvm/Threads/Locks.h (original) +++ vmkit/trunk/include/mvm/Threads/Locks.h Thu Jun 30 07:56:47 2011 @@ -16,12 +16,8 @@ #include "mvm/Threads/Thread.h" -#ifdef WITH_LLVM_GCC extern "C" void __llvm_gcroot(void**, void*) __attribute__((nothrow)); #define llvm_gcroot(a, b) __llvm_gcroot((void**)&a, b) -#else -#define llvm_gcroot(a, b) -#endif class gc; Modified: vmkit/trunk/include/mvm/VirtualMachine.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/VirtualMachine.h?rev=134147&r1=134146&r2=134147&view=diff ============================================================================== --- vmkit/trunk/include/mvm/VirtualMachine.h (original) +++ vmkit/trunk/include/mvm/VirtualMachine.h Thu Jun 30 07:56:47 2011 @@ -196,11 +196,7 @@ /// rendezvous - The rendezvous implementation for garbage collection. /// -#ifdef WITH_LLVM_GCC CooperativeCollectionRV rendezvous; -#else - UncooperativeCollectionRV rendezvous; -#endif //===----------------------------------------------------------------------===// // (3) Backtrace-related methods. Modified: vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp?rev=134147&r1=134146&r2=134147&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp (original) +++ vmkit/trunk/lib/J3/Compiler/JavaLLVMCompiler.cpp Thu Jun 30 07:56:47 2011 @@ -30,11 +30,7 @@ JavaIntrinsics(TheModule) { enabledException = true; -#ifdef WITH_LLVM_GCC cooperativeGC = true; -#else - cooperativeGC = false; -#endif initialiseAssessorInfo(); } Modified: vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp?rev=134147&r1=134146&r2=134147&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp (original) +++ vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp Thu Jun 30 07:56:47 2011 @@ -210,7 +210,6 @@ } -#ifdef WITH_LLVM_GCC void Thread::scanStack(uintptr_t closure) { StackWalker Walker(this); while (MethodInfo* MI = Walker.get()) { @@ -219,22 +218,6 @@ } } -#else - -void Thread::scanStack(uintptr_t closure) { - register unsigned int **max = (unsigned int**)(void*)this->baseSP; - if (mvm::Thread::get() != this) { - register unsigned int **cur = (unsigned int**)this->waitOnSP(); - for(; cur Author: geoffray Date: Thu Jun 30 08:28:31 2011 New Revision: 134149 URL: http://llvm.org/viewvc/llvm-project?rev=134149&view=rev Log: Remove last references of WITH_LLVM_GCC. Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/autoconf/configure.ac vmkit/trunk/configure Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134149&r1=134148&r2=134149&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 08:28:31 2011 @@ -25,7 +25,7 @@ # Include LLVM's Master Makefile. include $(LLVM_OBJ_ROOT)/Makefile.common -CXX.Flags += @LLVM_FLAGS@ @GC_FLAGS@ @VM_FLAGS@ @EXCEPTION_FLAGS@ -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti +CXX.Flags += @GC_FLAGS@ @VM_FLAGS@ @EXCEPTION_FLAGS@ -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti # GNU Classpath flags CLASSPATH_FLAGS = @classpathinclude@ Modified: vmkit/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134149&r1=134148&r2=134149&view=diff ============================================================================== --- vmkit/trunk/autoconf/configure.ac (original) +++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 08:28:31 2011 @@ -149,50 +149,6 @@ dnl=== dnl===-----------------------------------------------------------------------=== -AC_ARG_WITH(llvmgcc, - [AS_HELP_STRING(--with-llvmgcc, - [Compile with llvm-gcc])], - [[withllvm=yes]], - [[withllvm=no]], -) - -if test "x$withllvm" = "xyes"; then - WITH_LLVM_GCC=1 - LLVM_FLAGS=-DWITH_LLVM_GCC -fi - -AC_SUBST([WITH_LLVM_GCC]) -AC_SUBST([LLVM_FLAGS]) - -AC_ARG_WITH(thread, - [AS_HELP_STRING(--with-thread=something, - [Thread type ('common' or 'no')])], - [thread=$withval],[thread=common] -) - -AS_IF([test "x$thread" != "xno"], - [AC_CHECK_HEADER([pthread.h],, - [AC_MSG_WARN(phtread include NOT found)]) - AC_CHECK_LIB(pthread, pthread_create, [], - [AC_MSG_ERROR([pthread library not found])]) - ] -) - -if test "x$thread" = xcommon; then - AC_DEFINE([HAVE_PTHREAD], [1], [Using pthread library]) -fi - -AC_ARG_WITH(finalizer, - [AS_HELP_STRING(--with-finalizer, - [Compile with finalizer (default yes)])], - [[withfinalizer=$withfinalizer]], - [[withfinalizer=yes]], -) - -if test ! "x$withfinalizer" = "xyes"; then - VM_FLAGS="$VM_FLAGS -DWITHOUT_FINALIZER" -fi - dnl ************************************************************************** dnl Architecture dnl ************************************************************************** Modified: vmkit/trunk/configure URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134149&r1=134148&r2=134149&view=diff ============================================================================== --- vmkit/trunk/configure (original) +++ vmkit/trunk/configure Thu Jun 30 08:28:31 2011 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for vmkit 0.30svn. +# Generated by GNU Autoconf 2.67 for vmkit 0.30svn. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -321,7 +321,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -361,19 +361,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -535,7 +535,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -599,6 +599,7 @@ ac_unique_file=""Makefile.common.in"" ac_subst_vars='LTLIBOBJS LIBOBJS +EGREP LLVMGXX LLVMGCC INSTALL_DATA @@ -615,6 +616,7 @@ RANLIB MV MKDIR +GREP FIND DATE CP @@ -624,6 +626,14 @@ ac_ct_CXX CXXFLAGS CXX +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC WITH_N3 monopath WITH_N3_MONO @@ -650,18 +660,6 @@ GC_BOEHM GC_MMAP2 WITH_64 -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LLVM_FLAGS -WITH_LLVM_GCC DYLIB_EXTENSION target_os target_vendor @@ -721,9 +719,6 @@ enable_option_checking with_llvmsrc with_llvmobj -with_llvmgcc -with_thread -with_finalizer with_gc with_mmtk_plan with_vm_type @@ -810,8 +805,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -856,7 +852,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -882,7 +878,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1086,7 +1082,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1102,7 +1098,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1132,8 +1128,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1141,7 +1137,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1159,13 +1155,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1188,7 +1184,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1202,8 +1198,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1218,9 +1214,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1259,11 +1255,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1303,7 +1299,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1364,9 +1360,6 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-llvmsrc Location of LLVM Source Code --with-llvmobj Location of LLVM Object Code - --with-llvmgcc Compile with llvm-gcc - --with-thread=something Thread type ('common' or 'no') - --with-finalizer Compile with finalizer (default yes) --with-gc=something GC type ('mmtk' (requires llvm-gcc) 'single-mmap' 'multi-mmap' or 'boehm') --with-mmtk-plan=something @@ -1471,9 +1464,9 @@ if $ac_init_version; then cat <<\_ACEOF vmkit configure 0.30svn -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -1545,7 +1538,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1561,6 +1554,90 @@ } # ac_fn_c_try_cpp +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -1569,10 +1646,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1608,7 +1685,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1631,17 +1708,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ----------------------------------------- ## +( $as_echo "## ----------------------------------------- ## ## Report this to nicolas.geoffray at gmail.com ## -## ----------------------------------------- ## -_ASBOX +## ----------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1705,7 +1780,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1727,90 +1802,6 @@ } # ac_fn_c_check_header_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -1820,7 +1811,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1873,7 +1864,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1936,7 +1927,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by vmkit $as_me 0.30svn, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2046,11 +2037,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2084,11 +2073,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2101,11 +2088,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2119,11 +2104,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2178,7 +2161,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2193,7 +2181,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done @@ -2269,7 +2261,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2294,22 +2286,28 @@ if test ${srcdir} != "." ; then if test -f ${srcdir}/include/mvm/Config/config.h ; then - as_fn_error "Already configured in ${srcdir}" "$LINENO" 5 + as_fn_error $? "Already configured in ${srcdir}" "$LINENO" 5 fi fi ac_aux_dir= for ac_dir in $LLVM_SRC_ROOT/autoconf "$srcdir"/$LLVM_SRC_ROOT/autoconf; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in $LLVM_SRC_ROOT/autoconf \"$srcdir\"/$LLVM_SRC_ROOT/autoconf" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in $LLVM_SRC_ROOT/autoconf \"$srcdir\"/$LLVM_SRC_ROOT/autoconf" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2350,7 +2348,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -2361,16 +2359,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2395,7 +2393,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -2403,7 +2401,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2428,7 +2426,7 @@ ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi @@ -2436,7 +2434,7 @@ $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -2466,15 +2464,15 @@ else case $host in *-*-aix*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="AIX" vmkit_cv_platform_type="Unix" ;; *-*-irix*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="IRIX" vmkit_cv_platform_type="Unix" ;; *-*-cygwin*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="Cygwin" vmkit_cv_platform_type="Unix" ;; *-*-darwin*) @@ -2482,23 +2480,23 @@ vmkit_cv_os_type="Darwin" vmkit_cv_platform_type="Unix" ;; *-*-freebsd*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="FreeBSD" vmkit_cv_platform_type="Unix" ;; *-*-openbsd*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="OpenBSD" vmkit_cv_platform_type="Unix" ;; *-*-netbsd*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="NetBSD" vmkit_cv_platform_type="Unix" ;; *-*-hpux*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="HP-UX" vmkit_cv_platform_type="Unix" ;; *-*-interix*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="Interix" vmkit_cv_platform_type="Unix" ;; *-*-linux*) @@ -2506,19 +2504,19 @@ vmkit_cv_os_type="Linux" vmkit_cv_platform_type="Unix" ;; *-*-solaris*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="SunOS" vmkit_cv_platform_type="Unix" ;; *-*-win32*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="Win32" vmkit_cv_platform_type="Win32" ;; *-*-mingw*) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="MingW" vmkit_cv_platform_type="Win32" ;; *) - as_fn_error "Good luck porting vmkit to your host!" "$LINENO" 5 + as_fn_error $? "Good luck porting vmkit to your host!" "$LINENO" 5 vmkit_cv_os_type="Unknown" vmkit_cv_platform_type="Unknown" ;; esac @@ -2531,34 +2529,300 @@ -# Check whether --with-llvmgcc was given. -if test "${with_llvmgcc+set}" = set; then : - withval=$with_llvmgcc; withllvm=yes +case $target_cpu in + powerpc) + +$as_echo "#define WITH_64 0" >>confdefs.h + + WITH_64=0 +;; + *) + +$as_echo "#define WITH_64 1" >>confdefs.h + + WITH_64=1 +;; +esac + + + + +# Check whether --with-gc was given. +if test "${with_gc+set}" = set; then : + withval=$with_gc; gc=$withval else - withllvm=no + echo Using mmap2 as vvm gc type. + gc=single-mmap + + fi -if test "x$withllvm" = "xyes"; then - WITH_LLVM_GCC=1 - LLVM_FLAGS=-DWITH_LLVM_GCC + +# Check whether --with-mmtk-plan was given. +if test "${with_mmtk_plan+set}" = set; then : + withval=$with_mmtk_plan; MMTK_PLAN=$withval +else + MMTK_PLAN=org.mmtk.plan.marksweep.MS + fi +if test "x$gc" = "xboehm"; then + GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DGC_THREADS" + +$as_echo "#define USE_GC_BOEHM 1" >>confdefs.h + + GC_MMAP2=0 + GC_BOEHM=1 + GC_MMTK=0 -# Check whether --with-thread was given. -if test "${with_thread+set}" = set; then : - withval=$with_thread; thread=$withval + GC_LIBS=BoehmGC + case $target_os in + *linux*) + GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DUSE_GC_BOEHM -DGC_THREADS -DGC_LINUX_THREADS" + ;; + esac else - thread=common + if test "x$gc" = "xmmtk"; then + GC_MULTI_MMAP=0 -fi + GC_SINGLE_MMAP=1 + GC_MMAP2=0 -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' + GC_BOEHM=0 + + GC_MMTK=1 + + GC_LIBS=MMTk + GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK" + else + GC_LIBS=GCMmap2 + if test "x$gc" = "xmulti-mmap"; then + GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" + GC_MULTI_MMAP=1 + + GC_SINGLE_MMAP=0 + + else + GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" + GC_MULTI_MMAP=0 + + GC_SINGLE_MMAP=1 + + fi + +$as_echo "#define USE_GC_MMAP2 1" >>confdefs.h + + GC_MMAP2=1 + + GC_BOEHM=0 + + GC_MMTK=0 + + fi +fi + + + + + + +# Check whether --with-vm-type was given. +if test "${with_vm_type+set}" = set; then : + withval=$with_vm_type; vmtype=$withval +else + echo Using single as vm type. + vmtype=single + + +fi + + +if test "x$vmtype" = "xisolate"; then + VM_FLAGS="-DISOLATE" + ISOLATE_BUILD=1 + SERVICE_BUILD=0 + SINGLE_BUILD=0 +else + if test "x$vmtype" = "xservice"; then + VM_FLAGS="-DISOLATE -DSERVICE" + SERVICE_BUILD=1 + ISOLATE_BUILD=1 + SINGLE_BUILD=0 + else + SINGLE_BUILD=1 + ISOLATE_BUILD=0 + SERVICE_BUILD=0 + fi +fi + + + + + + + +# Check whether --with-exception-type was given. +if test "${with_exception_type+set}" = set; then : + withval=$with_exception_type; exceptiontype=$withval +else + echo Using check as exception type. + exceptiontype=check + + +fi + + + +# Check whether --with-runtime-exception-type was given. +if test "${with_runtime_exception_type+set}" = set; then : + withval=$with_runtime_exception_type; runtimeexceptiontype=$withval +else + echo Using setjmp as exception type. + exceptiontype=setjmp + + +fi + + +if test "x$exceptiontype" = "xdwarf"; then + EXCEPTION_FLAGS="-DDWARF_EXCEPTIONS -fexceptions" +fi + +if test "x$runtimeexceptiontype" = "xdwarf"; then + EXCEPTION_FLAGS+="-DRUNTIME_DWARF_EXCEPTIONS -fexceptions" +fi + +if test "x$runtimeexceptiontype" != "xdwarf"; then + if test "x$exceptiontype" != "xdwarf"; then + EXCEPTION_FLAGS="-fno-exceptions" + fi +fi + + + + +classpathversion=0.97.2; + + +# Check whether --with-gnu-classpath-libs was given. +if test "${with_gnu_classpath_libs+set}" = set; then : + withval=$with_gnu_classpath_libs; classpathlibs=$withval +else + classpathlibs=/usr/lib/classpath + +fi + + + +# Check whether --with-gnu-classpath-glibj was given. +if test "${with_gnu_classpath_glibj+set}" = set; then : + withval=$with_gnu_classpath_glibj; classpathglibj=$withval +else + classpathglibj=/usr/share/classpath/glibj.zip + +fi + + + +# Check whether --with-j3 was given. +if test "${with_j3+set}" = set; then : + withval=$with_j3; WITH_J3=$withval +else + WITH_J3=yes + +fi + + +classpathinclude="-I${classpathlibs}/../include -I/usr/include/classpath"; + +if test "x${WITH_J3}" = "xyes"; then + WITH_J3=1; + +$as_echo "#define WITH_J3 1" >>confdefs.h + +else + WITH_J3=0; +fi + + + + + + + + +# Check whether --with-pnet-local-prefix was given. +if test "${with_pnet_local_prefix+set}" = set; then : + withval=$with_pnet_local_prefix; pnetlocalprefix=$withval +else + echo Not using PNETlocal prefix. + pnetlocalprefix='' + + +fi + + + +# Check whether --with-pnetlib was given. +if test "${with_pnetlib+set}" = set; then : + withval=$with_pnetlib; pnetlibpath=$withval +else + pnetlibpath=/usr/lib/cscc/lib/ + +fi + + +WITH_N3=0 + +if test "x$pnetlocalprefix" != x; then + echo Using ${pnetlocalprefix} as PNET local prefix; + WITH_N3_PNETLIB=1; + WITH_N3=1; + +$as_echo "#define WITH_N3 1" >>confdefs.h + +else + WITH_N3_PNETLIB=0; +fi + + + + +N3_LIB=PNetLib + + + + +# Check whether --with-mono was given. +if test "${with_mono+set}" = set; then : + withval=$with_mono; monopath=$withval +else + echo Not using Mono + +fi + + +if test "x$monopath" != x; then + echo Building N3 with Mono; + WITH_N3_MONO=1; + WITH_N3=1; +else + WITH_N3_MONO=0; +fi + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -2857,8 +3121,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2972,9 +3236,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3016,8 +3279,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3074,9 +3337,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi @@ -3127,8 +3390,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3279,846 +3542,74 @@ va_list v; va_start (v,p); s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -if test "x$thread" != "xno"; then : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: phtread include NOT found" >&5 -$as_echo "$as_me: WARNING: phtread include NOT found" >&2;} -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -$as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_create (); -int -main () -{ -return pthread_create (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_create=yes -else - ac_cv_lib_pthread_pthread_create=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -else - as_fn_error "pthread library not found" "$LINENO" 5 -fi - - - -fi - -if test "x$thread" = xcommon; then - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - -fi - - -# Check whether --with-finalizer was given. -if test "${with_finalizer+set}" = set; then : - withval=$with_finalizer; withfinalizer=$withfinalizer -else - withfinalizer=yes -fi - - -if test ! "x$withfinalizer" = "xyes"; then - VM_FLAGS="$VM_FLAGS -DWITHOUT_FINALIZER" -fi - - -case $target_cpu in - powerpc) - -$as_echo "#define WITH_64 0" >>confdefs.h - - WITH_64=0 -;; - *) - -$as_echo "#define WITH_64 1" >>confdefs.h - - WITH_64=1 -;; -esac - - - - -# Check whether --with-gc was given. -if test "${with_gc+set}" = set; then : - withval=$with_gc; gc=$withval -else - echo Using mmap2 as vvm gc type. - gc=single-mmap - - -fi - - - -# Check whether --with-mmtk-plan was given. -if test "${with_mmtk_plan+set}" = set; then : - withval=$with_mmtk_plan; MMTK_PLAN=$withval -else - MMTK_PLAN=org.mmtk.plan.marksweep.MS - -fi - - -if test "x$gc" = "xboehm"; then - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DGC_THREADS" - -$as_echo "#define USE_GC_BOEHM 1" >>confdefs.h - - GC_MMAP2=0 - - GC_BOEHM=1 - - GC_MMTK=0 - - GC_LIBS=BoehmGC - case $target_os in - *linux*) - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DUSE_GC_BOEHM -DGC_THREADS -DGC_LINUX_THREADS" - ;; - esac -else - if test "x$gc" = "xmmtk"; then - GC_MULTI_MMAP=0 - - GC_SINGLE_MMAP=1 - - GC_MMAP2=0 - - GC_BOEHM=0 - - GC_MMTK=1 - - GC_LIBS=MMTk - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK" - else - GC_LIBS=GCMmap2 - if test "x$gc" = "xmulti-mmap"; then - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" - GC_MULTI_MMAP=1 - - GC_SINGLE_MMAP=0 - - else - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" - GC_MULTI_MMAP=0 - - GC_SINGLE_MMAP=1 - - fi - -$as_echo "#define USE_GC_MMAP2 1" >>confdefs.h - - GC_MMAP2=1 - - GC_BOEHM=0 - - GC_MMTK=0 - - fi -fi - - - - - - -# Check whether --with-vm-type was given. -if test "${with_vm_type+set}" = set; then : - withval=$with_vm_type; vmtype=$withval -else - echo Using single as vm type. - vmtype=single - - -fi - - -if test "x$vmtype" = "xisolate"; then - VM_FLAGS="-DISOLATE" - ISOLATE_BUILD=1 - SERVICE_BUILD=0 - SINGLE_BUILD=0 -else - if test "x$vmtype" = "xservice"; then - VM_FLAGS="-DISOLATE -DSERVICE" - SERVICE_BUILD=1 - ISOLATE_BUILD=1 - SINGLE_BUILD=0 - else - SINGLE_BUILD=1 - ISOLATE_BUILD=0 - SERVICE_BUILD=0 - fi -fi - - - - - - - -# Check whether --with-exception-type was given. -if test "${with_exception_type+set}" = set; then : - withval=$with_exception_type; exceptiontype=$withval -else - echo Using check as exception type. - exceptiontype=check - - -fi - - - -# Check whether --with-runtime-exception-type was given. -if test "${with_runtime_exception_type+set}" = set; then : - withval=$with_runtime_exception_type; runtimeexceptiontype=$withval -else - echo Using setjmp as exception type. - exceptiontype=setjmp - - -fi - - -if test "x$exceptiontype" = "xdwarf"; then - EXCEPTION_FLAGS="-DDWARF_EXCEPTIONS -fexceptions" -fi - -if test "x$runtimeexceptiontype" = "xdwarf"; then - EXCEPTION_FLAGS+="-DRUNTIME_DWARF_EXCEPTIONS -fexceptions" -fi - -if test "x$runtimeexceptiontype" != "xdwarf"; then - if test "x$exceptiontype" != "xdwarf"; then - EXCEPTION_FLAGS="-fno-exceptions" - fi -fi - - - - -classpathversion=0.97.2; - - -# Check whether --with-gnu-classpath-libs was given. -if test "${with_gnu_classpath_libs+set}" = set; then : - withval=$with_gnu_classpath_libs; classpathlibs=$withval -else - classpathlibs=/usr/lib/classpath - -fi - - - -# Check whether --with-gnu-classpath-glibj was given. -if test "${with_gnu_classpath_glibj+set}" = set; then : - withval=$with_gnu_classpath_glibj; classpathglibj=$withval -else - classpathglibj=/usr/share/classpath/glibj.zip - -fi - - - -# Check whether --with-j3 was given. -if test "${with_j3+set}" = set; then : - withval=$with_j3; WITH_J3=$withval -else - WITH_J3=yes - -fi - - -classpathinclude="-I${classpathlibs}/../include -I/usr/include/classpath"; - -if test "x${WITH_J3}" = "xyes"; then - WITH_J3=1; - -$as_echo "#define WITH_J3 1" >>confdefs.h - -else - WITH_J3=0; -fi - - - - - - - - -# Check whether --with-pnet-local-prefix was given. -if test "${with_pnet_local_prefix+set}" = set; then : - withval=$with_pnet_local_prefix; pnetlocalprefix=$withval -else - echo Not using PNETlocal prefix. - pnetlocalprefix='' - - -fi - - - -# Check whether --with-pnetlib was given. -if test "${with_pnetlib+set}" = set; then : - withval=$with_pnetlib; pnetlibpath=$withval -else - pnetlibpath=/usr/lib/cscc/lib/ - -fi - - -WITH_N3=0 + va_end (v); + return s; +} -if test "x$pnetlocalprefix" != x; then - echo Using ${pnetlocalprefix} as PNET local prefix; - WITH_N3_PNETLIB=1; - WITH_N3=1; +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -$as_echo "#define WITH_N3 1" >>confdefs.h +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; -else - WITH_N3_PNETLIB=0; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi - - - - -N3_LIB=PNetLib - - - - -# Check whether --with-mono was given. -if test "${with_mono+set}" = set; then : - withval=$with_mono; monopath=$withval -else - echo Not using Mono +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : - -if test "x$monopath" != x; then - echo Building N3 with Mono; - WITH_N3_MONO=1; - WITH_N3=1; -else - WITH_N3_MONO=0; fi - - - - - +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4162,7 +3653,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4178,11 +3669,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4221,7 +3712,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4237,18 +3728,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -4365,8 +3856,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -5639,7 +5130,7 @@ if test -z "$ANT"; then - as_fn_error "Apache ANT required for MMTk, but not found" "$LINENO" 5 + as_fn_error $? "Apache ANT required for MMTk, but not found" "$LINENO" 5 fi fi @@ -5847,147 +5338,408 @@ ;; esac -if test "$GCC" != "yes" && test "$ICC" != "yes" -then - as_fn_error "gcc|icc required but not found" "$LINENO" 5 +if test "$GCC" != "yes" && test "$ICC" != "yes" +then + as_fn_error $? "gcc|icc required but not found" "$LINENO" 5 +fi + +if test "$GXX" != "yes" && test "$IXX" != "yes" +then + as_fn_error $? "g++|icc required but not found" "$LINENO" 5 +fi + +if test "$GCC" = "yes" +then + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if !defined(__GNUC__) || __GNUC__ < 3 +#error Unsupported GCC version +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + as_fn_error $? "gcc 3.x required, but you have a lower version" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 +$as_echo_n "checking for inflate in -lz... " >&6; } +if test "${ac_cv_lib_z_inflate+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char inflate (); +int +main () +{ +return inflate (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_inflate=yes +else + ac_cv_lib_z_inflate=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 +$as_echo "$ac_cv_lib_z_inflate" >&6; } +if test "x$ac_cv_lib_z_inflate" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +else + \ + as_fn_error $? "You need to install the zlib package (z)." "$LINENO" 5 + +fi + + +if test "x$gc" = "xboehm"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 +$as_echo_n "checking for GC_malloc in -lgc... " >&6; } +if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char GC_malloc (); +int +main () +{ +return GC_malloc (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gc_GC_malloc=yes +else + ac_cv_lib_gc_GC_malloc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 +$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } +if test "x$ac_cv_lib_gc_GC_malloc" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGC 1 +_ACEOF + + LIBS="-lgc $LIBS" + +else + \ + as_fn_error $? "You need to install the boehm-gc package (gc)." "$LINENO" 5 + +fi + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP fi -if test "$GXX" != "yes" && test "$IXX" != "yes" -then - as_fn_error "g++|icc required but not found" "$LINENO" 5 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -if test "$GCC" = "yes" -then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if !defined(__GNUC__) || __GNUC__ < 3 -#error Unsupported GCC version -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - as_fn_error "gcc 3.x required, but you have a lower version" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_path_EGREP=$EGREP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if test "${ac_cv_lib_z_inflate+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inflate (); int main () { -return inflate (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - ac_cv_lib_z_inflate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_cv_header_stdc=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - LIBS="-lz $LIBS" +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : else - \ - as_fn_error "You need to install the zlib package (z)." "$LINENO" 5 + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi +rm -f conftest* +fi -if test "x$gc" = "xboehm"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 -$as_echo_n "checking for GC_malloc in -lgc... " >&6; } -if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif -char GC_malloc (); + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -return GC_malloc (); - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gc_GC_malloc=yes +if ac_fn_c_try_run "$LINENO"; then : + else - ac_cv_lib_gc_GC_malloc=no + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 -$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } -if test "x$ac_cv_lib_gc_GC_malloc" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGC 1 -_ACEOF - LIBS="-lgc $LIBS" +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -else - \ - as_fn_error "You need to install the boehm-gc package (gc)." "$LINENO" 5 +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi +done + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = x""yes; then : else \ - as_fn_error "You need to install the zlib devel package (zlib.h)." "$LINENO" 5 + as_fn_error $? "You need to install the zlib devel package (zlib.h)." "$LINENO" 5 fi @@ -5999,7 +5751,7 @@ else \ - as_fn_error "You need to install the boehm-gc devel package (gc/gc.h)." "$LINENO" 5 + as_fn_error $? "You need to install the boehm-gc devel package (gc/gc.h)." "$LINENO" 5 fi @@ -6075,7 +5827,7 @@ else - as_fn_error "Type int64_t required but not found" "$LINENO" 5 + as_fn_error $? "Type int64_t required but not found" "$LINENO" 5 fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" @@ -6096,7 +5848,7 @@ else - as_fn_error "Type uint64_t or u_int64_t required but not found" "$LINENO" 5 + as_fn_error $? "Type uint64_t or u_int64_t required but not found" "$LINENO" 5 fi fi @@ -6107,8 +5859,7 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -6229,6 +5980,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -6390,19 +6142,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -6598,7 +6350,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -6652,7 +6404,7 @@ # values after options handling. ac_log=" This file was extended by vmkit $as_me 0.30svn, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6718,10 +6470,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ vmkit config.status 0.30svn -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -6737,11 +6489,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -6763,6 +6520,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -6775,7 +6533,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -6784,7 +6542,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -6849,7 +6607,7 @@ "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; "lib/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -6887,7 +6645,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -6904,7 +6662,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -6918,18 +6676,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -7018,20 +6776,28 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -7059,7 +6825,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -7144,7 +6910,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -7157,7 +6923,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -7185,7 +6951,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -7212,7 +6978,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -7343,22 +7109,22 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -7369,19 +7135,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -7406,7 +7172,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -7427,7 +7193,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 From nicolas.geoffray at lip6.fr Thu Jun 30 06:50:38 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 13:50:38 -0000 Subject: [vmkit-commits] [vmkit] r134150 - in /vmkit/trunk: Makefile.common.in Makefile.config.in autoconf/configure.ac configure include/mvm/Allocator.h lib/J3/Compiler/JavaAOTCompiler.cpp lib/J3/LLVMRuntime/Makefile lib/J3/VMCore/JavaClass.cpp lib/J3/VMCore/JavaClass.h lib/Mvm/Compiler/JIT.cpp tools/llcj/llcj.cpp Message-ID: <20110630135038.73D152A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 08:50:38 2011 New Revision: 134150 URL: http://llvm.org/viewvc/llvm-project?rev=134150&view=rev Log: vmkit only supports MMTk. Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/Makefile.config.in vmkit/trunk/autoconf/configure.ac vmkit/trunk/configure vmkit/trunk/include/mvm/Allocator.h vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp vmkit/trunk/lib/J3/LLVMRuntime/Makefile vmkit/trunk/lib/J3/VMCore/JavaClass.cpp vmkit/trunk/lib/J3/VMCore/JavaClass.h vmkit/trunk/lib/Mvm/Compiler/JIT.cpp vmkit/trunk/tools/llcj/llcj.cpp Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 08:50:38 2011 @@ -36,9 +36,4 @@ LIBS += -lz -# GC configuration -ifeq ($(GCLIB), BoehmGC) - LIBS += -lgc -endif - include $(PROJ_SRC_ROOT)/Makefile.rules Modified: vmkit/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/Makefile.config.in (original) +++ vmkit/trunk/Makefile.config.in Thu Jun 30 08:50:38 2011 @@ -1,14 +1,8 @@ -GCLIB = @GC_LIBS@ WITH_N3 = @WITH_N3@ WITH_N3_PNETLIB = @WITH_N3_PNETLIB@ WITH_N3_MONO = @WITH_N3_MONO@ WITH_J3 = @WITH_J3@ N3_LIB = @N3_LIB@ -GC_MULTI_MMAP = @GC_MULTI_MMAP@ -GC_SINGLE_MMAP = @GC_SINGLE_MMAP@ -GC_BOEHM = @GC_BOEHM@ -GC_MMAP2 = @GC_MMAP2@ -GC_MMTK = @GC_MMTK@ MMTK_PLAN = @MMTK_PLAN@ MMTK_PLAN_HEADER = @MMTK_PLAN_HEADER@ ISOLATE_BUILD = @ISOLATE_BUILD@ Modified: vmkit/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/autoconf/configure.ac (original) +++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 08:50:38 2011 @@ -167,15 +167,6 @@ dnl ************************************************************************** dnl GC type dnl ************************************************************************** -AC_ARG_WITH(gc, - [AS_HELP_STRING(--with-gc=something, - [GC type ('mmtk' (requires llvm-gcc) 'single-mmap' 'multi-mmap' or 'boehm')])], - [[gc=$withval]], - [[ echo Using mmap2 as vvm gc type. - gc=single-mmap - ]] -) - AC_ARG_WITH(mmtk-plan, [AS_HELP_STRING(--with-mmtk-plan=something, [MMTk plan type ('org.mmtk.plan.marksweep.MS')])], @@ -183,47 +174,9 @@ [[MMTK_PLAN=org.mmtk.plan.marksweep.MS]] ) -if test "x$gc" = "xboehm"; then - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DGC_THREADS" - AC_DEFINE([USE_GC_BOEHM], [1], [Using the boehm gc]) - AC_SUBST(GC_MMAP2, [0]) - AC_SUBST(GC_BOEHM, [1]) - AC_SUBST(GC_MMTK, [0]) - GC_LIBS=BoehmGC - case $target_os in - *linux*) - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DUSE_GC_BOEHM -DGC_THREADS -DGC_LINUX_THREADS" - ;; - esac -else - if test "x$gc" = "xmmtk"; then - AC_SUBST([GC_MULTI_MMAP], [0]) - AC_SUBST([GC_SINGLE_MMAP], [1]) - AC_SUBST(GC_MMAP2, [0]) - AC_SUBST(GC_BOEHM, [0]) - AC_SUBST(GC_MMTK, [1]) - GC_LIBS=MMTk - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK" - else - GC_LIBS=GCMmap2 - if test "x$gc" = "xmulti-mmap"; then - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" - AC_SUBST([GC_MULTI_MMAP], [1]) - AC_SUBST([GC_SINGLE_MMAP], [0]) - else - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" - AC_SUBST([GC_MULTI_MMAP], [0]) - AC_SUBST([GC_SINGLE_MMAP], [1]) - fi - AC_DEFINE([USE_GC_MMAP2], [1], [Using the gcmmap2]) - AC_SUBST(GC_MMAP2, [1]) - AC_SUBST(GC_BOEHM, [0]) - AC_SUBST(GC_MMTK, [0]) - fi -fi +GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk" AC_SUBST([GC_FLAGS]) -AC_SUBST([GC_LIBS]) AC_SUBST([MMTK_PLAN]) dnl ************************************************************************** @@ -429,13 +382,7 @@ AC_PATH_PROG(LLVMAS, [llvm-as], [llvm-as]) AC_PATH_PROG(LLC, [llc], [llc]) - -if test "x$gc" = "xmmtk"; then - AC_PATH_PROG(ANT, [ant]) - if test -z "$ANT"; then - AC_MSG_ERROR([Apache ANT required for MMTk, but not found]) - fi -fi +AC_PATH_PROG(ANT, [ant]) dnl Find the install program AC_PROG_INSTALL @@ -508,11 +455,6 @@ [AC_MSG_ERROR([You need to install the zlib package (z).])] ) -if test "x$gc" = "xboehm"; then -AC_CHECK_LIB(gc, GC_malloc, [], \ - [AC_MSG_ERROR([You need to install the boehm-gc package (gc).])] -) -fi dnl===-----------------------------------------------------------------------=== dnl=== @@ -524,13 +466,6 @@ AC_MSG_ERROR([You need to install the zlib devel package (zlib.h).]) ) -if test "x$gc" = "xboehm"; then - AC_CHECK_HEADER([gc/gc.h], [], \ - AC_MSG_ERROR([You need to install the boehm-gc devel package (gc/gc.h).]) - ) -fi - - nl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 7: Check for types and structures Modified: vmkit/trunk/configure URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/configure (original) +++ vmkit/trunk/configure Thu Jun 30 08:50:38 2011 @@ -652,13 +652,7 @@ SERVICE_BUILD SINGLE_BUILD MMTK_PLAN -GC_LIBS GC_FLAGS -GC_SINGLE_MMAP -GC_MULTI_MMAP -GC_MMTK -GC_BOEHM -GC_MMAP2 WITH_64 DYLIB_EXTENSION target_os @@ -719,7 +713,6 @@ enable_option_checking with_llvmsrc with_llvmobj -with_gc with_mmtk_plan with_vm_type with_exception_type @@ -1360,8 +1353,6 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-llvmsrc Location of LLVM Source Code --with-llvmobj Location of LLVM Object Code - --with-gc=something GC type ('mmtk' (requires llvm-gcc) 'single-mmap' - 'multi-mmap' or 'boehm') --with-mmtk-plan=something MMTk plan type ('org.mmtk.plan.marksweep.MS') --with-vm-type=something @@ -2547,18 +2538,6 @@ -# Check whether --with-gc was given. -if test "${with_gc+set}" = set; then : - withval=$with_gc; gc=$withval -else - echo Using mmap2 as vvm gc type. - gc=single-mmap - - -fi - - - # Check whether --with-mmtk-plan was given. if test "${with_mmtk_plan+set}" = set; then : withval=$with_mmtk_plan; MMTK_PLAN=$withval @@ -2568,64 +2547,7 @@ fi -if test "x$gc" = "xboehm"; then - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DGC_THREADS" - -$as_echo "#define USE_GC_BOEHM 1" >>confdefs.h - - GC_MMAP2=0 - - GC_BOEHM=1 - - GC_MMTK=0 - - GC_LIBS=BoehmGC - case $target_os in - *linux*) - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DUSE_GC_BOEHM -DGC_THREADS -DGC_LINUX_THREADS" - ;; - esac -else - if test "x$gc" = "xmmtk"; then - GC_MULTI_MMAP=0 - - GC_SINGLE_MMAP=1 - - GC_MMAP2=0 - - GC_BOEHM=0 - - GC_MMTK=1 - - GC_LIBS=MMTk - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK" - else - GC_LIBS=GCMmap2 - if test "x$gc" = "xmulti-mmap"; then - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" - GC_MULTI_MMAP=1 - - GC_SINGLE_MMAP=0 - - else - GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator" - GC_MULTI_MMAP=0 - - GC_SINGLE_MMAP=1 - - fi - -$as_echo "#define USE_GC_MMAP2 1" >>confdefs.h - - GC_MMAP2=1 - - GC_BOEHM=0 - - GC_MMTK=0 - - fi -fi - +GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk" @@ -5087,9 +5009,7 @@ fi - -if test "x$gc" = "xmmtk"; then - # Extract the first word of "ant", so it can be a program name with args. +# Extract the first word of "ant", so it can be a program name with args. set dummy ant; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -5129,10 +5049,6 @@ fi - if test -z "$ANT"; then - as_fn_error $? "Apache ANT required for MMTk, but not found" "$LINENO" 5 - fi -fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -5421,57 +5337,6 @@ fi -if test "x$gc" = "xboehm"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 -$as_echo_n "checking for GC_malloc in -lgc... " >&6; } -if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char GC_malloc (); -int -main () -{ -return GC_malloc (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gc_GC_malloc=yes -else - ac_cv_lib_gc_GC_malloc=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 -$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } -if test "x$ac_cv_lib_gc_GC_malloc" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGC 1 -_ACEOF - - LIBS="-lgc $LIBS" - -else - \ - as_fn_error $? "You need to install the boehm-gc package (gc)." "$LINENO" 5 - -fi - -fi @@ -5745,20 +5610,6 @@ -if test "x$gc" = "xboehm"; then - ac_fn_c_check_header_mongrel "$LINENO" "gc/gc.h" "ac_cv_header_gc_gc_h" "$ac_includes_default" -if test "x$ac_cv_header_gc_gc_h" = x""yes; then : - -else - \ - as_fn_error $? "You need to install the boehm-gc devel package (gc/gc.h)." "$LINENO" 5 - -fi - - -fi - - nl===-----------------------------------------------------------------------=== ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" Modified: vmkit/trunk/include/mvm/Allocator.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Allocator.h?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/include/mvm/Allocator.h (original) +++ vmkit/trunk/include/mvm/Allocator.h Thu Jun 30 08:50:38 2011 @@ -30,15 +30,11 @@ llvm::BumpPtrAllocator Allocator; public: void* Allocate(size_t sz, const char* name) { -#ifdef USE_GC_BOEHM - return GC_MALLOC(sz); -#else TheLock.acquire(); void* res = Allocator.Allocate(sz, sizeof(void*)); TheLock.release(); memset(res, 0, sz); return res; -#endif } void Deallocate(void* obj) {} @@ -50,13 +46,9 @@ llvm::BumpPtrAllocator Allocator; public: void* Allocate(size_t sz) { -#ifdef USE_GC_BOEHM - return GC_MALLOC(sz); -#else void* res = Allocator.Allocate(sz, sizeof(void*)); memset(res, 0, sz); return res; -#endif } void Deallocate(void* obj) {} Modified: vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp (original) +++ vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp Thu Jun 30 08:50:38 2011 @@ -2204,8 +2204,7 @@ return JavaCompiler::loadMethod(handle, symbol); } -#ifdef WITH_MMTK - +// TODO: clean up to have a better interface with the fake GC. #include extern std::set __InternalSet__; @@ -2228,9 +2227,3 @@ } return currentClass; } - -#else -CommonClass* JavaAOTCompiler::getUniqueBaseClass(CommonClass* cl) { - return 0; -} -#endif Modified: vmkit/trunk/lib/J3/LLVMRuntime/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/Makefile?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/lib/J3/LLVMRuntime/Makefile (original) +++ vmkit/trunk/lib/J3/LLVMRuntime/Makefile Thu Jun 30 08:50:38 2011 @@ -12,11 +12,7 @@ VMKIT_RUNTIME = $(PROJ_SRC_DIR)/runtime-default.ll -ifeq ($(GC_MMTK), 1) VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-mmtk-thread.ll -else -VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-default-thread.ll -endif ifeq ($(ISOLATE_BUILD), 1) VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-isolate.ll Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.cpp?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/J3/VMCore/JavaClass.cpp Thu Jun 30 08:50:38 2011 @@ -629,12 +629,8 @@ } void* UserClass::allocateStaticInstance(Jnjvm* vm) { -#ifdef USE_GC_BOEHM - void* val = GC_MALLOC(getStaticSize()); -#else void* val = classLoader->allocator.Allocate(getStaticSize(), "Static instance"); -#endif setStaticInstance(val); return val; } Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.h?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/J3/VMCore/JavaClass.h Thu Jun 30 08:50:38 2011 @@ -368,12 +368,6 @@ // static UserCommonClass* resolvedImplClass(Jnjvm* vm, JavaObject* delegatee, bool doClinit); -#ifdef USE_GC_BOEHM - void* operator new(size_t sz, mvm::BumpPtrAllocator& allocator) { - return GC_MALLOC(sz); - } -#endif - }; /// ClassPrimitive - This class represents internal classes for primitive Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original) +++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Thu Jun 30 08:50:38 2011 @@ -397,10 +397,8 @@ addPass(PM, createVerifierPass()); // Verify that input is correct -#ifdef WITH_MMTK addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code addPass(PM, createInlineMallocPass()); -#endif // Create a new optimization pass for each one specified on the command line for (unsigned i = 0; i < PassList.size(); ++i) { Modified: vmkit/trunk/tools/llcj/llcj.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/llcj/llcj.cpp?rev=134150&r1=134149&r2=134150&view=diff ============================================================================== --- vmkit/trunk/tools/llcj/llcj.cpp (original) +++ vmkit/trunk/tools/llcj/llcj.cpp Thu Jun 30 08:50:38 2011 @@ -215,9 +215,6 @@ gccArgv[gccArgc++] = VMKITLibs2; gccArgv[gccArgc++] = VMKITLibs3; gccArgv[gccArgc++] = "-pthread"; -#ifdef USE_GC_BOEHM - gccArgv[gccArgc++] = "-lgc"; -#endif gccArgv[gccArgc++] = "-lm"; gccArgv[gccArgc++] = "-ldl"; gccArgv[gccArgc++] = "-lz"; From nicolas.geoffray at lip6.fr Thu Jun 30 06:59:55 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 13:59:55 -0000 Subject: [vmkit-commits] [vmkit] r134151 - in /vmkit/trunk: Makefile.common.in Makefile.config.in autoconf/configure.ac configure lib/J3/LLVMRuntime/Makefile Message-ID: <20110630135955.6EB1A2A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 08:59:55 2011 New Revision: 134151 URL: http://llvm.org/viewvc/llvm-project?rev=134151&view=rev Log: Remove all VM build configs directives. Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/Makefile.config.in vmkit/trunk/autoconf/configure.ac vmkit/trunk/configure vmkit/trunk/lib/J3/LLVMRuntime/Makefile Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134151&r1=134150&r2=134151&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 08:59:55 2011 @@ -25,7 +25,7 @@ # Include LLVM's Master Makefile. include $(LLVM_OBJ_ROOT)/Makefile.common -CXX.Flags += @GC_FLAGS@ @VM_FLAGS@ @EXCEPTION_FLAGS@ -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti +CXX.Flags += @GC_FLAGS@ @EXCEPTION_FLAGS@ -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti # GNU Classpath flags CLASSPATH_FLAGS = @classpathinclude@ Modified: vmkit/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=134151&r1=134150&r2=134151&view=diff ============================================================================== --- vmkit/trunk/Makefile.config.in (original) +++ vmkit/trunk/Makefile.config.in Thu Jun 30 08:59:55 2011 @@ -5,9 +5,6 @@ N3_LIB = @N3_LIB@ MMTK_PLAN = @MMTK_PLAN@ MMTK_PLAN_HEADER = @MMTK_PLAN_HEADER@ -ISOLATE_BUILD = @ISOLATE_BUILD@ -SERVICE_BUILD = @SERVICE_BUILD@ -SINGLE_BUILD = @SINGLE_BUILD@ WITH_64 = @WITH_64@ ANT = @ANT@ Modified: vmkit/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134151&r1=134150&r2=134151&view=diff ============================================================================== --- vmkit/trunk/autoconf/configure.ac (original) +++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 08:59:55 2011 @@ -180,41 +180,6 @@ AC_SUBST([MMTK_PLAN]) dnl ************************************************************************** -dnl Virtual Machine type -dnl ************************************************************************** -AC_ARG_WITH(vm-type, - [AS_HELP_STRING(--with-vm-type=something, - [VM type ('single' 'isolate' 'isolate-sharing' or 'service')])], - [[vmtype=$withval]], - [[ echo Using single as vm type. - vmtype=single - ]] -) - -if test "x$vmtype" = "xisolate"; then - VM_FLAGS="-DISOLATE" - ISOLATE_BUILD=1 - SERVICE_BUILD=0 - SINGLE_BUILD=0 -else - if test "x$vmtype" = "xservice"; then - VM_FLAGS="-DISOLATE -DSERVICE" - SERVICE_BUILD=1 - ISOLATE_BUILD=1 - SINGLE_BUILD=0 - else - SINGLE_BUILD=1 - ISOLATE_BUILD=0 - SERVICE_BUILD=0 - fi -fi - -AC_SUBST([SINGLE_BUILD]) -AC_SUBST([SERVICE_BUILD]) -AC_SUBST([ISOLATE_BUILD]) -AC_SUBST([VM_FLAGS]) - -dnl ************************************************************************** dnl Exception type dnl ************************************************************************** AC_ARG_WITH(exception-type, Modified: vmkit/trunk/configure URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134151&r1=134150&r2=134151&view=diff ============================================================================== --- vmkit/trunk/configure (original) +++ vmkit/trunk/configure Thu Jun 30 08:59:55 2011 @@ -647,10 +647,6 @@ classpathlibs classpathglibj EXCEPTION_FLAGS -VM_FLAGS -ISOLATE_BUILD -SERVICE_BUILD -SINGLE_BUILD MMTK_PLAN GC_FLAGS WITH_64 @@ -714,7 +710,6 @@ with_llvmsrc with_llvmobj with_mmtk_plan -with_vm_type with_exception_type with_runtime_exception_type with_gnu_classpath_libs @@ -1355,9 +1350,6 @@ --with-llvmobj Location of LLVM Object Code --with-mmtk-plan=something MMTk plan type ('org.mmtk.plan.marksweep.MS') - --with-vm-type=something - VM type ('single' 'isolate' 'isolate-sharing' or - 'service') --with-exception-type=something Exception type ('check' or 'dwarf') --with-runtime-exception-type=something @@ -2553,41 +2545,6 @@ -# Check whether --with-vm-type was given. -if test "${with_vm_type+set}" = set; then : - withval=$with_vm_type; vmtype=$withval -else - echo Using single as vm type. - vmtype=single - - -fi - - -if test "x$vmtype" = "xisolate"; then - VM_FLAGS="-DISOLATE" - ISOLATE_BUILD=1 - SERVICE_BUILD=0 - SINGLE_BUILD=0 -else - if test "x$vmtype" = "xservice"; then - VM_FLAGS="-DISOLATE -DSERVICE" - SERVICE_BUILD=1 - ISOLATE_BUILD=1 - SINGLE_BUILD=0 - else - SINGLE_BUILD=1 - ISOLATE_BUILD=0 - SERVICE_BUILD=0 - fi -fi - - - - - - - # Check whether --with-exception-type was given. if test "${with_exception_type+set}" = set; then : withval=$with_exception_type; exceptiontype=$withval Modified: vmkit/trunk/lib/J3/LLVMRuntime/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/Makefile?rev=134151&r1=134150&r2=134151&view=diff ============================================================================== --- vmkit/trunk/lib/J3/LLVMRuntime/Makefile (original) +++ vmkit/trunk/lib/J3/LLVMRuntime/Makefile Thu Jun 30 08:59:55 2011 @@ -11,20 +11,8 @@ include $(LEVEL)/Makefile.config VMKIT_RUNTIME = $(PROJ_SRC_DIR)/runtime-default.ll - VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-mmtk-thread.ll - -ifeq ($(ISOLATE_BUILD), 1) -VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-isolate.ll -endif - -ifeq ($(SERVICE_BUILD), 1) -VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-service.ll $(PROJ_SRC_DIR)/runtime-isolate.ll -endif - -ifeq ($(SINGLE_BUILD), 1) VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-single.ll -endif BUILT_SOURCES = LLVMRuntime.inc From nicolas.geoffray at lip6.fr Thu Jun 30 07:16:56 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 14:16:56 -0000 Subject: [vmkit-commits] [vmkit] r134154 - in /vmkit/trunk: Makefile.common.in autoconf/configure.ac configure include/mvm/Threads/Thread.h lib/J3/Compiler/ExceptionsCheck.inc lib/J3/Compiler/ExceptionsDwarf.inc lib/J3/Compiler/JavaJIT.cpp lib/J3/VMCore/JavaMetaJIT.cpp lib/J3/VMCore/JavaRuntimeJIT.cpp lib/J3/VMCore/JavaThread.h lib/Mvm/CommonThread/ctthread.cpp lib/Mvm/Compiler/JIT.cpp Message-ID: <20110630141656.5EB892A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 09:16:56 2011 New Revision: 134154 URL: http://llvm.org/viewvc/llvm-project?rev=134154&view=rev Log: Remove support for dwarf exceptions. Removed: vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc vmkit/trunk/lib/J3/Compiler/ExceptionsDwarf.inc Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/autoconf/configure.ac vmkit/trunk/configure vmkit/trunk/include/mvm/Threads/Thread.h vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp vmkit/trunk/lib/J3/VMCore/JavaThread.h vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 09:16:56 2011 @@ -25,7 +25,7 @@ # Include LLVM's Master Makefile. include $(LLVM_OBJ_ROOT)/Makefile.common -CXX.Flags += @GC_FLAGS@ @EXCEPTION_FLAGS@ -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti +CXX.Flags += @GC_FLAGS@ -fno-exceptions -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti # GNU Classpath flags CLASSPATH_FLAGS = @classpathinclude@ Modified: vmkit/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/autoconf/configure.ac (original) +++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 09:16:56 2011 @@ -180,43 +180,6 @@ AC_SUBST([MMTK_PLAN]) dnl ************************************************************************** -dnl Exception type -dnl ************************************************************************** -AC_ARG_WITH(exception-type, - [AS_HELP_STRING(--with-exception-type=something, - [Exception type ('check' or 'dwarf')])], - [[exceptiontype=$withval]], - [[ echo Using check as exception type. - exceptiontype=check - ]] -) - -AC_ARG_WITH(runtime-exception-type, - [AS_HELP_STRING(--with-runtime-exception-type=something, - [Runtime exception type ('setjmp' or 'dwarf')])], - [[runtimeexceptiontype=$withval]], - [[ echo Using setjmp as exception type. - exceptiontype=setjmp - ]] -) - -if test "x$exceptiontype" = "xdwarf"; then - EXCEPTION_FLAGS="-DDWARF_EXCEPTIONS -fexceptions" -fi - -if test "x$runtimeexceptiontype" = "xdwarf"; then - EXCEPTION_FLAGS+="-DRUNTIME_DWARF_EXCEPTIONS -fexceptions" -fi - -if test "x$runtimeexceptiontype" != "xdwarf"; then - if test "x$exceptiontype" != "xdwarf"; then - EXCEPTION_FLAGS="-fno-exceptions" - fi -fi - -AC_SUBST([EXCEPTION_FLAGS]) - -dnl ************************************************************************** dnl GNU CLASSPATH installation prefix dnl ************************************************************************** Modified: vmkit/trunk/configure URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/configure (original) +++ vmkit/trunk/configure Thu Jun 30 09:16:56 2011 @@ -646,7 +646,6 @@ classpathinclude classpathlibs classpathglibj -EXCEPTION_FLAGS MMTK_PLAN GC_FLAGS WITH_64 @@ -710,8 +709,6 @@ with_llvmsrc with_llvmobj with_mmtk_plan -with_exception_type -with_runtime_exception_type with_gnu_classpath_libs with_gnu_classpath_glibj with_j3 @@ -1350,10 +1347,6 @@ --with-llvmobj Location of LLVM Object Code --with-mmtk-plan=something MMTk plan type ('org.mmtk.plan.marksweep.MS') - --with-exception-type=something - Exception type ('check' or 'dwarf') - --with-runtime-exception-type=something - Runtime exception type ('setjmp' or 'dwarf') --with-gnu-classpath-libs=something GNU CLASSPATH libraries (default is /usr/lib/classpath) @@ -2545,46 +2538,6 @@ -# Check whether --with-exception-type was given. -if test "${with_exception_type+set}" = set; then : - withval=$with_exception_type; exceptiontype=$withval -else - echo Using check as exception type. - exceptiontype=check - - -fi - - - -# Check whether --with-runtime-exception-type was given. -if test "${with_runtime_exception_type+set}" = set; then : - withval=$with_runtime_exception_type; runtimeexceptiontype=$withval -else - echo Using setjmp as exception type. - exceptiontype=setjmp - - -fi - - -if test "x$exceptiontype" = "xdwarf"; then - EXCEPTION_FLAGS="-DDWARF_EXCEPTIONS -fexceptions" -fi - -if test "x$runtimeexceptiontype" = "xdwarf"; then - EXCEPTION_FLAGS+="-DRUNTIME_DWARF_EXCEPTIONS -fexceptions" -fi - -if test "x$runtimeexceptiontype" != "xdwarf"; then - if test "x$exceptiontype" != "xdwarf"; then - EXCEPTION_FLAGS="-fno-exceptions" - fi -fi - - - - classpathversion=0.97.2; Modified: vmkit/trunk/include/mvm/Threads/Thread.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/include/mvm/Threads/Thread.h (original) +++ vmkit/trunk/include/mvm/Threads/Thread.h Thu Jun 30 09:16:56 2011 @@ -17,22 +17,15 @@ #include "debug.h" #include "types.h" -#ifdef RUNTIME_DWARF_EXCEPTIONS - #define TRY try - #define CATCH catch(...) - #define IGNORE catch(...) { mvm::Thread::get()->clearException(); } - #define END_CATCH +#include +#if defined(__MACH__) + #define TRY { mvm::ExceptionBuffer __buffer__; if (!_setjmp(__buffer__.buffer)) #else - #include - #if defined(__MACH__) - #define TRY { mvm::ExceptionBuffer __buffer__; if (!_setjmp(__buffer__.buffer)) - #else - #define TRY { mvm::ExceptionBuffer __buffer__; if (!setjmp(__buffer__.buffer)) - #endif - #define CATCH else - #define IGNORE else { mvm::Thread::get()->clearException(); }} - #define END_CATCH } + #define TRY { mvm::ExceptionBuffer __buffer__; if (!setjmp(__buffer__.buffer)) #endif +#define CATCH else +#define IGNORE else { mvm::Thread::get()->clearException(); }} +#define END_CATCH } namespace mvm { @@ -146,12 +139,8 @@ class Thread : public CircularBase { public: Thread() { -#ifdef RUNTIME_DWARF_EXCEPTIONS - internalPendingException = 0; -#else - lastExceptionBuffer = 0; -#endif - lastKnownFrame = 0; + lastExceptionBuffer = 0; + lastKnownFrame = 0; } /// yield - Yield the processor to another thread. @@ -251,9 +240,6 @@ /// clearException - Clear any pending exception of the current thread. void clearException() { -#ifdef RUNTIME_DWARF_EXCEPTIONS - internalPendingException = 0; -#endif internalClearException(); } @@ -325,13 +311,9 @@ /// KnownFrame* lastKnownFrame; -#ifdef RUNTIME_DWARF_EXCEPTIONS - void* internalPendingException; -#else /// lastExceptionBuffer - The last exception buffer on this thread's stack. /// ExceptionBuffer* lastExceptionBuffer; -#endif void internalThrowException(); @@ -341,7 +323,6 @@ void endUnknownFrame(); }; -#ifndef RUNTIME_DWARF_EXCEPTIONS class ExceptionBuffer { public: ExceptionBuffer() { @@ -358,7 +339,6 @@ ExceptionBuffer* previousBuffer; jmp_buf buffer; }; -#endif /// StackWalker - This class walks the stack of threads, returning a MethodInfo /// object at each iteration. Removed: vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc?rev=134153&view=auto ============================================================================== --- vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc (original) +++ vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc (removed) @@ -1,542 +0,0 @@ -Instruction* JavaJIT::invoke(Value *F, std::vector& args, - const char* Name, - BasicBlock *InsertAtEnd) { - - Instruction* res = CallInst::Create(F, args.begin(), args.end(), Name, - InsertAtEnd); - DebugLoc DL = CreateLocation(); - res->setDebugLoc(DL); - - if (TheCompiler->hasExceptionsEnabled()) { - Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); - - // Get the Java exception. - Value* obj = 0; - - BasicBlock* ifNormal = createBasicBlock("no exception block"); - - Value* test = 0; - Constant* zero = intrinsics->JavaObjectNullConstant; - - // If F is a runtime intrinsic that does not access memory, use a hack - // that will prevent LLVM from moving the exception check: runtime - // intrinsics return the exception if an exception was raised. - if (F == intrinsics->InitialisationCheckFunction || - F == intrinsics->GetConstantPoolAtFunction || - F == intrinsics->GetArrayClassFunction || - F == intrinsics->GetClassDelegateeFunction) { - // Make the load volatile to force the instruction after the call. - // Otherwise, LLVM will merge the load with a previous load because - // the function is readnone. - obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); - test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); - Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - test = BinaryOperator::CreateAnd(test, T, "", currentBlock); - } else { - obj = new LoadInst(javaExceptionPtr, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - } - - BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); - - - if (!currentExceptionBlock->empty()) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - } - - currentBlock = ifNormal; - } - - return res; -} - -Instruction* JavaJIT::invoke(Value *F, Value* arg1, const char* Name, - BasicBlock *InsertAtEnd) { - - Instruction* res = CallInst::Create(F, arg1, Name, InsertAtEnd); - DebugLoc DL = CreateLocation(); - res->setDebugLoc(DL); - - if (TheCompiler->hasExceptionsEnabled()) { - Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); - - // Get the Java exception. - Value* obj = 0; - - BasicBlock* ifNormal = createBasicBlock("no exception block"); - - Value* test = 0; - Constant* zero = intrinsics->JavaObjectNullConstant; - if (F == intrinsics->InitialisationCheckFunction || - F == intrinsics->GetConstantPoolAtFunction || - F == intrinsics->GetArrayClassFunction || - F == intrinsics->GetClassDelegateeFunction) { - obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); - test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); - Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - test = BinaryOperator::CreateAnd(test, T, "", currentBlock); - } else { - obj = new LoadInst(javaExceptionPtr, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - } - - BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); - - if (!currentExceptionBlock->empty()) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - } - - currentBlock = ifNormal; - } - - return res; -} - -Instruction* JavaJIT::invoke(Value *F, Value* arg1, Value* arg2, - const char* Name, BasicBlock *InsertAtEnd) { - - Value* args[2] = { arg1, arg2 }; - - Instruction* res = CallInst::Create(F, args, args + 2, Name, InsertAtEnd); - DebugLoc DL = CreateLocation(); - res->setDebugLoc(DL); - - if (TheCompiler->hasExceptionsEnabled()) { - Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); - - // Get the Java exception. - Value* obj = 0; - - BasicBlock* ifNormal = createBasicBlock("no exception block"); - - Value* test = 0; - Constant* zero = intrinsics->JavaObjectNullConstant; - if (F == intrinsics->InitialisationCheckFunction || - F == intrinsics->GetConstantPoolAtFunction || - F == intrinsics->GetArrayClassFunction || - F == intrinsics->GetClassDelegateeFunction) { - obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); - test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); - Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - test = BinaryOperator::CreateAnd(test, T, "", currentBlock); - } else { - obj = new LoadInst(javaExceptionPtr, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - } - - BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); - - if (!currentExceptionBlock->empty()) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - } - - currentBlock = ifNormal; - } - - return res; -} - -Instruction* JavaJIT::invoke(Value *F, const char* Name, - BasicBlock *InsertAtEnd) { - Instruction* res = llvm::CallInst::Create(F, Name, InsertAtEnd); - DebugLoc DL = CreateLocation(); - res->setDebugLoc(DL); - - if (TheCompiler->hasExceptionsEnabled()) { - Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); - - // Get the Java exception. - Value* obj = 0; - - BasicBlock* ifNormal = createBasicBlock("no exception block"); - - Value* test = 0; - Constant* zero = intrinsics->JavaObjectNullConstant; - if (F == intrinsics->InitialisationCheckFunction || - F == intrinsics->GetConstantPoolAtFunction || - F == intrinsics->GetArrayClassFunction || - F == intrinsics->GetClassDelegateeFunction) { - obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); - test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); - Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - test = BinaryOperator::CreateAnd(test, T, "", currentBlock); - } else { - obj = new LoadInst(javaExceptionPtr, "", currentBlock); - test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); - } - - BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); - - if (!currentExceptionBlock->empty()) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - } - - currentBlock = ifNormal; - } - - return res; -} - -void JavaJIT::throwException(llvm::Function* F, Value* arg1) { - Instruction* obj = CallInst::Create(F, arg1, "", currentBlock); - DebugLoc DL = CreateLocation(); - obj->setDebugLoc(DL); - - if (currentExceptionBlock != endExceptionBlock) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - BranchInst::Create(currentExceptionBlock, currentBlock); - } else { - if (endNode) { - endNode->addIncoming(Constant::getNullValue(endNode->getType()), - currentBlock); - } - BranchInst::Create(endBlock, currentBlock); - } -} - -void JavaJIT::throwException(Value* obj) { - JITVerifyNull(obj); - Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); - - new StoreInst(obj, javaExceptionPtr, currentBlock); - if (currentExceptionBlock != endExceptionBlock) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - BranchInst::Create(currentExceptionBlock, currentBlock); - } else { - if (endNode) { - endNode->addIncoming(Constant::getNullValue(endNode->getType()), - currentBlock); - } - BranchInst::Create(endBlock, currentBlock); - } -} - -void JavaJIT::throwException(llvm::Function* F, Value** args, - uint32 nbArgs) { - Instruction* obj = CallInst::Create(F, args, args + nbArgs, "", currentBlock); - DebugLoc DL = CreateLocation(); - obj->setDebugLoc(DL); - - if (currentExceptionBlock != endExceptionBlock) { - Instruction* insn = currentExceptionBlock->begin(); - PHINode* node = dyn_cast(insn); - if (node) node->addIncoming(obj, currentBlock); - BranchInst::Create(currentExceptionBlock, currentBlock); - } else { - if (endNode) { - endNode->addIncoming(Constant::getNullValue(endNode->getType()), - currentBlock); - } - BranchInst::Create(endBlock, currentBlock); - } -} - -/// Handler - This class represents an exception handler. It is only needed -/// when parsing the .class file in the JIT, therefore it is only defined -/// here. The readExceptionTable function is the only function that makes -/// use of this class. -struct Handler { - - /// startpc - The bytecode number that begins the try clause. - uint32 startpc; - - /// endpc - The bytecode number that ends the try clause. - uint32 endpc; - - /// handlerpc - The bytecode number where the handler code starts. - uint32 handlerpc; - - /// catche - Index in the constant pool of the exception class. - uint16 catche; - - /// catchClass - The class of the exception: it must always be loaded before - /// reading the exception table so that we do not throw an exception - /// when compiling. - UserClass* catchClass; - - /// tester - The basic block that tests if the exception is handled by this - /// handler. If the handler is not the first of a list of handlers with the - /// same range, than this block is the catcher block. Otherwise, it is the - /// destination of the catcher block and of the handlers that do not handler - /// the exception. - llvm::BasicBlock* tester; - - /// javaHandler - The Java code that handles the exception. At this point, we - /// know we have caught and are handling the exception. The Java exception - /// object is the PHI node that begins this block. - llvm::BasicBlock* javaHandler; - -}; - -unsigned JavaJIT::readExceptionTable(Reader& reader, uint32 codeLen) { - - // This function uses currentBlock to simplify things. We save the current - // value of currentBlock to restore it at the end of the function - BasicBlock* temp = currentBlock; - - sint16 nbe = reader.readU2(); - sint16 sync = isSynchro(compilingMethod->access) ? 1 : 0; - nbe += sync; - - mvm::ThreadAllocator allocator; - // Loop over all handlers in the bytecode to initialize their values. - Handler* handlers = - (Handler*)allocator.Allocate(sizeof(Handler) * (nbe - sync)); - for (uint16 i = 0; i < nbe - sync; ++i) { - Handler* ex = &handlers[i]; - ex->startpc = reader.readU2(); - ex->endpc = reader.readU2(); - ex->handlerpc = reader.readU2(); - - ex->catche = reader.readU2(); - -#ifndef ISOLATE_SHARING - if (ex->catche) { - UserClass* cl = - (UserClass*)(compilingClass->ctpInfo->isClassLoaded(ex->catche)); - // When loading the class, we made sure that all exception classes - // were loaded, so cl must have a value. - assert(cl && "exception class has not been loaded"); - ex->catchClass = cl; - } else { - ex->catchClass = Classpath::newThrowable; - } -#endif - - ex->tester = createBasicBlock("testException"); - - // PHI Node for the exception object - PHINode::Create(intrinsics->JavaObjectType, 0, "", ex->tester); - - // Set the unwind destination of the instructions in the range of this - // handler to the test block of the handler. If an instruction already has - // a handler and thus is not the synchronize or regular end handler block, - // leave it as-is. - for (uint16 i = ex->startpc; i < ex->endpc; ++i) { - if (opcodeInfos[i].exceptionBlock == endExceptionBlock) { - opcodeInfos[i].exceptionBlock = ex->tester; - } - } - - // If the handler pc does not already have a block, create a new one. - if (!(opcodeInfos[ex->handlerpc].newBlock)) { - opcodeInfos[ex->handlerpc].newBlock = createBasicBlock("javaHandler"); - } - - // Set the Java handler for this exception. - ex->javaHandler = opcodeInfos[ex->handlerpc].newBlock; - opcodeInfos[ex->handlerpc].handler = true; - - if (ex->javaHandler->empty()) { - PHINode::Create(intrinsics->JavaObjectType, 0, "", ex->javaHandler); - } - - } - - // Loop over all handlers to implement their tester. - for (sint16 i = 0; i < nbe - sync; ++i) { - Handler* cur = &handlers[i]; - BasicBlock* bbNext = 0; - PHINode* javaNode = 0; - currentExceptionBlock = opcodeInfos[cur->handlerpc].exceptionBlock; - - // Look out where we go if we're not the handler for the exception. - if (i + 1 != nbe - sync) { - Handler* next = &handlers[i + 1]; - if (!(cur->startpc >= next->startpc && cur->endpc <= next->endpc)) { - // If there is no handler to go to (either one that has the same range - // or one that contains the range), then we jump to the end handler. - bbNext = endExceptionBlock; - } else { - // If there's a handler to goto, we jump to its tester block and record - // the exception PHI node to give our exception to the tester. - bbNext = next->tester; - javaNode = dyn_cast(bbNext->begin()); - assert(javaNode); - } - } else { - // If there's no handler after us, we jump to the end handler. - bbNext = endExceptionBlock; - } - - currentBlock = cur->tester; - - assert(cur->catchClass && - "Class not loaded when reading the exception table"); - - Value* VTVar = TheCompiler->getVirtualTable(cur->catchClass->virtualVT); - - -#ifdef SERVICE - // Verifies that the current isolate is not stopped. If it is, we don't - // catch the exception but resume unwinding. - JnjvmClassLoader* loader = compilingClass->classLoader;; - if (loader != loader->bootstrapLoader) { - Value* Isolate = getVMPtr(getMutatorThread()); - - Isolate = new LoadInst(Isolate, "", currentBlock); - Isolate = new BitCastInst(Isolate, intrinsics->ptrPtrType, "", currentBlock); - Value* Status = GetElementPtrInst::Create(Isolate, intrinsics->constantOne, "", - currentBlock); - Status = new LoadInst(Status, "", currentBlock); - Status = new PtrToIntInst(Status, Type::Int32Ty, "", currentBlock); - - Value* stopping = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, Status, - intrinsics->constantOne, ""); - - BasicBlock* raiseBlock = createBasicBlock("raiseBlock"); - BasicBlock* continueBlock = createBasicBlock("continueBlock"); - BranchInst::Create(raiseBlock, continueBlock, stopping, currentBlock); - currentBlock = raiseBlock; - BranchInst::Create(endExceptionBlock, currentBlock); - - currentBlock = continueBlock; - } -#endif - - // Get the Java exception. - Value* obj = currentBlock->begin(); - - Value* objVT = CallInst::Create(intrinsics->GetVTFunction, obj, "", - currentBlock); - - uint32 depth = cur->catchClass->virtualVT->depth; - Value* depthCl = ConstantInt::get(Type::getInt32Ty(*llvmContext), depth); - Value* cmp = 0; - - if (depth >= JavaVirtualTable::getDisplayLength()) { - Value* classArgs[2] = { objVT, VTVar }; - - cmp = CallInst::Create(intrinsics->IsSecondaryClassFunction, - classArgs, classArgs + 2, "", - currentBlock); - - } else { - - Value* inDisplay = CallInst::Create(intrinsics->GetDisplayFunction, - objVT, "", currentBlock); - - Value* displayArgs[2] = { inDisplay, depthCl }; - Value* VTInDisplay = CallInst::Create(intrinsics->GetVTInDisplayFunction, - displayArgs, displayArgs + 2, "", - currentBlock); - - cmp = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, VTInDisplay, VTVar, - ""); - } - - // Add the Java exception in the phi node of the handler. - Instruction* insn = cur->javaHandler->begin(); - PHINode* node = dyn_cast(insn); - assert(node && "malformed exceptions"); - node->addIncoming(obj, currentBlock); - - // Add the Java exception in the phi node of the next block. - if (javaNode) - javaNode->addIncoming(obj, currentBlock); - - // If we are catching this exception, then jump to the Java Handler, - // otherwise jump to our next handler. - BranchInst::Create(cur->javaHandler, bbNext, cmp, currentBlock); - - currentBlock = cur->javaHandler; - - // First thing in the handler: clear the exception. - Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); - - // Clear exceptions. - new StoreInst(intrinsics->JavaObjectNullConstant, javaExceptionPtr, - currentBlock); - -#if defined(SERVICE) - - // Change the isolate we are currently running, now that we have catched - // the exception: the exception may have been thrown by another isolate. - Value* mutatorThreadId = 0; - Value* OldIsolateID = 0; - Value* IsolateIDPtr = 0; - Value* OldIsolate = 0; - Value* NewIsolate = 0; - Value* IsolatePtr = 0; - currentBlock = cur->javaHandler; - if (loader != loader->bootstrapLoader) { - mutatorThreadId = getGetMutatorThreadPtr(); - IsolateIDPtr = getIsolateIDPtr(mutatorThreadId); - const Type* realType = PointerType::getUnqual(intrinsics->pointerSizeType); - IsolateIDPtr = new BitCastInst(IsolateIDPtr, realType, "", - currentBlock); - OldIsolateID = new LoadInst(IsolateIDPtr, "", currentBlock); - - Value* MyID = ConstantInt::get(intrinsics->pointerSizeType, - loader->getIsolate()->IsolateID); - - new StoreInst(MyID, IsolateIDPtr, currentBlock); - IsolatePtr = getVMPtr(mutatorThreadPtr); - - OldIsolate = new LoadInst(IsolatePtr, "", currentBlock); - NewIsolate = intrinsics->getIsolate(loader->getIsolate(), currentBlock); - new StoreInst(NewIsolate, IsolatePtr, currentBlock); - - } -#endif - - } - - // Restore currentBlock. - currentBlock = temp; - return nbe; -} - -void JavaJIT::finishExceptions() { - pred_iterator PI = pred_begin(endExceptionBlock); - pred_iterator PE = pred_end(endExceptionBlock); - if (PI == PE) { - endExceptionBlock->eraseFromParent(); - } else { - if (endNode) { - endNode->addIncoming(Constant::getNullValue(endNode->getType()), - endExceptionBlock); - } - BranchInst::Create(endBlock, endExceptionBlock); - } - - - PI = pred_begin(unifiedUnreachable); - PE = pred_end(unifiedUnreachable); - if (PI == PE) { - unifiedUnreachable->eraseFromParent(); - } else { - new UnreachableInst(*llvmContext, unifiedUnreachable); - } - - for (Function::iterator BI = llvmFunction->begin(), BE = llvmFunction->end(); - BI != BE; BI++) { - PI = pred_begin(BI); - PE = pred_end(BI); - if (PI == PE) { - Instruction* insn = BI->begin(); - PHINode* node = dyn_cast(insn); - if (node) { - node->replaceAllUsesWith(Constant::getNullValue(node->getType())); - node->eraseFromParent(); - } - } - } - -} Removed: vmkit/trunk/lib/J3/Compiler/ExceptionsDwarf.inc URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/ExceptionsDwarf.inc?rev=134153&view=auto ============================================================================== --- vmkit/trunk/lib/J3/Compiler/ExceptionsDwarf.inc (original) +++ vmkit/trunk/lib/J3/Compiler/ExceptionsDwarf.inc (removed) @@ -1,561 +0,0 @@ -Instruction* JavaJIT::invoke(Value *F, std::vector& args, - const char* Name, - BasicBlock *InsertAtEnd) { - - // means: is there a handler for me? - if (currentExceptionBlock != endExceptionBlock) { - BasicBlock* ifNormal = createBasicBlock("no exception block"); - currentBlock = ifNormal; - return llvm::InvokeInst::Create(F, ifNormal, currentExceptionBlock, - args.begin(), - args.end(), Name, InsertAtEnd); - } else { - return llvm::CallInst::Create(F, args.begin(), args.end(), Name, InsertAtEnd); - } -} - -Instruction* JavaJIT::invoke(Value *F, Value* arg1, const char* Name, - BasicBlock *InsertAtEnd) { - - // means: is there a handler for me? - if (currentExceptionBlock != endExceptionBlock) { - BasicBlock* ifNormal = createBasicBlock("no exception block"); - currentBlock = ifNormal; - Value* arg[1] = { arg1 }; - return InvokeInst::Create(F, ifNormal, currentExceptionBlock, - arg, arg + 1, Name, InsertAtEnd); - } else { - return CallInst::Create(F, arg1, Name, InsertAtEnd); - } -} - -Instruction* JavaJIT::invoke(Value *F, Value* arg1, Value* arg2, - const char* Name, BasicBlock *InsertAtEnd) { - - Value* args[2] = { arg1, arg2 }; - - // means: is there a handler for me? - if (currentExceptionBlock != endExceptionBlock) { - BasicBlock* ifNormal = createBasicBlock("no exception block"); - currentBlock = ifNormal; - return InvokeInst::Create(F, ifNormal, currentExceptionBlock, - args, args + 2, Name, InsertAtEnd); - } else { - return CallInst::Create(F, args, args + 2, Name, InsertAtEnd); - } -} - -Instruction* JavaJIT::invoke(Value *F, const char* Name, - BasicBlock *InsertAtEnd) { - // means: is there a handler for me? - if (currentExceptionBlock != endExceptionBlock) { - BasicBlock* ifNormal = createBasicBlock("no exception block"); - currentBlock = ifNormal; - Value* args[1]; - return llvm::InvokeInst::Create(F, ifNormal, currentExceptionBlock, - args, args, Name, - InsertAtEnd); - } else { - return llvm::CallInst::Create(F, Name, InsertAtEnd); - } -} - -void JavaJIT::throwException(llvm::Function* F, Value* arg1) { - if (currentExceptionBlock != endExceptionBlock) { - Value* exArgs[1] = { arg1 }; - InvokeInst::Create(F, unifiedUnreachable, - currentExceptionBlock, exArgs, exArgs + 1, - "", currentBlock); - } else { - CallInst::Create(F, arg1, "", currentBlock); - new UnreachableInst(currentBlock); - } -} - -void JavaJIT::throwException(Value* obj) { - Function* F = module->ThrowExceptionFunction; - if (currentExceptionBlock != endExceptionBlock) { - Value* exArgs[1] = { obj }; - InvokeInst::Create(F, unifiedUnreachable, - currentExceptionBlock, exArgs, exArgs + 1, - "", currentBlock); - } else { - CallInst::Create(F, obj, "", currentBlock); - new UnreachableInst(currentBlock); - } -} - -void JavaJIT::throwException(llvm::Function* F, Value** args, - uint32 nbArgs) { - if (currentExceptionBlock != endExceptionBlock) { - InvokeInst::Create(F, unifiedUnreachable, - currentExceptionBlock, args, args + nbArgs, - "", currentBlock); - } else { - CallInst::Create(F, args, args + nbArgs, "", currentBlock); - new UnreachableInst(currentBlock); - } -} - -/// Handler - This class represents an exception handler. It is only needed -/// when parsing the .class file in the JIT, therefore it is only defined -/// here. The readExceptionTable function is the only function that makes -/// use of this class. -struct Handler { - - /// startpc - The bytecode number that begins the try clause. - uint32 startpc; - - /// endpc - The bytecode number that ends the try clause. - uint32 endpc; - - /// handlerpc - The bytecode number where the handler code starts. - uint32 handlerpc; - - /// catche - Index in the constant pool of the exception class. - uint16 catche; - - /// catchClass - The class of the exception: it must always be loaded before - /// reading the exception table so that we do not throw an exception - /// when compiling. - UserClass* catchClass; - - /// catcher - The basic block that catches the exception. The catcher deals - /// with LLVM codegen and declares the llvm.select method. This block is the - /// destination of invoke instructions that are in the try clause. - llvm::BasicBlock* catcher; - - /// tester - The basic block that tests if the exception is handled by this - /// handler. If the handler is not the first of a list of handlers with the - /// same range, than this block is the catcher block. Otherwise, it is the - /// destination of the catcher block and of the handlers that do not handler - /// the exception. - llvm::BasicBlock* tester; - - /// javaHandler - The Java code that handles the exception. At this point, we - /// know we have caught and are handling the exception. The Java exception - /// object is the PHI node that begins this block. - llvm::BasicBlock* javaHandler; - - /// nativeHandler - The CXX exception-related code that handles the exception. - /// The block clears the exception from the execution environment, calls - /// the CXX begin and end catch methods and jumps to the Java handler. - llvm::BasicBlock* nativeHandler; - - /// exceptionPHI - The CXX exception object for the tester block. The - /// tester has incoming blocks, either from the catcher or from other - /// handlers that don't handle the exception. Therefore each incoming block - /// specifies the CXX exception object that was caught. - llvm::PHINode* exceptionPHI; -}; - -unsigned JavaJIT::readExceptionTable(Reader& reader, uint32 codeLen) { - - // This function uses currentBlock to simplify things. We save the current - // value of currentBlock to restore it at the end of the function - BasicBlock* temp = currentBlock; - - sint16 nbe = reader.readU2(); - sint16 sync = isSynchro(compilingMethod->access) ? 1 : 0; - nbe += sync; - - // realEndExceptionBlock is the block where handlers will resume if - // they don't treat the exception. realEndExceptionBlock does not - // have to catch the exception. - BasicBlock* realEndExceptionBlock = endExceptionBlock; - - // endExceptionBlockCatcher is the block where every instruction will - // unwind. - BasicBlock* endExceptionBlockCatcher = endExceptionBlock; - - if (sync) { - // synchronizeExceptionBlock is the the block which will release the lock - // on the object. trySynchronizeExceptionBlock is the block which will - // catch the exception if one is thrown. - BasicBlock* synchronizeExceptionBlock = - createBasicBlock("synchronizeExceptionBlock"); - BasicBlock* trySynchronizeExceptionBlock = - createBasicBlock("trySynchronizeExceptionBlock"); - - // So synchronizeExceptionBlock becomes the block where every instructions - // will unwind. - realEndExceptionBlock = synchronizeExceptionBlock; - endExceptionBlockCatcher = trySynchronizeExceptionBlock; - Value* argsSync = 0; - if (isVirtual(compilingMethod->access)) { - argsSync = llvmFunction->arg_begin(); - } else { - Value* cl = module->getJavaClass(compilingClass); - argsSync = cl; - } - - // In the synchronizeExceptionBlock: release the object and go to - // endExceptionBlock, which will unwind the function. - - CallInst::Create(module->ReleaseObjectFunction, argsSync, "", - synchronizeExceptionBlock); - - BranchInst::Create(endExceptionBlock, synchronizeExceptionBlock); - - - // In the trySynchronizeExceptionBlock: catch the exception and move - // to synchronizeExceptionBlock. - - const PointerType* PointerTy_0 = module->ptrType; - Instruction* ptr_eh_ptr = CallInst::Create(module->llvmGetException, - "eh_ptr", - trySynchronizeExceptionBlock); - Constant* C = ConstantExpr::getCast(Instruction::BitCast, - module->personality, PointerTy_0); - Value* int32_eh_select_params[3] = - { ptr_eh_ptr, C, module->constantPtrNull }; - CallInst::Create(module->exceptionSelector, int32_eh_select_params, - int32_eh_select_params + 3, "eh_select", - trySynchronizeExceptionBlock); - - BranchInst::Create(synchronizeExceptionBlock, - trySynchronizeExceptionBlock); - - // Now we can set the unwind destination of all instructions to - // the exception catcher. - for (uint16 i = 0; i < codeLen; ++i) { - if (opcodeInfos[i].exceptionBlock == endExceptionBlock) { - opcodeInfos[i].exceptionBlock = trySynchronizeExceptionBlock; - } - } - } - - mvm::ThreadAllocator allocator; - // Loop over all handlers in the bytecode to initialize their values. - Handler* handlers = (Handler*) - allocator.Allocate(sizeof(Handler) * (nbe - sync)); - for (uint16 i = 0; i < nbe - sync; ++i) { - Handler* ex = &handlers[i]; - ex->startpc = reader.readU2(); - ex->endpc = reader.readU2(); - ex->handlerpc = reader.readU2(); - - ex->catche = reader.readU2(); - -#ifndef ISOLATE_SHARING - if (ex->catche) { - UserClass* cl = - (UserClass*)(compilingClass->ctpInfo->isClassLoaded(ex->catche)); - // When loading the class, we made sure that all exception classes - // were loaded, so cl must have a value. - assert(cl && "exception class has not been loaded"); - ex->catchClass = cl; - } else { - ex->catchClass = Classpath::newThrowable; - } -#endif - - ex->catcher = createBasicBlock("testException"); - - // Set the unwind destination of the instructions in the range of this - // handler to the test block of the handler. If an instruction already has - // a handler and thus is not the synchronize or regular end handler block, - // leave it as-is. - for (uint16 i = ex->startpc; i < ex->endpc; ++i) { - if (opcodeInfos[i].exceptionBlock == endExceptionBlockCatcher) { - opcodeInfos[i].exceptionBlock = ex->catcher; - } - } - - // If the handler pc does not already have a block, create a new one. - if (!(opcodeInfos[ex->handlerpc].newBlock)) { - opcodeInfos[ex->handlerpc].newBlock = createBasicBlock("javaHandler"); - } - - // Set the Java handler for this exception. - ex->javaHandler = opcodeInfos[ex->handlerpc].newBlock; - opcodeInfos[ex->handlerpc].handler = true; - - // Set the native handler of this exception, which will catch the exception - // object. - ex->nativeHandler = createBasicBlock("nativeHandler"); - } - - // Loop over all handlers to know which ones have the same range. Handlers - // with a same range all verify the exception's class, but only one catches - // the exception. This is the reason why we have a tester block - // and a catcher block: the first one tests the exception's class, and the - // second one catches the exception. - bool first = true; - for (sint16 i = 0; i < nbe - sync; ++i) { - Handler* cur = &handlers[i]; - - // If we are the first handler, we must have one block for catching - // the exception, and one block for comparing the exception. The former - // is catcher and the latter is tester. Handlers that live in - // the range of this handler will jump to tester because they - // have already catched the exception. The other instructions in the range - // of this handler will jump to catcher because the - // exception still has to be catched. - if (first) { - cur->tester = createBasicBlock("realTestException"); - } else { - cur->tester = cur->catcher; - } - - // Set the exception as a phi node. This PHI has two types of incoming - // nodes: - // - Handlers within the range: they have already catched the exception - // and verified its type. They are not the right handler for the - // exception, so they jump to this handler - // - The testException block of this handler (which is unique). It has - // catched the exception and is now jumping to perform the test. - cur->exceptionPHI = PHINode::Create(module->ptrType, "", cur->tester); - - // Look if the next handler has the same range or has a different range. - // If it's in the same range, then no need to catch the exception. - // Otherwise, it's a new range and we need to catch the exception. - if (i + 1 != nbe - sync) { - Handler* next = &handlers[i + 1]; - - if (cur->startpc == next->startpc && cur->endpc == next->endpc) { - first = false; - } else { - first = true; - } - } - } - - - // Loop over all handlers to implement their catcher and tester. - for (sint16 i = 0; i < nbe - sync; ++i) { - Handler* cur = &handlers[i]; - BasicBlock* bbNext = 0; - PHINode* nodeNext = 0; - currentExceptionBlock = opcodeInfos[cur->handlerpc].exceptionBlock; - - // Look out where we go if we're not the handler for the exception. - if (i + 1 != nbe - sync) { - Handler* next = &handlers[i + 1]; - if (!(cur->startpc >= next->startpc && cur->endpc <= next->endpc)) { - // If there is no handler to go to (either one that has the same range - // or one that contains the range), then we jump to the end handler. - bbNext = realEndExceptionBlock; - } else { - // If there's a handler to goto, we jump to its tester block and record - // the exception PHI node to give our exception to the tester. - bbNext = next->tester; - nodeNext = next->exceptionPHI; - } - } else { - // If there's no handler after us, we jump to the end handler. - bbNext = realEndExceptionBlock; - } - - // If the tester and the catcher is not the same, then we must implement - // the catcher. The catcher catches the exception, jumps to the tester - // and gives the exception as an incoming node the the exceptionPHI. - if (cur->tester != cur->catcher) { - const PointerType* PointerTy_0 = module->ptrType; - Instruction* ptr_eh_ptr = - CallInst::Create(module->llvmGetException, "eh_ptr", cur->catcher); - Constant* C = ConstantExpr::getCast(Instruction::BitCast, - module->personality, PointerTy_0); - Value* int32_eh_select_params[3] = - { ptr_eh_ptr, C, module->constantPtrNull }; - llvm::CallInst::Create(module->exceptionSelector, - int32_eh_select_params, - int32_eh_select_params + 3, "eh_select", - cur->catcher); - llvm::BranchInst::Create(cur->tester, cur->catcher); - cur->exceptionPHI->addIncoming(ptr_eh_ptr, cur->catcher); - } - - currentBlock = cur->tester; - - Value* clVar = 0; -#ifdef ISOLATE_SHARING - // We're dealing with exceptions, don't catch the exception if the class can - // not be found. - if (cur->catche) clVar = getResolvedClass(cur->catche, false, false, 0); - else clVar = CallInst::Create(module->GetJnjvmExceptionClassFunction, - isolateLocal, "", currentBlock); -#else - // We know catchClass exists because we have loaded all exceptions catched - // by the method when we loaded the class that defined this method. - clVar = module->getNativeClass(cur->catchClass); -#endif - if (clVar->getType() != module->JavaCommonClassType) - clVar = new BitCastInst(clVar, module->JavaCommonClassType, "", - currentBlock); - - -#ifdef SERVICE - // Verifies that the current isolate is not stopped. If it is, we don't - // catch the exception but resume unwinding. - JnjvmClassLoader* loader = compilingClass->classLoader;; - if (loader != loader->bootstrapLoader) { - Value* Isolate = getVMPtr(getMutatorThreadPtr()); - - Isolate = new LoadInst(Isolate, "", currentBlock); - Isolate = new BitCastInst(Isolate, module->ptrPtrType, "", currentBlock); - Value* Status = GetElementPtrInst::Create(Isolate, module->constantOne, "", - currentBlock); - Status = new LoadInst(Status, "", currentBlock); - Status = new PtrToIntInst(Status, Type::Int32Ty, "", currentBlock); - - Value* stopping = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, Status, - module->constantOne, ""); - - BasicBlock* raiseBlock = createBasicBlock("raiseBlock"); - BasicBlock* continueBlock = createBasicBlock("continueBlock"); - BranchInst::Create(raiseBlock, continueBlock, stopping, currentBlock); - currentBlock = raiseBlock; - BranchInst::Create(endExceptionBlock, currentBlock); - - currentBlock = continueBlock; - } -#endif - - Value* mutatorThreadId = getMutatorThreadPtr(); - Value* javaThreadId = getJavaThreadPtr(mutatorThreadId); - Value* javaExceptionPtr = getGetJavaExceptionPtr(javaThreadId); - - // Get the Java exception. - Value* obj = new LoadInst(javaExceptionPtr, "", currentBlock); - - Value* objCl = CallInst::Create(module->GetClassFunction, obj, "", - currentBlock); - - Value* depthCl = ConstantInt::get(Type::Int32Ty, cur->catchClass->depth); - Value* depthClObj = CallInst::Create(module->GetDepthFunction, objCl, "", - currentBlock); - - // Compare the exception with the exception class we catch. - Value* cmp = new ICmpInst(*currentBlock, ICmpInst::ICMP_ULE, depthCl, - depthClObj, ""); - - BasicBlock* supDepth = createBasicBlock("superior depth"); - - BranchInst::Create(supDepth, bbNext, cmp, currentBlock); - - if (nodeNext) - nodeNext->addIncoming(cur->exceptionPHI, currentBlock); - - currentBlock = supDepth; - Value* inDisplay = CallInst::Create(module->GetDisplayFunction, - objCl, "", currentBlock); - - Value* displayArgs[2] = { inDisplay, depthCl }; - Value* clInDisplay = CallInst::Create(module->GetClassInDisplayFunction, - displayArgs, displayArgs + 2, "", - currentBlock); - - cmp = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, clInDisplay, clVar, - ""); - - // If we are catching this exception, then jump to the nativeHandler, - // otherwise jump to our next handler. - BranchInst::Create(cur->nativeHandler, bbNext, cmp, currentBlock); - - // Add the incoming value to the next handler, which is the exception we - // just catched. - if (nodeNext) - nodeNext->addIncoming(cur->exceptionPHI, currentBlock); - - currentBlock = cur->nativeHandler; - - mutatorThreadId = getMutatorThreadPtr(); - javaThreadId = getJavaThreadPtr(mutatorThreadId); - javaExceptionPtr = getGetJavaExceptionPtr(javaThreadId); - - // Get the Java exception. - Value* exc = new LoadInst(javaExceptionPtr, "", currentBlock); - Value* cxxExceptionPtr = getCXXExceptionPtr(mutatorThreadId); - - // Clear exceptions. - new StoreInst(module->constantPtrNull, cxxExceptionPtr, currentBlock); - new StoreInst(module->JavaObjectNullConstant, javaExceptionPtr, - currentBlock); - - // Call the CXX begin and end catcher. - CallInst::Create(module->exceptionBeginCatch, cur->exceptionPHI, - "tmp8", cur->nativeHandler); - CallInst::Create(module->exceptionEndCatch, "", cur->nativeHandler); - - // We can now jump to the Java handler! - BranchInst::Create(cur->javaHandler, cur->nativeHandler); - - // If the Java handler is empty, create a PHI node that will contain the - // exception and give our own. - if (cur->javaHandler->empty()) { - PHINode* node = PHINode::Create(JnjvmModule::JavaObjectType, "", - cur->javaHandler); - node->addIncoming(exc, cur->nativeHandler); - - } else { - // If the Java handler is not empty, then the first instruction is the - // PHI node. Give it our own. - Instruction* insn = cur->javaHandler->begin(); - PHINode* node = dyn_cast(insn); - assert(node && "malformed exceptions"); - node->addIncoming(exc, cur->nativeHandler); - } - - -#if defined(SERVICE) - - // Change the isolate we are currently running, now that we have catched - // the exception: the exception may have been thrown by another isolate. - Value* mutatorThreadId = 0; - Value* OldIsolateID = 0; - Value* IsolateIDPtr = 0; - Value* OldIsolate = 0; - Value* NewIsolate = 0; - Value* IsolatePtr = 0; - currentBlock = cur->javaHandler; - if (loader != loader->bootstrapLoader) { - mutatorThreadId = getGetMutatorThreadPtr(); - IsolateIDPtr = getIsolateIDPtr(mutatorThreadId); - const Type* realType = PointerType::getUnqual(intrinsics->pointerSizeType); - IsolateIDPtr = new BitCastInst(IsolateIDPtr, realType, "", - currentBlock); - OldIsolateID = new LoadInst(IsolateIDPtr, "", currentBlock); - - Value* MyID = ConstantInt::get(intrinsics->pointerSizeType, - loader->getIsolate()->IsolateID); - - new StoreInst(MyID, IsolateIDPtr, currentBlock); - IsolatePtr = getVMPtr(mutatorThreadPtr); - - OldIsolate = new LoadInst(IsolatePtr, "", currentBlock); - NewIsolate = intrinsics->getIsolate(loader->getIsolate(), currentBlock); - new StoreInst(NewIsolate, IsolatePtr, currentBlock); - - } -#endif - - } - - // Restore currentBlock. - currentBlock = temp; - return nbe; - -} - -void JavaJIT::finishExceptions() { - pred_iterator PI = pred_begin(endExceptionBlock); - pred_iterator PE = pred_end(endExceptionBlock); - if (PI == PE) { - endExceptionBlock->eraseFromParent(); - } else { - Value* cxxExceptionPtr = getCXXExceptionPtr(getMutatorThreadPtr()); - Value* cxxException = new LoadInst(cxxExceptionPtr, "", currentBlock); - llvm::CallInst::Create(module->unwindResume, cxxException, "", currentBlock); - new UnreachableInst(currentBlock); - } - - PI = pred_begin(unifiedUnreachable); - PE = pred_end(unifiedUnreachable); - if (PI == PE) { - unifiedUnreachable->eraseFromParent(); - } else { - new UnreachableInst(unifiedUnreachable); - } - -} Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp (original) +++ vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp Thu Jun 30 09:16:56 2011 @@ -2603,8 +2603,544 @@ return DL; } -#ifdef DWARF_EXCEPTIONS -#include "ExceptionsDwarf.inc" -#else -#include "ExceptionsCheck.inc" +Instruction* JavaJIT::invoke(Value *F, std::vector& args, + const char* Name, + BasicBlock *InsertAtEnd) { + + Instruction* res = CallInst::Create(F, args.begin(), args.end(), Name, + InsertAtEnd); + DebugLoc DL = CreateLocation(); + res->setDebugLoc(DL); + + if (TheCompiler->hasExceptionsEnabled()) { + Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); + + // Get the Java exception. + Value* obj = 0; + + BasicBlock* ifNormal = createBasicBlock("no exception block"); + + Value* test = 0; + Constant* zero = intrinsics->JavaObjectNullConstant; + + // If F is a runtime intrinsic that does not access memory, use a hack + // that will prevent LLVM from moving the exception check: runtime + // intrinsics return the exception if an exception was raised. + if (F == intrinsics->InitialisationCheckFunction || + F == intrinsics->GetConstantPoolAtFunction || + F == intrinsics->GetArrayClassFunction || + F == intrinsics->GetClassDelegateeFunction) { + // Make the load volatile to force the instruction after the call. + // Otherwise, LLVM will merge the load with a previous load because + // the function is readnone. + obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); + test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); + Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + test = BinaryOperator::CreateAnd(test, T, "", currentBlock); + } else { + obj = new LoadInst(javaExceptionPtr, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + } + + BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); + + + if (!currentExceptionBlock->empty()) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + } + + currentBlock = ifNormal; + } + + return res; +} + +Instruction* JavaJIT::invoke(Value *F, Value* arg1, const char* Name, + BasicBlock *InsertAtEnd) { + + Instruction* res = CallInst::Create(F, arg1, Name, InsertAtEnd); + DebugLoc DL = CreateLocation(); + res->setDebugLoc(DL); + + if (TheCompiler->hasExceptionsEnabled()) { + Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); + + // Get the Java exception. + Value* obj = 0; + + BasicBlock* ifNormal = createBasicBlock("no exception block"); + + Value* test = 0; + Constant* zero = intrinsics->JavaObjectNullConstant; + if (F == intrinsics->InitialisationCheckFunction || + F == intrinsics->GetConstantPoolAtFunction || + F == intrinsics->GetArrayClassFunction || + F == intrinsics->GetClassDelegateeFunction) { + obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); + test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); + Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + test = BinaryOperator::CreateAnd(test, T, "", currentBlock); + } else { + obj = new LoadInst(javaExceptionPtr, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + } + + BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); + + if (!currentExceptionBlock->empty()) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + } + + currentBlock = ifNormal; + } + + return res; +} + +Instruction* JavaJIT::invoke(Value *F, Value* arg1, Value* arg2, + const char* Name, BasicBlock *InsertAtEnd) { + + Value* args[2] = { arg1, arg2 }; + + Instruction* res = CallInst::Create(F, args, args + 2, Name, InsertAtEnd); + DebugLoc DL = CreateLocation(); + res->setDebugLoc(DL); + + if (TheCompiler->hasExceptionsEnabled()) { + Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); + + // Get the Java exception. + Value* obj = 0; + + BasicBlock* ifNormal = createBasicBlock("no exception block"); + + Value* test = 0; + Constant* zero = intrinsics->JavaObjectNullConstant; + if (F == intrinsics->InitialisationCheckFunction || + F == intrinsics->GetConstantPoolAtFunction || + F == intrinsics->GetArrayClassFunction || + F == intrinsics->GetClassDelegateeFunction) { + obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); + test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); + Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + test = BinaryOperator::CreateAnd(test, T, "", currentBlock); + } else { + obj = new LoadInst(javaExceptionPtr, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + } + + BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); + + if (!currentExceptionBlock->empty()) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + } + + currentBlock = ifNormal; + } + + return res; +} + +Instruction* JavaJIT::invoke(Value *F, const char* Name, + BasicBlock *InsertAtEnd) { + Instruction* res = llvm::CallInst::Create(F, Name, InsertAtEnd); + DebugLoc DL = CreateLocation(); + res->setDebugLoc(DL); + + if (TheCompiler->hasExceptionsEnabled()) { + Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); + + // Get the Java exception. + Value* obj = 0; + + BasicBlock* ifNormal = createBasicBlock("no exception block"); + + Value* test = 0; + Constant* zero = intrinsics->JavaObjectNullConstant; + if (F == intrinsics->InitialisationCheckFunction || + F == intrinsics->GetConstantPoolAtFunction || + F == intrinsics->GetArrayClassFunction || + F == intrinsics->GetClassDelegateeFunction) { + obj = new LoadInst(javaExceptionPtr, "", TheCompiler->useCooperativeGC(), currentBlock); + test = new BitCastInst(res, intrinsics->JavaObjectType, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, test, obj, ""); + Value* T = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + test = BinaryOperator::CreateAnd(test, T, "", currentBlock); + } else { + obj = new LoadInst(javaExceptionPtr, "", currentBlock); + test = new ICmpInst(*currentBlock, ICmpInst::ICMP_NE, obj, zero, ""); + } + + BranchInst::Create(currentExceptionBlock, ifNormal, test, currentBlock); + + if (!currentExceptionBlock->empty()) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + } + + currentBlock = ifNormal; + } + + return res; +} + +void JavaJIT::throwException(llvm::Function* F, Value* arg1) { + Instruction* obj = CallInst::Create(F, arg1, "", currentBlock); + DebugLoc DL = CreateLocation(); + obj->setDebugLoc(DL); + + if (currentExceptionBlock != endExceptionBlock) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + BranchInst::Create(currentExceptionBlock, currentBlock); + } else { + if (endNode) { + endNode->addIncoming(Constant::getNullValue(endNode->getType()), + currentBlock); + } + BranchInst::Create(endBlock, currentBlock); + } +} + +void JavaJIT::throwException(Value* obj) { + JITVerifyNull(obj); + Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); + + new StoreInst(obj, javaExceptionPtr, currentBlock); + if (currentExceptionBlock != endExceptionBlock) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + BranchInst::Create(currentExceptionBlock, currentBlock); + } else { + if (endNode) { + endNode->addIncoming(Constant::getNullValue(endNode->getType()), + currentBlock); + } + BranchInst::Create(endBlock, currentBlock); + } +} + +void JavaJIT::throwException(llvm::Function* F, Value** args, + uint32 nbArgs) { + Instruction* obj = CallInst::Create(F, args, args + nbArgs, "", currentBlock); + DebugLoc DL = CreateLocation(); + obj->setDebugLoc(DL); + + if (currentExceptionBlock != endExceptionBlock) { + Instruction* insn = currentExceptionBlock->begin(); + PHINode* node = dyn_cast(insn); + if (node) node->addIncoming(obj, currentBlock); + BranchInst::Create(currentExceptionBlock, currentBlock); + } else { + if (endNode) { + endNode->addIncoming(Constant::getNullValue(endNode->getType()), + currentBlock); + } + BranchInst::Create(endBlock, currentBlock); + } +} + +/// Handler - This class represents an exception handler. It is only needed +/// when parsing the .class file in the JIT, therefore it is only defined +/// here. The readExceptionTable function is the only function that makes +/// use of this class. +struct Handler { + + /// startpc - The bytecode number that begins the try clause. + uint32 startpc; + + /// endpc - The bytecode number that ends the try clause. + uint32 endpc; + + /// handlerpc - The bytecode number where the handler code starts. + uint32 handlerpc; + + /// catche - Index in the constant pool of the exception class. + uint16 catche; + + /// catchClass - The class of the exception: it must always be loaded before + /// reading the exception table so that we do not throw an exception + /// when compiling. + UserClass* catchClass; + + /// tester - The basic block that tests if the exception is handled by this + /// handler. If the handler is not the first of a list of handlers with the + /// same range, than this block is the catcher block. Otherwise, it is the + /// destination of the catcher block and of the handlers that do not handler + /// the exception. + llvm::BasicBlock* tester; + + /// javaHandler - The Java code that handles the exception. At this point, we + /// know we have caught and are handling the exception. The Java exception + /// object is the PHI node that begins this block. + llvm::BasicBlock* javaHandler; + +}; + +unsigned JavaJIT::readExceptionTable(Reader& reader, uint32 codeLen) { + + // This function uses currentBlock to simplify things. We save the current + // value of currentBlock to restore it at the end of the function + BasicBlock* temp = currentBlock; + + sint16 nbe = reader.readU2(); + sint16 sync = isSynchro(compilingMethod->access) ? 1 : 0; + nbe += sync; + + mvm::ThreadAllocator allocator; + // Loop over all handlers in the bytecode to initialize their values. + Handler* handlers = + (Handler*)allocator.Allocate(sizeof(Handler) * (nbe - sync)); + for (uint16 i = 0; i < nbe - sync; ++i) { + Handler* ex = &handlers[i]; + ex->startpc = reader.readU2(); + ex->endpc = reader.readU2(); + ex->handlerpc = reader.readU2(); + + ex->catche = reader.readU2(); + +#ifndef ISOLATE_SHARING + if (ex->catche) { + UserClass* cl = + (UserClass*)(compilingClass->ctpInfo->isClassLoaded(ex->catche)); + // When loading the class, we made sure that all exception classes + // were loaded, so cl must have a value. + assert(cl && "exception class has not been loaded"); + ex->catchClass = cl; + } else { + ex->catchClass = Classpath::newThrowable; + } #endif + + ex->tester = createBasicBlock("testException"); + + // PHI Node for the exception object + PHINode::Create(intrinsics->JavaObjectType, 0, "", ex->tester); + + // Set the unwind destination of the instructions in the range of this + // handler to the test block of the handler. If an instruction already has + // a handler and thus is not the synchronize or regular end handler block, + // leave it as-is. + for (uint16 i = ex->startpc; i < ex->endpc; ++i) { + if (opcodeInfos[i].exceptionBlock == endExceptionBlock) { + opcodeInfos[i].exceptionBlock = ex->tester; + } + } + + // If the handler pc does not already have a block, create a new one. + if (!(opcodeInfos[ex->handlerpc].newBlock)) { + opcodeInfos[ex->handlerpc].newBlock = createBasicBlock("javaHandler"); + } + + // Set the Java handler for this exception. + ex->javaHandler = opcodeInfos[ex->handlerpc].newBlock; + opcodeInfos[ex->handlerpc].handler = true; + + if (ex->javaHandler->empty()) { + PHINode::Create(intrinsics->JavaObjectType, 0, "", ex->javaHandler); + } + + } + + // Loop over all handlers to implement their tester. + for (sint16 i = 0; i < nbe - sync; ++i) { + Handler* cur = &handlers[i]; + BasicBlock* bbNext = 0; + PHINode* javaNode = 0; + currentExceptionBlock = opcodeInfos[cur->handlerpc].exceptionBlock; + + // Look out where we go if we're not the handler for the exception. + if (i + 1 != nbe - sync) { + Handler* next = &handlers[i + 1]; + if (!(cur->startpc >= next->startpc && cur->endpc <= next->endpc)) { + // If there is no handler to go to (either one that has the same range + // or one that contains the range), then we jump to the end handler. + bbNext = endExceptionBlock; + } else { + // If there's a handler to goto, we jump to its tester block and record + // the exception PHI node to give our exception to the tester. + bbNext = next->tester; + javaNode = dyn_cast(bbNext->begin()); + assert(javaNode); + } + } else { + // If there's no handler after us, we jump to the end handler. + bbNext = endExceptionBlock; + } + + currentBlock = cur->tester; + + assert(cur->catchClass && + "Class not loaded when reading the exception table"); + + Value* VTVar = TheCompiler->getVirtualTable(cur->catchClass->virtualVT); + + +#ifdef SERVICE + // Verifies that the current isolate is not stopped. If it is, we don't + // catch the exception but resume unwinding. + JnjvmClassLoader* loader = compilingClass->classLoader;; + if (loader != loader->bootstrapLoader) { + Value* Isolate = getVMPtr(getMutatorThread()); + + Isolate = new LoadInst(Isolate, "", currentBlock); + Isolate = new BitCastInst(Isolate, intrinsics->ptrPtrType, "", currentBlock); + Value* Status = GetElementPtrInst::Create(Isolate, intrinsics->constantOne, "", + currentBlock); + Status = new LoadInst(Status, "", currentBlock); + Status = new PtrToIntInst(Status, Type::Int32Ty, "", currentBlock); + + Value* stopping = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, Status, + intrinsics->constantOne, ""); + + BasicBlock* raiseBlock = createBasicBlock("raiseBlock"); + BasicBlock* continueBlock = createBasicBlock("continueBlock"); + BranchInst::Create(raiseBlock, continueBlock, stopping, currentBlock); + currentBlock = raiseBlock; + BranchInst::Create(endExceptionBlock, currentBlock); + + currentBlock = continueBlock; + } +#endif + + // Get the Java exception. + Value* obj = currentBlock->begin(); + + Value* objVT = CallInst::Create(intrinsics->GetVTFunction, obj, "", + currentBlock); + + uint32 depth = cur->catchClass->virtualVT->depth; + Value* depthCl = ConstantInt::get(Type::getInt32Ty(*llvmContext), depth); + Value* cmp = 0; + + if (depth >= JavaVirtualTable::getDisplayLength()) { + Value* classArgs[2] = { objVT, VTVar }; + + cmp = CallInst::Create(intrinsics->IsSecondaryClassFunction, + classArgs, classArgs + 2, "", + currentBlock); + + } else { + + Value* inDisplay = CallInst::Create(intrinsics->GetDisplayFunction, + objVT, "", currentBlock); + + Value* displayArgs[2] = { inDisplay, depthCl }; + Value* VTInDisplay = CallInst::Create(intrinsics->GetVTInDisplayFunction, + displayArgs, displayArgs + 2, "", + currentBlock); + + cmp = new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, VTInDisplay, VTVar, + ""); + } + + // Add the Java exception in the phi node of the handler. + Instruction* insn = cur->javaHandler->begin(); + PHINode* node = dyn_cast(insn); + assert(node && "malformed exceptions"); + node->addIncoming(obj, currentBlock); + + // Add the Java exception in the phi node of the next block. + if (javaNode) + javaNode->addIncoming(obj, currentBlock); + + // If we are catching this exception, then jump to the Java Handler, + // otherwise jump to our next handler. + BranchInst::Create(cur->javaHandler, bbNext, cmp, currentBlock); + + currentBlock = cur->javaHandler; + + // First thing in the handler: clear the exception. + Value* javaExceptionPtr = getJavaExceptionPtr(getJavaThreadPtr(getMutatorThreadPtr())); + + // Clear exceptions. + new StoreInst(intrinsics->JavaObjectNullConstant, javaExceptionPtr, + currentBlock); + +#if defined(SERVICE) + + // Change the isolate we are currently running, now that we have catched + // the exception: the exception may have been thrown by another isolate. + Value* mutatorThreadId = 0; + Value* OldIsolateID = 0; + Value* IsolateIDPtr = 0; + Value* OldIsolate = 0; + Value* NewIsolate = 0; + Value* IsolatePtr = 0; + currentBlock = cur->javaHandler; + if (loader != loader->bootstrapLoader) { + mutatorThreadId = getGetMutatorThreadPtr(); + IsolateIDPtr = getIsolateIDPtr(mutatorThreadId); + const Type* realType = PointerType::getUnqual(intrinsics->pointerSizeType); + IsolateIDPtr = new BitCastInst(IsolateIDPtr, realType, "", + currentBlock); + OldIsolateID = new LoadInst(IsolateIDPtr, "", currentBlock); + + Value* MyID = ConstantInt::get(intrinsics->pointerSizeType, + loader->getIsolate()->IsolateID); + + new StoreInst(MyID, IsolateIDPtr, currentBlock); + IsolatePtr = getVMPtr(mutatorThreadPtr); + + OldIsolate = new LoadInst(IsolatePtr, "", currentBlock); + NewIsolate = intrinsics->getIsolate(loader->getIsolate(), currentBlock); + new StoreInst(NewIsolate, IsolatePtr, currentBlock); + + } +#endif + + } + + // Restore currentBlock. + currentBlock = temp; + return nbe; +} + +void JavaJIT::finishExceptions() { + pred_iterator PI = pred_begin(endExceptionBlock); + pred_iterator PE = pred_end(endExceptionBlock); + if (PI == PE) { + endExceptionBlock->eraseFromParent(); + } else { + if (endNode) { + endNode->addIncoming(Constant::getNullValue(endNode->getType()), + endExceptionBlock); + } + BranchInst::Create(endBlock, endExceptionBlock); + } + + + PI = pred_begin(unifiedUnreachable); + PE = pred_end(unifiedUnreachable); + if (PI == PE) { + unifiedUnreachable->eraseFromParent(); + } else { + new UnreachableInst(*llvmContext, unifiedUnreachable); + } + + for (Function::iterator BI = llvmFunction->begin(), BE = llvmFunction->end(); + BI != BE; BI++) { + PI = pred_begin(BI); + PE = pred_end(BI); + if (PI == PE) { + Instruction* insn = BI->begin(); + PHINode* node = dyn_cast(insn); + if (node) { + node->replaceAllUsesWith(Constant::getNullValue(node->getType())); + node->eraseFromParent(); + } + } + } +} Modified: vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp (original) +++ vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp Thu Jun 30 09:16:56 2011 @@ -56,18 +56,9 @@ }\ } -#if defined(DWARF_EXCEPTIONS) - -#define DO_TRY try { -#define DO_CATCH } catch(...) { th->throwFromJava(); } \ - -#else - #define DO_TRY #define DO_CATCH if (th->pendingException) { th->throwFromJava(); } -#endif - //===----------------------------------------------------------------------===// // We do not need to have special care on the GC-pointers in the buffer // manipulated in these functions because the objects in the buffer are Modified: vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp (original) +++ vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp Thu Jun 30 09:16:56 2011 @@ -399,12 +399,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -420,12 +415,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -441,12 +431,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -462,12 +447,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -483,12 +463,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -507,12 +482,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -531,12 +501,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -552,12 +517,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - return exc; } @@ -574,12 +534,7 @@ END_NATIVE_EXCEPTION -#ifdef DWARF_EXCEPTIONS - th->throwException(exc); -#else th->pendingException = exc; -#endif - } extern "C" void* j3StringLookup(UserClass* cl, uint32 index) { Modified: vmkit/trunk/lib/J3/VMCore/JavaThread.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaThread.h?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/JavaThread.h (original) +++ vmkit/trunk/lib/J3/VMCore/JavaThread.h Thu Jun 30 09:16:56 2011 @@ -169,9 +169,6 @@ /// throwFromNative - Throw an exception after executing Native code. /// void throwFromNative() { -#ifdef DWARF_EXCEPTIONS - throwPendingException(); -#endif } /// throwFromJava - Throw an exception after executing Java code. Modified: vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp (original) +++ vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp Thu Jun 30 09:16:56 2011 @@ -100,31 +100,11 @@ #endif void Thread::internalThrowException() { -#ifdef RUNTIME_DWARF_EXCEPTIONS - // Use dlsym instead of getting the functions statically with extern "C" - // because gcc compiles exceptions differently. - typedef void* (*cxa_allocate_exception_type)(unsigned); - typedef void (*cxa_throw_type)(void*, void*, void*); - - static cxa_allocate_exception_type cxa_allocate_exception = - (cxa_allocate_exception_type)(uintptr_t) - dlsym(SELF_HANDLE, "__cxa_allocate_exception"); - - static cxa_throw_type cxa_throw = - (cxa_throw_type)(uintptr_t) - dlsym(SELF_HANDLE, "__cxa_throw"); - - void* exc = cxa_allocate_exception(0); - // 32 = sizeof(_Unwind_Exception) in libgcc... - internalPendingException = (void*)((uintptr_t)exc - 32); - cxa_throw(exc, 0, 0); -#else #if defined(__MACH__) _longjmp(lastExceptionBuffer->buffer, 1); #else longjmp(lastExceptionBuffer->buffer, 1); #endif -#endif } void Thread::printBacktrace() { Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=134154&r1=134153&r2=134154&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original) +++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Thu Jun 30 09:16:56 2011 @@ -124,11 +124,7 @@ llvm::NoFramePointerElim = true; llvm::DisablePrettyStackTrace = true; llvm::JITEmitDebugInfo = EmitDebugInfo; -#if DWARF_EXCEPTIONS - llvm::JITExceptionHandling = true; -#else llvm::JITExceptionHandling = false; -#endif // Disable branch fold for accurate line numbers. const char* commands[2] = { "vmkit", "-disable-branch-fold" }; From nicolas.geoffray at lip6.fr Thu Jun 30 07:37:02 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 14:37:02 -0000 Subject: [vmkit-commits] [vmkit] r134157 - in /vmkit/trunk: Makefile.config.in autoconf/configure.ac configure lib/Makefile Message-ID: <20110630143703.037FD2A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 09:37:02 2011 New Revision: 134157 URL: http://llvm.org/viewvc/llvm-project?rev=134157&view=rev Log: Remove more references to N3 and unused configs. Modified: vmkit/trunk/Makefile.config.in vmkit/trunk/autoconf/configure.ac vmkit/trunk/configure vmkit/trunk/lib/Makefile Modified: vmkit/trunk/Makefile.config.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=134157&r1=134156&r2=134157&view=diff ============================================================================== --- vmkit/trunk/Makefile.config.in (original) +++ vmkit/trunk/Makefile.config.in Thu Jun 30 09:37:02 2011 @@ -1,10 +1,4 @@ -WITH_N3 = @WITH_N3@ -WITH_N3_PNETLIB = @WITH_N3_PNETLIB@ -WITH_N3_MONO = @WITH_N3_MONO@ -WITH_J3 = @WITH_J3@ -N3_LIB = @N3_LIB@ MMTK_PLAN = @MMTK_PLAN@ MMTK_PLAN_HEADER = @MMTK_PLAN_HEADER@ WITH_64 = @WITH_64@ - ANT = @ANT@ Modified: vmkit/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134157&r1=134156&r2=134157&view=diff ============================================================================== --- vmkit/trunk/autoconf/configure.ac (original) +++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 09:37:02 2011 @@ -199,84 +199,12 @@ [[classpathglibj=/usr/share/classpath/glibj.zip]] ) -AC_ARG_WITH(j3, - [AS_HELP_STRING(--with-j3=yes|no, - [Build J3 (default is yes)])], - [[WITH_J3=$withval]], - [[WITH_J3=yes]] -) - classpathinclude="-I${classpathlibs}/../include -I/usr/include/classpath"; -if test "x${WITH_J3}" = "xyes"; then - WITH_J3=1; - AC_DEFINE([WITH_J3], [1], [With J3]) -else - WITH_J3=0; -fi - AC_SUBST([classpathglibj]) AC_SUBST([classpathlibs]) AC_SUBST([classpathinclude]) AC_SUBST([classpathversion]) -AC_SUBST([WITH_J3]) - -dnl ************************************************************************** -dnl Local PNet directory -dnl ************************************************************************** -AC_ARG_WITH(pnet-local-prefix, - [AS_HELP_STRING(--with-pnet-local-prefix=something, - [PNET local prefix (no default)])], - [[pnetlocalprefix=$withval]], - [[ echo Not using PNETlocal prefix. - pnetlocalprefix='' - ]] -) - -AC_ARG_WITH(pnetlib, - [AS_HELP_STRING(--with-pnetlib=something, - [Pnetlib's mscorlib.dll location (default is /usr/lib/cscc/lib/)])], - [[pnetlibpath=$withval]], - [[pnetlibpath=/usr/lib/cscc/lib/]] -) - -WITH_N3=0 - -if test "x$pnetlocalprefix" != x; then - echo Using ${pnetlocalprefix} as PNET local prefix; - WITH_N3_PNETLIB=1; - WITH_N3=1; - AC_DEFINE([WITH_N3], [1], [With N3]) -else - WITH_N3_PNETLIB=0; -fi - -AC_SUBST([pnetlocalprefix]) -AC_SUBST([WITH_N3_PNETLIB]) - -N3_LIB=PNetLib -AC_SUBST([N3_LIB]) -AC_SUBST([pnetlibpath]) - -AC_ARG_WITH(mono, - [AS_HELP_STRING(--with-mono=something, - [Mono's mscorlib.dll location (no default)])], - [[monopath=$withval]], - [[echo Not using Mono]] -) - -if test "x$monopath" != x; then - echo Building N3 with Mono; - WITH_N3_MONO=1; - WITH_N3=1; -else - WITH_N3_MONO=0; -fi - -AC_SUBST([WITH_N3_MONO]) -AC_SUBST([monopath]) - -AC_SUBST([WITH_N3]) dnl===-----------------------------------------------------------------------=== dnl=== @@ -315,64 +243,6 @@ dnl Find the install program AC_PROG_INSTALL -if test "$WITH_LLVMGCCDIR" = "default" ; then - LLVMGCC="llvm-gcc${EXEEXT}" - LLVMGXX="llvm-g++${EXEEXT}" - AC_PATH_PROG(LLVMGCC, $LLVMGCC, []) - AC_PATH_PROG(LLVMGXX, $LLVMGXX, []) -else - if test -z "$LLVMGCC"; then - LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" - fi - if test -z "$LLVMGXX"; then - LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" - fi - AC_SUBST(LLVMGCC,$LLVMGCC) - AC_SUBST(LLVMGXX,$LLVMGXX) -fi - -AC_MSG_CHECKING([tool compatibility]) - -dnl Ensure that compilation tools are GCC or a GNU compatible compiler such as -dnl ICC; we use GCC specific options in the makefiles so the compiler needs -dnl to support those options. -dnl "icc" emits gcc signatures -dnl "icc -no-gcc" emits no gcc signature BUT is still compatible -ICC=no -IXX=no -case $CC in - icc*|icpc*) - ICC=yes - IXX=yes - ;; - *) - ;; -esac - -if test "$GCC" != "yes" && test "$ICC" != "yes" -then - AC_MSG_ERROR([gcc|icc required but not found]) -fi - -dnl Ensure that compilation tools are GCC; we use GCC specific extensions -if test "$GXX" != "yes" && test "$IXX" != "yes" -then - AC_MSG_ERROR([g++|icc required but not found]) -fi - -dnl Verify that GCC is version 3.0 or higher -if test "$GCC" = "yes" -then - AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 -#error Unsupported GCC version -#endif -]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) -fi - -dnl Tool compatibility is okay if we make it here. -AC_MSG_RESULT([ok]) - - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 5: Check for libraries @@ -449,7 +319,6 @@ dnl Do special configuration of Makefiles AC_CONFIG_MAKEFILE(Makefile) -AC_CONFIG_MAKEFILE(lib/Makefile) AC_OUTPUT Modified: vmkit/trunk/configure URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134157&r1=134156&r2=134157&view=diff ============================================================================== --- vmkit/trunk/configure (original) +++ vmkit/trunk/configure Thu Jun 30 09:37:02 2011 @@ -600,8 +600,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS EGREP -LLVMGXX -LLVMGCC INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -634,14 +632,6 @@ LDFLAGS CFLAGS CC -WITH_N3 -monopath -WITH_N3_MONO -pnetlibpath -N3_LIB -WITH_N3_PNETLIB -pnetlocalprefix -WITH_J3 classpathversion classpathinclude classpathlibs @@ -711,10 +701,6 @@ with_mmtk_plan with_gnu_classpath_libs with_gnu_classpath_glibj -with_j3 -with_pnet_local_prefix -with_pnetlib -with_mono ' ac_precious_vars='build_alias host_alias @@ -1353,13 +1339,6 @@ --with-gnu-classpath-glibj Build J3 with GNU Classpath install (default is '/usr/share/classpath/glibj.zip') - --with-j3=yes|no Build J3 (default is yes) - --with-pnet-local-prefix=something - PNET local prefix (no default) - --with-pnetlib=something - Pnetlib's mscorlib.dll location (default is - /usr/lib/cscc/lib/) - --with-mono=something Mono's mscorlib.dll location (no default) Some influential environment variables: CC C compiler command @@ -2560,93 +2539,8 @@ fi - -# Check whether --with-j3 was given. -if test "${with_j3+set}" = set; then : - withval=$with_j3; WITH_J3=$withval -else - WITH_J3=yes - -fi - - classpathinclude="-I${classpathlibs}/../include -I/usr/include/classpath"; -if test "x${WITH_J3}" = "xyes"; then - WITH_J3=1; - -$as_echo "#define WITH_J3 1" >>confdefs.h - -else - WITH_J3=0; -fi - - - - - - - - -# Check whether --with-pnet-local-prefix was given. -if test "${with_pnet_local_prefix+set}" = set; then : - withval=$with_pnet_local_prefix; pnetlocalprefix=$withval -else - echo Not using PNETlocal prefix. - pnetlocalprefix='' - - -fi - - - -# Check whether --with-pnetlib was given. -if test "${with_pnetlib+set}" = set; then : - withval=$with_pnetlib; pnetlibpath=$withval -else - pnetlibpath=/usr/lib/cscc/lib/ - -fi - - -WITH_N3=0 - -if test "x$pnetlocalprefix" != x; then - echo Using ${pnetlocalprefix} as PNET local prefix; - WITH_N3_PNETLIB=1; - WITH_N3=1; - -$as_echo "#define WITH_N3 1" >>confdefs.h - -else - WITH_N3_PNETLIB=0; -fi - - - - -N3_LIB=PNetLib - - - - -# Check whether --with-mono was given. -if test "${with_mono+set}" = set; then : - withval=$with_mono; monopath=$withval -else - echo Not using Mono - -fi - - -if test "x$monopath" != x; then - echo Building N3 with Mono; - WITH_N3_MONO=1; - WITH_N3=1; -else - WITH_N3_MONO=0; -fi - @@ -5054,147 +4948,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -if test "$WITH_LLVMGCCDIR" = "default" ; then - LLVMGCC="llvm-gcc${EXEEXT}" - LLVMGXX="llvm-g++${EXEEXT}" - # Extract the first word of "$LLVMGCC", so it can be a program name with args. -set dummy $LLVMGCC; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LLVMGCC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $LLVMGCC in - [\\/]* | ?:[\\/]*) - ac_cv_path_LLVMGCC="$LLVMGCC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LLVMGCC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LLVMGCC=$ac_cv_path_LLVMGCC -if test -n "$LLVMGCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVMGCC" >&5 -$as_echo "$LLVMGCC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - # Extract the first word of "$LLVMGXX", so it can be a program name with args. -set dummy $LLVMGXX; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LLVMGXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $LLVMGXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_LLVMGXX="$LLVMGXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LLVMGXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LLVMGXX=$ac_cv_path_LLVMGXX -if test -n "$LLVMGXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVMGXX" >&5 -$as_echo "$LLVMGXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -else - if test -z "$LLVMGCC"; then - LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" - fi - if test -z "$LLVMGXX"; then - LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" - fi - LLVMGCC=$LLVMGCC - - LLVMGXX=$LLVMGXX - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking tool compatibility" >&5 -$as_echo_n "checking tool compatibility... " >&6; } - -ICC=no -IXX=no -case $CC in - icc*|icpc*) - ICC=yes - IXX=yes - ;; - *) - ;; -esac - -if test "$GCC" != "yes" && test "$ICC" != "yes" -then - as_fn_error $? "gcc|icc required but not found" "$LINENO" 5 -fi - -if test "$GXX" != "yes" && test "$IXX" != "yes" -then - as_fn_error $? "g++|icc required but not found" "$LINENO" 5 -fi - -if test "$GCC" = "yes" -then - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if !defined(__GNUC__) || __GNUC__ < 3 -#error Unsupported GCC version -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - as_fn_error $? "gcc 3.x required, but you have a lower version" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 @@ -5653,9 +5406,6 @@ ac_config_commands="$ac_config_commands Makefile" -ac_config_commands="$ac_config_commands lib/Makefile" - - cat >confcache <<\_ACEOF @@ -6366,7 +6116,6 @@ "mmtk/java/src/org/j3/config/Selected.java") CONFIG_FILES="$CONFIG_FILES mmtk/java/src/org/j3/config/Selected.java" ;; "mmtk/java/build.xml") CONFIG_FILES="$CONFIG_FILES mmtk/java/build.xml" ;; "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; - "lib/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac @@ -6921,8 +6670,6 @@ case $ac_file$ac_mode in "Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname Makefile` ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/Makefile Makefile ;; - "lib/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/Makefile` - ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/lib/Makefile lib/Makefile ;; esac done # for ac_tag Modified: vmkit/trunk/lib/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Makefile?rev=134157&r1=134156&r2=134157&view=diff ============================================================================== --- vmkit/trunk/lib/Makefile (original) +++ vmkit/trunk/lib/Makefile Thu Jun 30 09:37:02 2011 @@ -8,17 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL = .. -PARALLEL_DIRS = Mvm +PARALLEL_DIRS = Mvm J3 include $(LEVEL)/Makefile.config -ifeq ($(WITH_J3), 1) -PARALLEL_DIRS += J3 -endif - -ifeq ($(WITH_N3), 1) -PARALLEL_DIRS += N3 -endif - include $(LEVEL)/Makefile.common From nicolas.geoffray at lip6.fr Thu Jun 30 07:58:28 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 14:58:28 -0000 Subject: [vmkit-commits] [vmkit] r134159 - in /vmkit/trunk: Makefile.common.in autoconf/configure.ac configure include/j3/jni.h include/j3/jni_md.h lib/J3/Classpath/Makefile lib/J3/Compiler/Makefile lib/J3/IJvm/Makefile lib/J3/VMCore/Makefile Message-ID: <20110630145828.B3CC62A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 09:58:28 2011 New Revision: 134159 URL: http://llvm.org/viewvc/llvm-project?rev=134159&view=rev Log: Add jni.h and jni_md.h in j3 to avoid clang warnings. Added: vmkit/trunk/include/j3/jni.h vmkit/trunk/include/j3/jni_md.h Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/autoconf/configure.ac vmkit/trunk/configure vmkit/trunk/lib/J3/Classpath/Makefile vmkit/trunk/lib/J3/Compiler/Makefile vmkit/trunk/lib/J3/IJvm/Makefile vmkit/trunk/lib/J3/VMCore/Makefile Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 09:58:28 2011 @@ -28,7 +28,7 @@ CXX.Flags += @GC_FLAGS@ -fno-exceptions -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti # GNU Classpath flags -CLASSPATH_FLAGS = @classpathinclude@ +CLASSPATH_FLAGS = GLIBJ = @classpathglibj@ # Pnet location Modified: vmkit/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/autoconf/configure.ac (original) +++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 09:58:28 2011 @@ -199,11 +199,8 @@ [[classpathglibj=/usr/share/classpath/glibj.zip]] ) -classpathinclude="-I${classpathlibs}/../include -I/usr/include/classpath"; - AC_SUBST([classpathglibj]) AC_SUBST([classpathlibs]) -AC_SUBST([classpathinclude]) AC_SUBST([classpathversion]) dnl===-----------------------------------------------------------------------=== Modified: vmkit/trunk/configure URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/configure (original) +++ vmkit/trunk/configure Thu Jun 30 09:58:28 2011 @@ -633,7 +633,6 @@ CFLAGS CC classpathversion -classpathinclude classpathlibs classpathglibj MMTK_PLAN @@ -2539,9 +2538,6 @@ fi -classpathinclude="-I${classpathlibs}/../include -I/usr/include/classpath"; - - Added: vmkit/trunk/include/j3/jni.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/jni.h?rev=134159&view=auto ============================================================================== --- vmkit/trunk/include/j3/jni.h (added) +++ vmkit/trunk/include/j3/jni.h Thu Jun 30 09:58:28 2011 @@ -0,0 +1,1680 @@ +/* jni.h + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +/* Note: this file must be compilable by the C compiler (for now, + assuming GNU C is ok). This means you must never use `//' + comments, and all C++-specific code must be conditional on + __cplusplus. */ + +#ifndef _CLASSPATH_JNI_H +#define _CLASSPATH_JNI_H + +/* We include for compatibility with Sun's . */ +#include + +#include + +#include "jni_md.h" + +/* The VM might define jobject and friends. */ +#ifndef _CLASSPATH_VM_JNI_TYPES_DEFINED + +# ifdef __cplusplus + +/* Define dummy classes and then define the JNI types as pointers. */ +struct __jobject {}; +struct __jclass : __jobject {}; +struct __jstring : __jobject {}; +struct __jthrowable : __jobject {}; +struct __jweak : __jobject {}; +struct __jarray : __jobject {}; +struct __jobjectArray : __jarray {}; +struct __jbyteArray : __jarray {}; +struct __jshortArray : __jarray {}; +struct __jintArray : __jarray {}; +struct __jlongArray : __jarray {}; +struct __jbooleanArray : __jarray {}; +struct __jcharArray : __jarray {}; +struct __jfloatArray : __jarray {}; +struct __jdoubleArray : __jarray {}; + +typedef __jobject *jobject; +typedef __jclass *jclass; +typedef __jstring *jstring; +typedef __jthrowable *jthrowable; +typedef __jweak *jweak; +typedef __jarray *jarray; +typedef __jobjectArray *jobjectArray; +typedef __jbyteArray *jbyteArray; +typedef __jshortArray *jshortArray; +typedef __jintArray *jintArray; +typedef __jlongArray *jlongArray; +typedef __jbooleanArray *jbooleanArray; +typedef __jcharArray *jcharArray; +typedef __jfloatArray *jfloatArray; +typedef __jdoubleArray *jdoubleArray; + +#define JNI_TRUE true +#define JNI_FALSE false + +typedef struct _Jv_JNIEnv JNIEnv; +typedef struct _Jv_JavaVM JavaVM; + +# else /* __cplusplus */ + +/* For C, simply define the class types as generic pointers. */ +typedef void *jobject; +typedef jobject jclass; +typedef jobject jstring; +typedef jobject jthrowable; +typedef jobject jweak; +typedef jobject jarray; +typedef jobject jobjectArray; +typedef jobject jbyteArray; +typedef jobject jshortArray; +typedef jobject jintArray; +typedef jobject jlongArray; +typedef jobject jbooleanArray; +typedef jobject jcharArray; +typedef jobject jfloatArray; +typedef jobject jdoubleArray; + +#define JNI_TRUE 1 +#define JNI_FALSE 0 + +typedef const struct JNINativeInterface_ *JNIEnv; +typedef const struct JNIInvokeInterface_ *JavaVM; + +# endif /* __cplusplus */ + +#endif /* _CLASSPATH_VM_JNI_TYPES_DEFINED */ + +/* + * Before jni.h is #included within a typical JVM, the source code should + * #define _JNI_VM_INTERNAL_TYPES_DEFINED and provide the real declarations + * for 'jobject', 'jfieldID', 'jmethodID' and other implementation types. + * If _JNI_VM_INTERNAL_TYPES_DEFINED is not defined, the following + * declares the old versions of the types. + */ +#ifndef _CLASSPATH_VM_INTERNAL_TYPES_DEFINED +struct _jfieldID; +struct _jmethodID; +typedef struct _jfieldID *jfieldID; +typedef struct _jmethodID *jmethodID; + +enum _jobjectRefType +{ + JNIInvalidRefType = 0, + JNILocalRefType = 1, + JNIGlobalRefType = 2, + JNIWeakGlobalRefType = 3 +}; + +typedef enum _jobjectRefType jobjectRefType; +#endif + +/* Version numbers. */ +#define JNI_VERSION_1_1 0x00010001 +#define JNI_VERSION_1_2 0x00010002 +#define JNI_VERSION_1_4 0x00010004 +#define JNI_VERSION_1_6 0x00010006 + +/* Used when releasing array elements. */ +#define JNI_COMMIT 1 +#define JNI_ABORT 2 + +/* Error codes */ +#define JNI_OK 0 +#define JNI_ERR (-1) +#define JNI_EDETACHED (-2) +#define JNI_EVERSION (-3) + + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +/* These functions might be defined in libraries which we load; the + JNI implementation calls them at the appropriate times. */ +extern JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *, void *); +extern JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *, void *); + +/* This can be defined as JNIIMPORT or JNIEXPORT by the md file, + depending on whether this is the implementation or a user. */ +#ifndef _CLASSPATH_JNIIMPEXP +#define _CLASSPATH_JNIIMPEXP JNIIMPORT +#endif + +/* These functions are called by user code to start using the + invocation API. */ +extern _CLASSPATH_JNIIMPEXP jint JNICALL +JNI_GetDefaultJavaVMInitArgs (void *); + +extern _CLASSPATH_JNIIMPEXP jint JNICALL +JNI_CreateJavaVM (JavaVM **, void **, void *); + +extern _CLASSPATH_JNIIMPEXP jint JNICALL +JNI_GetCreatedJavaVMs (JavaVM **, jsize, jsize *); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +typedef union jvalue +{ + jboolean z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong j; + jfloat f; + jdouble d; + jobject l; +} jvalue; + +/* This structure is used when registering native methods. */ +typedef struct +{ + char *name; + char *signature; + void *fnPtr; /* Sigh. */ +} JNINativeMethod; + +struct JNINativeInterface_ +{ + void *reserved0; + void *reserved1; + void *reserved2; + void *reserved3; + + jint (JNICALL *GetVersion) (JNIEnv *); + jclass (JNICALL *DefineClass) (JNIEnv *, const char *, + jobject, const jbyte *, + jsize); + jclass (JNICALL *FindClass) (JNIEnv *, const char *); + + jmethodID (JNICALL *FromReflectedMethod) (JNIEnv *, jobject); + jfieldID (JNICALL *FromReflectedField) (JNIEnv *, jobject); + jobject (JNICALL *ToReflectedMethod) (JNIEnv *, jclass, + jmethodID, jboolean); + + jclass (JNICALL *GetSuperclass) (JNIEnv *, jclass); + jboolean (JNICALL *IsAssignableFrom) (JNIEnv *, jclass, jclass); + + jobject (JNICALL *ToReflectedField) (JNIEnv *, jclass, jfieldID, + jboolean); + + jint (JNICALL *Throw) (JNIEnv *, jthrowable); + jint (JNICALL *ThrowNew) (JNIEnv *, jclass, + const char *); + jthrowable (JNICALL *ExceptionOccurred) (JNIEnv *); + void (JNICALL *ExceptionDescribe) (JNIEnv *); + void (JNICALL *ExceptionClear) (JNIEnv *); + void (JNICALL *FatalError) (JNIEnv *, const char *); + + jint (JNICALL *PushLocalFrame) (JNIEnv *, jint); + jobject (JNICALL *PopLocalFrame) (JNIEnv *, jobject); + + jobject (JNICALL *NewGlobalRef) (JNIEnv *, jobject); + void (JNICALL *DeleteGlobalRef) (JNIEnv *, jobject); + void (JNICALL *DeleteLocalRef) (JNIEnv *, jobject); + jboolean (JNICALL *IsSameObject) (JNIEnv *, jobject, + jobject); + + jobject (JNICALL *NewLocalRef) (JNIEnv *, jobject); + jint (JNICALL *EnsureLocalCapacity) (JNIEnv *, jint); + + jobject (JNICALL *AllocObject) (JNIEnv *, jclass); + jobject (JNICALL *NewObject) (JNIEnv *, jclass, + jmethodID, ...); + jobject (JNICALL *NewObjectV) (JNIEnv *, jclass, + jmethodID, va_list); + jobject (JNICALL *NewObjectA) (JNIEnv *, jclass, + jmethodID, const jvalue *); + + jclass (JNICALL *GetObjectClass) (JNIEnv *, jobject); + jboolean (JNICALL *IsInstanceOf) (JNIEnv *, jobject, jclass); + jmethodID (JNICALL *GetMethodID) (JNIEnv *, jclass, + const char *, const char *); + + jobject (JNICALL *CallObjectMethod) (JNIEnv *, jobject, jmethodID, ...); + jobject (JNICALL *CallObjectMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jobject (JNICALL *CallObjectMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jboolean (JNICALL *CallBooleanMethod) (JNIEnv *, jobject, jmethodID, + ...); + jboolean (JNICALL *CallBooleanMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jboolean (JNICALL *CallBooleanMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jbyte (JNICALL *CallByteMethod) (JNIEnv *, jobject, jmethodID, ...); + jbyte (JNICALL *CallByteMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jbyte (JNICALL *CallByteMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jchar (JNICALL *CallCharMethod) (JNIEnv *, jobject, jmethodID, ...); + jchar (JNICALL *CallCharMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jchar (JNICALL *CallCharMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jshort (JNICALL *CallShortMethod) (JNIEnv *, jobject, jmethodID, ...); + jshort (JNICALL *CallShortMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jshort (JNICALL *CallShortMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jint (JNICALL *CallIntMethod) (JNIEnv *, jobject, jmethodID, ...); + jint (JNICALL *CallIntMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jint (JNICALL *CallIntMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jlong (JNICALL *CallLongMethod) (JNIEnv *, jobject, jmethodID, ...); + jlong (JNICALL *CallLongMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jlong (JNICALL *CallLongMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jfloat (JNICALL *CallFloatMethod) (JNIEnv *, jobject, jmethodID, ...); + jfloat (JNICALL *CallFloatMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jfloat (JNICALL *CallFloatMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + jdouble (JNICALL *CallDoubleMethod) (JNIEnv *, jobject, jmethodID, ...); + jdouble (JNICALL *CallDoubleMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + jdouble (JNICALL *CallDoubleMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + void (JNICALL *CallVoidMethod) (JNIEnv *, jobject, jmethodID, ...); + void (JNICALL *CallVoidMethodV) (JNIEnv *, jobject, jmethodID, + va_list); + void (JNICALL *CallVoidMethodA) (JNIEnv *, jobject, jmethodID, + const jvalue *); + + jobject (JNICALL *CallNonvirtualObjectMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jobject (JNICALL *CallNonvirtualObjectMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jobject (JNICALL *CallNonvirtualObjectMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jboolean (JNICALL *CallNonvirtualBooleanMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jboolean (JNICALL *CallNonvirtualBooleanMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jboolean (JNICALL *CallNonvirtualBooleanMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jbyte (JNICALL *CallNonvirtualByteMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jbyte (JNICALL *CallNonvirtualByteMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jbyte (JNICALL *CallNonvirtualByteMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jchar (JNICALL *CallNonvirtualCharMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jchar (JNICALL *CallNonvirtualCharMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jchar (JNICALL *CallNonvirtualCharMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jshort (JNICALL *CallNonvirtualShortMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jshort (JNICALL *CallNonvirtualShortMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jshort (JNICALL *CallNonvirtualShortMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jint (JNICALL *CallNonvirtualIntMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jint (JNICALL *CallNonvirtualIntMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jint (JNICALL *CallNonvirtualIntMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jlong (JNICALL *CallNonvirtualLongMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jlong (JNICALL *CallNonvirtualLongMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jlong (JNICALL *CallNonvirtualLongMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jfloat (JNICALL *CallNonvirtualFloatMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jfloat (JNICALL *CallNonvirtualFloatMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jfloat (JNICALL *CallNonvirtualFloatMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + jdouble (JNICALL *CallNonvirtualDoubleMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + jdouble (JNICALL *CallNonvirtualDoubleMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + jdouble (JNICALL *CallNonvirtualDoubleMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + void (JNICALL *CallNonvirtualVoidMethod) (JNIEnv *, jobject, jclass, + jmethodID, ...); + void (JNICALL *CallNonvirtualVoidMethodV) (JNIEnv *, jobject, jclass, + jmethodID, va_list); + void (JNICALL *CallNonvirtualVoidMethodA) (JNIEnv *, jobject, jclass, + jmethodID, const jvalue *); + + jfieldID (JNICALL *GetFieldID) (JNIEnv *, jclass, const char *, + const char *); + + jobject (JNICALL *GetObjectField) (JNIEnv *, jobject, jfieldID); + jboolean (JNICALL *GetBooleanField) (JNIEnv *, jobject, jfieldID); + jbyte (JNICALL *GetByteField) (JNIEnv *, jobject, jfieldID); + jchar (JNICALL *GetCharField) (JNIEnv *, jobject, jfieldID); + jshort (JNICALL *GetShortField) (JNIEnv *, jobject, jfieldID); + jint (JNICALL *GetIntField) (JNIEnv *, jobject, jfieldID); + jlong (JNICALL *GetLongField) (JNIEnv *, jobject, jfieldID); + jfloat (JNICALL *GetFloatField) (JNIEnv *, jobject, jfieldID); + jdouble (JNICALL *GetDoubleField) (JNIEnv *, jobject, jfieldID); + + void (JNICALL *SetObjectField) (JNIEnv *, jobject, + jfieldID, jobject); + void (JNICALL *SetBooleanField) (JNIEnv *, jobject, + jfieldID, jboolean); + void (JNICALL *SetByteField) (JNIEnv *, jobject, + jfieldID, jbyte); + void (JNICALL *SetCharField) (JNIEnv *, jobject, + jfieldID, jchar); + void (JNICALL *SetShortField) (JNIEnv *, jobject, + jfieldID, jshort); + void (JNICALL *SetIntField) (JNIEnv *, jobject, + jfieldID, jint); + void (JNICALL *SetLongField) (JNIEnv *, jobject, + jfieldID, jlong); + void (JNICALL *SetFloatField) (JNIEnv *, jobject, + jfieldID, jfloat); + void (JNICALL *SetDoubleField) (JNIEnv *, jobject, + jfieldID, jdouble); + + jmethodID (JNICALL *GetStaticMethodID) (JNIEnv *, jclass, const char *, + const char *); + + jobject (JNICALL *CallStaticObjectMethod) (JNIEnv *, jclass, jmethodID, + ...); + jobject (JNICALL *CallStaticObjectMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jobject (JNICALL *CallStaticObjectMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jboolean (JNICALL *CallStaticBooleanMethod) (JNIEnv *, jclass, jmethodID, + ...); + jboolean (JNICALL *CallStaticBooleanMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jboolean (JNICALL *CallStaticBooleanMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jbyte (JNICALL *CallStaticByteMethod) (JNIEnv *, jclass, jmethodID, + ...); + jbyte (JNICALL *CallStaticByteMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jbyte (JNICALL *CallStaticByteMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jchar (JNICALL *CallStaticCharMethod) (JNIEnv *, jclass, jmethodID, + ...); + jchar (JNICALL *CallStaticCharMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jchar (JNICALL *CallStaticCharMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jshort (JNICALL *CallStaticShortMethod) (JNIEnv *, jclass, jmethodID, + ...); + jshort (JNICALL *CallStaticShortMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jshort (JNICALL *CallStaticShortMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jint (JNICALL *CallStaticIntMethod) (JNIEnv *, jclass, jmethodID, + ...); + jint (JNICALL *CallStaticIntMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jint (JNICALL *CallStaticIntMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jlong (JNICALL *CallStaticLongMethod) (JNIEnv *, jclass, jmethodID, + ...); + jlong (JNICALL *CallStaticLongMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jlong (JNICALL *CallStaticLongMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jfloat (JNICALL *CallStaticFloatMethod) (JNIEnv *, jclass, jmethodID, + ...); + jfloat (JNICALL *CallStaticFloatMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jfloat (JNICALL *CallStaticFloatMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + jdouble (JNICALL *CallStaticDoubleMethod) (JNIEnv *, jclass, jmethodID, + ...); + jdouble (JNICALL *CallStaticDoubleMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + jdouble (JNICALL *CallStaticDoubleMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + void (JNICALL *CallStaticVoidMethod) (JNIEnv *, jclass, jmethodID, + ...); + void (JNICALL *CallStaticVoidMethodV) (JNIEnv *, jclass, jmethodID, + va_list); + void (JNICALL *CallStaticVoidMethodA) (JNIEnv *, jclass, jmethodID, + const jvalue *); + + jfieldID (JNICALL *GetStaticFieldID) (JNIEnv *, jclass, const char *, + const char *); + + jobject (JNICALL *GetStaticObjectField) (JNIEnv *, jclass, jfieldID); + jboolean (JNICALL *GetStaticBooleanField) (JNIEnv *, jclass, jfieldID); + jbyte (JNICALL *GetStaticByteField) (JNIEnv *, jclass, jfieldID); + jchar (JNICALL *GetStaticCharField) (JNIEnv *, jclass, jfieldID); + jshort (JNICALL *GetStaticShortField) (JNIEnv *, jclass, jfieldID); + jint (JNICALL *GetStaticIntField) (JNIEnv *, jclass, jfieldID); + jlong (JNICALL *GetStaticLongField) (JNIEnv *, jclass, jfieldID); + jfloat (JNICALL *GetStaticFloatField) (JNIEnv *, jclass, jfieldID); + jdouble (JNICALL *GetStaticDoubleField) (JNIEnv *, jclass, jfieldID); + + void (JNICALL *SetStaticObjectField) (JNIEnv *, jclass, + jfieldID, jobject); + void (JNICALL *SetStaticBooleanField) (JNIEnv *, jclass, + jfieldID, jboolean); + void (JNICALL *SetStaticByteField) (JNIEnv *, jclass, + jfieldID, jbyte); + void (JNICALL *SetStaticCharField) (JNIEnv *, jclass, + jfieldID, jchar); + void (JNICALL *SetStaticShortField) (JNIEnv *, jclass, + jfieldID, jshort); + void (JNICALL *SetStaticIntField) (JNIEnv *, jclass, + jfieldID, jint); + void (JNICALL *SetStaticLongField) (JNIEnv *, jclass, + jfieldID, jlong); + void (JNICALL *SetStaticFloatField) (JNIEnv *, jclass, + jfieldID, jfloat); + void (JNICALL *SetStaticDoubleField) (JNIEnv *, jclass, + jfieldID, jdouble); + + jstring (JNICALL *NewString) (JNIEnv *, const jchar *, jsize); + jsize (JNICALL *GetStringLength) (JNIEnv *, jstring); + const jchar * (JNICALL *GetStringChars) (JNIEnv *, jstring, jboolean *); + void (JNICALL *ReleaseStringChars) (JNIEnv *, jstring, const jchar *); + jstring (JNICALL *NewStringUTF) (JNIEnv *, const char *); + jsize (JNICALL *GetStringUTFLength) (JNIEnv *, jstring); + const char * (JNICALL *GetStringUTFChars) (JNIEnv *, jstring, jboolean *); + void (JNICALL *ReleaseStringUTFChars) (JNIEnv *, jstring, const char *); + jsize (JNICALL *GetArrayLength) (JNIEnv *, jarray); + jobjectArray (JNICALL *NewObjectArray) (JNIEnv *, jsize, jclass, jobject); + jobject (JNICALL *GetObjectArrayElement) (JNIEnv *, jobjectArray, jsize); + void (JNICALL *SetObjectArrayElement) (JNIEnv *, jobjectArray, jsize, + jobject); + + jbooleanArray (JNICALL *NewBooleanArray) (JNIEnv *, jsize); + jbyteArray (JNICALL *NewByteArray) (JNIEnv *, jsize); + jcharArray (JNICALL *NewCharArray) (JNIEnv *, jsize); + jshortArray (JNICALL *NewShortArray) (JNIEnv *, jsize); + jintArray (JNICALL *NewIntArray) (JNIEnv *, jsize); + jlongArray (JNICALL *NewLongArray) (JNIEnv *, jsize); + jfloatArray (JNICALL *NewFloatArray) (JNIEnv *, jsize); + jdoubleArray (JNICALL *NewDoubleArray) (JNIEnv *, jsize); + + jboolean * (JNICALL *GetBooleanArrayElements) (JNIEnv *, jbooleanArray, + jboolean *); + jbyte * (JNICALL *GetByteArrayElements) (JNIEnv *, jbyteArray, + jboolean *); + jchar * (JNICALL *GetCharArrayElements) (JNIEnv *, jcharArray, + jboolean *); + jshort * (JNICALL *GetShortArrayElements) (JNIEnv *, jshortArray, + jboolean *); + jint * (JNICALL *GetIntArrayElements) (JNIEnv *, jintArray, + jboolean *); + jlong * (JNICALL *GetLongArrayElements) (JNIEnv *, jlongArray, + jboolean *); + jfloat * (JNICALL *GetFloatArrayElements) (JNIEnv *, jfloatArray, + jboolean *); + jdouble * (JNICALL *GetDoubleArrayElements) (JNIEnv *, jdoubleArray, + jboolean *); + + void (JNICALL *ReleaseBooleanArrayElements) (JNIEnv *, jbooleanArray, + jboolean *, jint); + void (JNICALL *ReleaseByteArrayElements) (JNIEnv *, jbyteArray, + jbyte *, jint); + void (JNICALL *ReleaseCharArrayElements) (JNIEnv *, jcharArray, + jchar *, jint); + void (JNICALL *ReleaseShortArrayElements) (JNIEnv *, jshortArray, + jshort *, jint); + void (JNICALL *ReleaseIntArrayElements) (JNIEnv *, jintArray, + jint *, jint); + void (JNICALL *ReleaseLongArrayElements) (JNIEnv *, jlongArray, + jlong *, jint); + void (JNICALL *ReleaseFloatArrayElements) (JNIEnv *, jfloatArray, + jfloat *, jint); + void (JNICALL *ReleaseDoubleArrayElements) (JNIEnv *, jdoubleArray, + jdouble *, jint); + + void (JNICALL *GetBooleanArrayRegion) (JNIEnv *, jbooleanArray, + jsize, jsize, jboolean *); + void (JNICALL *GetByteArrayRegion) (JNIEnv *, jbyteArray, + jsize, jsize, jbyte *); + void (JNICALL *GetCharArrayRegion) (JNIEnv *, jcharArray, + jsize, jsize, jchar *); + void (JNICALL *GetShortArrayRegion) (JNIEnv *, jshortArray, + jsize, jsize, jshort *); + void (JNICALL *GetIntArrayRegion) (JNIEnv *, jintArray, + jsize, jsize, jint *); + void (JNICALL *GetLongArrayRegion) (JNIEnv *, jlongArray, + jsize, jsize, jlong *); + void (JNICALL *GetFloatArrayRegion) (JNIEnv *, jfloatArray, + jsize, jsize, jfloat *); + void (JNICALL *GetDoubleArrayRegion) (JNIEnv *, jdoubleArray, + jsize, jsize, jdouble *); + + void (JNICALL *SetBooleanArrayRegion) (JNIEnv *, jbooleanArray, + jsize, jsize, + const jboolean *); + void (JNICALL *SetByteArrayRegion) (JNIEnv *, jbyteArray, + jsize, jsize, + const jbyte *); + void (JNICALL *SetCharArrayRegion) (JNIEnv *, jcharArray, + jsize, jsize, + const jchar *); + void (JNICALL *SetShortArrayRegion) (JNIEnv *, jshortArray, + jsize, jsize, + const jshort *); + void (JNICALL *SetIntArrayRegion) (JNIEnv *, jintArray, + jsize, jsize, + const jint *); + void (JNICALL *SetLongArrayRegion) (JNIEnv *, jlongArray, + jsize, jsize, + const jlong *); + void (JNICALL *SetFloatArrayRegion) (JNIEnv *, jfloatArray, + jsize, jsize, + const jfloat *); + void (JNICALL *SetDoubleArrayRegion) (JNIEnv *, jdoubleArray, + jsize, jsize, + const jdouble *); + + jint (JNICALL *RegisterNatives) (JNIEnv *, jclass, + const JNINativeMethod *, + jint); + jint (JNICALL *UnregisterNatives) (JNIEnv *, jclass); + jint (JNICALL *MonitorEnter) (JNIEnv *, jobject); + jint (JNICALL *MonitorExit) (JNIEnv *, jobject); + jint (JNICALL *GetJavaVM) (JNIEnv *, JavaVM **); + + /* ---- JNI 1.2 functions ---- */ + + void (JNICALL *GetStringRegion) (JNIEnv *, jstring, jsize, + jsize, jchar *); + void (JNICALL *GetStringUTFRegion) (JNIEnv *, jstring, jsize, + jsize, char *); + + void * (JNICALL *GetPrimitiveArrayCritical) (JNIEnv *, jarray, + jboolean *); + void (JNICALL *ReleasePrimitiveArrayCritical) (JNIEnv *, jarray, void *, + jint); + + const jchar * (JNICALL *GetStringCritical) (JNIEnv *, jstring, + jboolean *); + void (JNICALL *ReleaseStringCritical) (JNIEnv *, jstring, + const jchar *); + + jweak (JNICALL *NewWeakGlobalRef) (JNIEnv *, jobject); + void (JNICALL *DeleteWeakGlobalRef) (JNIEnv *, jweak); + + jboolean (JNICALL *ExceptionCheck) (JNIEnv *); + + /* ---- JNI 1.4 functions ---- */ + + jobject (JNICALL *NewDirectByteBuffer) (JNIEnv *, void *, jlong); + void * (JNICALL *GetDirectBufferAddress) (JNIEnv *, jobject); + jlong (JNICALL *GetDirectBufferCapacity) (JNIEnv *, jobject); + + /* ---- JNI 1.6 functions ---- */ + + jobjectRefType (JNICALL *GetObjectRefType) (JNIEnv *, jobject); +}; + +#ifdef __cplusplus + +class _Jv_JNIEnv +{ +public: + /* The method table. */ + struct JNINativeInterface_ *p; + +#ifdef _CLASSPATH_JNIENV_CONTENTS + _CLASSPATH_JNIENV_CONTENTS +#endif + + jint GetVersion () + { return p->GetVersion (this); } + + jclass DefineClass (const char *name, jobject obj0, const jbyte * val1, + jsize val2) + { return p->DefineClass (this, name, obj0, val1, val2); } + + jclass FindClass (const char * val0) + { return p->FindClass (this, val0); } + + jmethodID FromReflectedMethod (jobject obj0) + { return p->FromReflectedMethod (this, obj0); } + + jfieldID FromReflectedField (jobject obj0) + { return p->FromReflectedField (this, obj0); } + + jobject ToReflectedMethod (jclass cl0, jmethodID meth1, jboolean val2) + { return p->ToReflectedMethod (this, cl0, meth1, val2); } + + jclass GetSuperclass (jclass cl0) + { return p->GetSuperclass (this, cl0); } + + jboolean IsAssignableFrom (jclass cl0, jclass cl1) + { return p->IsAssignableFrom (this, cl0, cl1); } + + jobject ToReflectedField (jclass cl0, jfieldID fld1, jboolean val2) + { return p->ToReflectedField (this, cl0, fld1, val2); } + + jint Throw (jthrowable val0) + { return p->Throw (this, val0); } + + jint ThrowNew (jclass cl0, const char * val1) + { return p->ThrowNew (this, cl0, val1); } + + jthrowable ExceptionOccurred () + { return p->ExceptionOccurred (this); } + + void ExceptionDescribe () + { p->ExceptionDescribe (this); } + + void ExceptionClear () + { p->ExceptionClear (this); } + + void FatalError (const char * val0) + { p->FatalError (this, val0); } + + jint PushLocalFrame (jint val0) + { return p->PushLocalFrame (this, val0); } + + jobject PopLocalFrame (jobject obj0) + { return p->PopLocalFrame (this, obj0); } + + jobject NewGlobalRef (jobject obj0) + { return p->NewGlobalRef (this, obj0); } + + void DeleteGlobalRef (jobject obj0) + { p->DeleteGlobalRef (this, obj0); } + + void DeleteLocalRef (jobject obj0) + { p->DeleteLocalRef (this, obj0); } + + jboolean IsSameObject (jobject obj0, jobject obj1) + { return p->IsSameObject (this, obj0, obj1); } + + jobject NewLocalRef (jobject obj0) + { return p->NewLocalRef (this, obj0); } + + jint EnsureLocalCapacity (jint val0) + { return p->EnsureLocalCapacity (this, val0); } + + jobject AllocObject (jclass cl0) + { return p->AllocObject (this, cl0); } + + jobject NewObject (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jobject result = p->NewObjectV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jobject NewObjectV (jclass cl0, jmethodID meth1, va_list val2) + { return p->NewObjectV (this, cl0, meth1, val2); } + + jobject NewObjectA (jclass cl0, jmethodID meth1, jvalue * val2) + { return p->NewObjectA (this, cl0, meth1, val2); } + + jclass GetObjectClass (jobject obj0) + { return p->GetObjectClass (this, obj0); } + + jboolean IsInstanceOf (jobject obj0, jclass cl1) + { return p->IsInstanceOf (this, obj0, cl1); } + + jmethodID GetMethodID (jclass cl0, const char * val1, const char * val2) + { return p->GetMethodID (this, cl0, val1, val2); } + + jobject CallObjectMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jobject result = p->CallObjectMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jobject CallObjectMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallObjectMethodV (this, obj0, meth1, val2); } + + jobject CallObjectMethodA (jobject obj0, jmethodID meth1, jvalue * val2) + { return p->CallObjectMethodA (this, obj0, meth1, val2); } + + jboolean CallBooleanMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jboolean result = p->CallBooleanMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jboolean CallBooleanMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallBooleanMethodV (this, obj0, meth1, val2); } + + jboolean CallBooleanMethodA (jobject obj0, jmethodID meth1, + const jvalue * val2) + { return p->CallBooleanMethodA (this, obj0, meth1, val2); } + + jbyte CallByteMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jbyte result = p->CallByteMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jbyte CallByteMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallByteMethodV (this, obj0, meth1, val2); } + + jbyte CallByteMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { return p->CallByteMethodA (this, obj0, meth1, val2); } + + jchar CallCharMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jchar result = p->CallCharMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jchar CallCharMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallCharMethodV (this, obj0, meth1, val2); } + + jchar CallCharMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { return p->CallCharMethodA (this, obj0, meth1, val2); } + + jshort CallShortMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jshort result = p->CallShortMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jshort CallShortMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallShortMethodV (this, obj0, meth1, val2); } + + jshort CallShortMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { return p->CallShortMethodA (this, obj0, meth1, val2); } + + jint CallIntMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jint result = p->CallIntMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jint CallIntMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallIntMethodV (this, obj0, meth1, val2); } + + jint CallIntMethodA (jobject obj0, jmethodID meth1, jvalue * val2) + { return p->CallIntMethodA (this, obj0, meth1, val2); } + + jlong CallLongMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jlong result = p->CallLongMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jlong CallLongMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallLongMethodV (this, obj0, meth1, val2); } + + jlong CallLongMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { return p->CallLongMethodA (this, obj0, meth1, val2); } + + jfloat CallFloatMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jfloat result = p->CallFloatMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jfloat CallFloatMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallFloatMethodV (this, obj0, meth1, val2); } + + jfloat CallFloatMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { return p->CallFloatMethodA (this, obj0, meth1, val2); } + + jdouble CallDoubleMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jdouble result = p->CallDoubleMethodV (this, obj0, meth1, args); + va_end (args); + return result; + } + + jdouble CallDoubleMethodV (jobject obj0, jmethodID meth1, va_list val2) + { return p->CallDoubleMethodV (this, obj0, meth1, val2); } + + jdouble CallDoubleMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { return p->CallDoubleMethodA (this, obj0, meth1, val2); } + + void CallVoidMethod (jobject obj0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + p->CallVoidMethodV (this, obj0, meth1, args); + va_end (args); + } + + void CallVoidMethodV (jobject obj0, jmethodID meth1, va_list val2) + { p->CallVoidMethodV (this, obj0, meth1, val2); } + + void CallVoidMethodA (jobject obj0, jmethodID meth1, const jvalue * val2) + { p->CallVoidMethodA (this, obj0, meth1, val2); } + + jobject CallNonvirtualObjectMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jobject result = p->CallNonvirtualObjectMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jobject CallNonvirtualObjectMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualObjectMethodV (this, obj0, cl1, meth2, val3); } + + jobject CallNonvirtualObjectMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualObjectMethodA (this, obj0, cl1, meth2, val3); } + + jboolean CallNonvirtualBooleanMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jboolean result = p->CallNonvirtualBooleanMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jboolean CallNonvirtualBooleanMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualBooleanMethodV (this, obj0, cl1, meth2, val3); } + + jboolean CallNonvirtualBooleanMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualBooleanMethodA (this, obj0, cl1, meth2, val3); } + + jbyte CallNonvirtualByteMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jbyte result = p->CallNonvirtualByteMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jbyte CallNonvirtualByteMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualByteMethodV (this, obj0, cl1, meth2, val3); } + + jbyte CallNonvirtualByteMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualByteMethodA (this, obj0, cl1, meth2, val3); } + + jchar CallNonvirtualCharMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jchar result = p->CallNonvirtualCharMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jchar CallNonvirtualCharMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualCharMethodV (this, obj0, cl1, meth2, val3); } + + jchar CallNonvirtualCharMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualCharMethodA (this, obj0, cl1, meth2, val3); } + + jshort CallNonvirtualShortMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jshort result = p->CallNonvirtualShortMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jshort CallNonvirtualShortMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualShortMethodV (this, obj0, cl1, meth2, val3); } + + jshort CallNonvirtualShortMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualShortMethodA (this, obj0, cl1, meth2, val3); } + + jint CallNonvirtualIntMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jint result = p->CallNonvirtualIntMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jint CallNonvirtualIntMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualIntMethodV (this, obj0, cl1, meth2, val3); } + + jint CallNonvirtualIntMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualIntMethodA (this, obj0, cl1, meth2, val3); } + + jlong CallNonvirtualLongMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jlong result = p->CallNonvirtualLongMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jlong CallNonvirtualLongMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualLongMethodV (this, obj0, cl1, meth2, val3); } + + jlong CallNonvirtualLongMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualLongMethodA (this, obj0, cl1, meth2, val3); } + + jfloat CallNonvirtualFloatMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jfloat result = p->CallNonvirtualFloatMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jfloat CallNonvirtualFloatMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualFloatMethodV (this, obj0, cl1, meth2, val3); } + + jfloat CallNonvirtualFloatMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualFloatMethodA (this, obj0, cl1, meth2, val3); } + + jdouble CallNonvirtualDoubleMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + jdouble result = p->CallNonvirtualDoubleMethodV (this, obj0, cl1, meth2, args); + va_end (args); + return result; + } + + jdouble CallNonvirtualDoubleMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { return p->CallNonvirtualDoubleMethodV (this, obj0, cl1, meth2, val3); } + + jdouble CallNonvirtualDoubleMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { return p->CallNonvirtualDoubleMethodA (this, obj0, cl1, meth2, val3); } + + void CallNonvirtualVoidMethod (jobject obj0, jclass cl1, jmethodID meth2, ...) + { + va_list args; + va_start (args, meth2); + p->CallNonvirtualVoidMethodV (this, obj0, cl1, meth2, args); + va_end (args); + } + + void CallNonvirtualVoidMethodV (jobject obj0, jclass cl1, jmethodID meth2, va_list val3) + { p->CallNonvirtualVoidMethodV (this, obj0, cl1, meth2, val3); } + + void CallNonvirtualVoidMethodA (jobject obj0, jclass cl1, jmethodID meth2, const jvalue * val3) + { p->CallNonvirtualVoidMethodA (this, obj0, cl1, meth2, val3); } + + jfieldID GetFieldID (jclass cl0, const char * val1, const char * val2) + { return p->GetFieldID (this, cl0, val1, val2); } + + jobject GetObjectField (jobject obj0, jfieldID fld1) + { return p->GetObjectField (this, obj0, fld1); } + + jboolean GetBooleanField (jobject obj0, jfieldID fld1) + { return p->GetBooleanField (this, obj0, fld1); } + + jbyte GetByteField (jobject obj0, jfieldID fld1) + { return p->GetByteField (this, obj0, fld1); } + + jchar GetCharField (jobject obj0, jfieldID fld1) + { return p->GetCharField (this, obj0, fld1); } + + jshort GetShortField (jobject obj0, jfieldID fld1) + { return p->GetShortField (this, obj0, fld1); } + + jint GetIntField (jobject obj0, jfieldID fld1) + { return p->GetIntField (this, obj0, fld1); } + + jlong GetLongField (jobject obj0, jfieldID fld1) + { return p->GetLongField (this, obj0, fld1); } + + jfloat GetFloatField (jobject obj0, jfieldID fld1) + { return p->GetFloatField (this, obj0, fld1); } + + jdouble GetDoubleField (jobject obj0, jfieldID fld1) + { return p->GetDoubleField (this, obj0, fld1); } + + void SetObjectField (jobject obj0, jfieldID fld1, jobject obj2) + { p->SetObjectField (this, obj0, fld1, obj2); } + + void SetBooleanField (jobject obj0, jfieldID fld1, jboolean val2) + { p->SetBooleanField (this, obj0, fld1, val2); } + + void SetByteField (jobject obj0, jfieldID fld1, jbyte val2) + { p->SetByteField (this, obj0, fld1, val2); } + + void SetCharField (jobject obj0, jfieldID fld1, jchar val2) + { p->SetCharField (this, obj0, fld1, val2); } + + void SetShortField (jobject obj0, jfieldID fld1, jshort val2) + { p->SetShortField (this, obj0, fld1, val2); } + + void SetIntField (jobject obj0, jfieldID fld1, jint val2) + { p->SetIntField (this, obj0, fld1, val2); } + + void SetLongField (jobject obj0, jfieldID fld1, jlong val2) + { p->SetLongField (this, obj0, fld1, val2); } + + void SetFloatField (jobject obj0, jfieldID fld1, jfloat val2) + { p->SetFloatField (this, obj0, fld1, val2); } + + void SetDoubleField (jobject obj0, jfieldID fld1, jdouble val2) + { p->SetDoubleField (this, obj0, fld1, val2); } + + jmethodID GetStaticMethodID (jclass cl0, const char * val1, const char * val2) + { return p->GetStaticMethodID (this, cl0, val1, val2); } + + jobject CallStaticObjectMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jobject result = p->CallStaticObjectMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jobject CallStaticObjectMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticObjectMethodV (this, cl0, meth1, val2); } + + jobject CallStaticObjectMethodA (jclass cl0, jmethodID meth1, + const jvalue * val2) + { return p->CallStaticObjectMethodA (this, cl0, meth1, val2); } + + jboolean CallStaticBooleanMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jboolean result = p->CallStaticBooleanMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jboolean CallStaticBooleanMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticBooleanMethodV (this, cl0, meth1, val2); } + + jboolean CallStaticBooleanMethodA (jclass cl0, jmethodID meth1, + const jvalue * val2) + { return p->CallStaticBooleanMethodA (this, cl0, meth1, val2); } + + jbyte CallStaticByteMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jbyte result = p->CallStaticByteMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jbyte CallStaticByteMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticByteMethodV (this, cl0, meth1, val2); } + + jbyte CallStaticByteMethodA (jclass cl0, jmethodID meth1, const jvalue * val2) + { return p->CallStaticByteMethodA (this, cl0, meth1, val2); } + + jchar CallStaticCharMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jchar result = p->CallStaticCharMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jchar CallStaticCharMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticCharMethodV (this, cl0, meth1, val2); } + + jchar CallStaticCharMethodA (jclass cl0, jmethodID meth1, const jvalue * val2) + { return p->CallStaticCharMethodA (this, cl0, meth1, val2); } + + jshort CallStaticShortMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jshort result = p->CallStaticShortMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jshort CallStaticShortMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticShortMethodV (this, cl0, meth1, val2); } + + jshort CallStaticShortMethodA (jclass cl0, jmethodID meth1, + const jvalue * val2) + { return p->CallStaticShortMethodA (this, cl0, meth1, val2); } + + jint CallStaticIntMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jint result = p->CallStaticIntMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jint CallStaticIntMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticIntMethodV (this, cl0, meth1, val2); } + + jint CallStaticIntMethodA (jclass cl0, jmethodID meth1, const jvalue * val2) + { return p->CallStaticIntMethodA (this, cl0, meth1, val2); } + + jlong CallStaticLongMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jlong result = p->CallStaticLongMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jlong CallStaticLongMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticLongMethodV (this, cl0, meth1, val2); } + + jlong CallStaticLongMethodA (jclass cl0, jmethodID meth1, const jvalue * val2) + { return p->CallStaticLongMethodA (this, cl0, meth1, val2); } + + jfloat CallStaticFloatMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jfloat result = p->CallStaticFloatMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jfloat CallStaticFloatMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticFloatMethodV (this, cl0, meth1, val2); } + + jfloat CallStaticFloatMethodA (jclass cl0, jmethodID meth1, + const jvalue * val2) + { return p->CallStaticFloatMethodA (this, cl0, meth1, val2); } + + jdouble CallStaticDoubleMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + jdouble result = p->CallStaticDoubleMethodV (this, cl0, meth1, args); + va_end (args); + return result; + } + + jdouble CallStaticDoubleMethodV (jclass cl0, jmethodID meth1, va_list val2) + { return p->CallStaticDoubleMethodV (this, cl0, meth1, val2); } + + jdouble CallStaticDoubleMethodA (jclass cl0, jmethodID meth1, + const jvalue * val2) + { return p->CallStaticDoubleMethodA (this, cl0, meth1, val2); } + + void CallStaticVoidMethod (jclass cl0, jmethodID meth1, ...) + { + va_list args; + va_start (args, meth1); + p->CallStaticVoidMethodV (this, cl0, meth1, args); + va_end (args); + } + + void CallStaticVoidMethodV (jclass cl0, jmethodID meth1, va_list val2) + { p->CallStaticVoidMethodV (this, cl0, meth1, val2); } + + void CallStaticVoidMethodA (jclass cl0, jmethodID meth1, const jvalue * val2) + { p->CallStaticVoidMethodA (this, cl0, meth1, val2); } + + jfieldID GetStaticFieldID (jclass cl0, const char * val1, const char * val2) + { return p->GetStaticFieldID (this, cl0, val1, val2); } + + jobject GetStaticObjectField (jclass cl0, jfieldID fld1) + { return p->GetStaticObjectField (this, cl0, fld1); } + + jboolean GetStaticBooleanField (jclass cl0, jfieldID fld1) + { return p->GetStaticBooleanField (this, cl0, fld1); } + + jbyte GetStaticByteField (jclass cl0, jfieldID fld1) + { return p->GetStaticByteField (this, cl0, fld1); } + + jchar GetStaticCharField (jclass cl0, jfieldID fld1) + { return p->GetStaticCharField (this, cl0, fld1); } + + jshort GetStaticShortField (jclass cl0, jfieldID fld1) + { return p->GetStaticShortField (this, cl0, fld1); } + + jint GetStaticIntField (jclass cl0, jfieldID fld1) + { return p->GetStaticIntField (this, cl0, fld1); } + + jlong GetStaticLongField (jclass cl0, jfieldID fld1) + { return p->GetStaticLongField (this, cl0, fld1); } + + jfloat GetStaticFloatField (jclass cl0, jfieldID fld1) + { return p->GetStaticFloatField (this, cl0, fld1); } + + jdouble GetStaticDoubleField (jclass cl0, jfieldID fld1) + { return p->GetStaticDoubleField (this, cl0, fld1); } + + void SetStaticObjectField (jclass cl0, jfieldID fld1, jobject obj2) + { p->SetStaticObjectField (this, cl0, fld1, obj2); } + + void SetStaticBooleanField (jclass cl0, jfieldID fld1, jboolean val2) + { p->SetStaticBooleanField (this, cl0, fld1, val2); } + + void SetStaticByteField (jclass cl0, jfieldID fld1, jbyte val2) + { p->SetStaticByteField (this, cl0, fld1, val2); } + + void SetStaticCharField (jclass cl0, jfieldID fld1, jchar val2) + { p->SetStaticCharField (this, cl0, fld1, val2); } + + void SetStaticShortField (jclass cl0, jfieldID fld1, jshort val2) + { p->SetStaticShortField (this, cl0, fld1, val2); } + + void SetStaticIntField (jclass cl0, jfieldID fld1, jint val2) + { p->SetStaticIntField (this, cl0, fld1, val2); } + + void SetStaticLongField (jclass cl0, jfieldID fld1, jlong val2) + { p->SetStaticLongField (this, cl0, fld1, val2); } + + void SetStaticFloatField (jclass cl0, jfieldID fld1, jfloat val2) + { p->SetStaticFloatField (this, cl0, fld1, val2); } + + void SetStaticDoubleField (jclass cl0, jfieldID fld1, jdouble val2) + { p->SetStaticDoubleField (this, cl0, fld1, val2); } + + jstring NewString (const jchar * val0, jsize val1) + { return p->NewString (this, val0, val1); } + + jint GetStringLength (jstring val0) + { return p->GetStringLength (this, val0); } + + const jchar * GetStringChars (jstring val0, jboolean * val1) + { return p->GetStringChars (this, val0, val1); } + + void ReleaseStringChars (jstring val0, const jchar * val1) + { p->ReleaseStringChars (this, val0, val1); } + + jstring NewStringUTF (const char * val0) + { return p->NewStringUTF (this, val0); } + + jsize GetStringUTFLength (jstring val0) + { return p->GetStringUTFLength (this, val0); } + + const char * GetStringUTFChars (jstring val0, jboolean * val1) + { return p->GetStringUTFChars (this, val0, val1); } + + void ReleaseStringUTFChars (jstring val0, const char * val1) + { p->ReleaseStringUTFChars (this, val0, val1); } + + jsize GetArrayLength (jarray val0) + { return p->GetArrayLength (this, val0); } + + jobjectArray NewObjectArray (jsize val0, jclass cl1, jobject obj2) + { return p->NewObjectArray (this, val0, cl1, obj2); } + + jobject GetObjectArrayElement (jobjectArray val0, jsize val1) + { return p->GetObjectArrayElement (this, val0, val1); } + + void SetObjectArrayElement (jobjectArray val0, jsize val1, jobject obj2) + { p->SetObjectArrayElement (this, val0, val1, obj2); } + + jbooleanArray NewBooleanArray (jsize val0) + { return p->NewBooleanArray (this, val0); } + + jbyteArray NewByteArray (jsize val0) + { return p->NewByteArray (this, val0); } + + jcharArray NewCharArray (jsize val0) + { return p->NewCharArray (this, val0); } + + jshortArray NewShortArray (jsize val0) + { return p->NewShortArray (this, val0); } + + jintArray NewIntArray (jsize val0) + { return p->NewIntArray (this, val0); } + + jlongArray NewLongArray (jsize val0) + { return p->NewLongArray (this, val0); } + + jfloatArray NewFloatArray (jsize val0) + { return p->NewFloatArray (this, val0); } + + jdoubleArray NewDoubleArray (jsize val0) + { return p->NewDoubleArray (this, val0); } + + jboolean * GetBooleanArrayElements (jbooleanArray val0, jboolean * val1) + { return p->GetBooleanArrayElements (this, val0, val1); } + + jbyte * GetByteArrayElements (jbyteArray val0, jboolean * val1) + { return p->GetByteArrayElements (this, val0, val1); } + + jchar * GetCharArrayElements (jcharArray val0, jboolean * val1) + { return p->GetCharArrayElements (this, val0, val1); } + + jshort * GetShortArrayElements (jshortArray val0, jboolean * val1) + { return p->GetShortArrayElements (this, val0, val1); } + + jint * GetIntArrayElements (jintArray val0, jboolean * val1) + { return p->GetIntArrayElements (this, val0, val1); } + + jlong * GetLongArrayElements (jlongArray val0, jboolean * val1) + { return p->GetLongArrayElements (this, val0, val1); } + + jfloat * GetFloatArrayElements (jfloatArray val0, jboolean * val1) + { return p->GetFloatArrayElements (this, val0, val1); } + + jdouble * GetDoubleArrayElements (jdoubleArray val0, jboolean * val1) + { return p->GetDoubleArrayElements (this, val0, val1); } + + void ReleaseBooleanArrayElements (jbooleanArray val0, jboolean * val1, jint val2) + { p->ReleaseBooleanArrayElements (this, val0, val1, val2); } + + void ReleaseByteArrayElements (jbyteArray val0, jbyte * val1, jint val2) + { p->ReleaseByteArrayElements (this, val0, val1, val2); } + + void ReleaseCharArrayElements (jcharArray val0, jchar * val1, jint val2) + { p->ReleaseCharArrayElements (this, val0, val1, val2); } + + void ReleaseShortArrayElements (jshortArray val0, jshort * val1, jint val2) + { p->ReleaseShortArrayElements (this, val0, val1, val2); } + + void ReleaseIntArrayElements (jintArray val0, jint * val1, jint val2) + { p->ReleaseIntArrayElements (this, val0, val1, val2); } + + void ReleaseLongArrayElements (jlongArray val0, jlong * val1, jint val2) + { p->ReleaseLongArrayElements (this, val0, val1, val2); } + + void ReleaseFloatArrayElements (jfloatArray val0, jfloat * val1, jint val2) + { p->ReleaseFloatArrayElements (this, val0, val1, val2); } + + void ReleaseDoubleArrayElements (jdoubleArray val0, jdouble * val1, jint val2) + { p->ReleaseDoubleArrayElements (this, val0, val1, val2); } + + void GetBooleanArrayRegion (jbooleanArray val0, jsize val1, jsize val2, jboolean * val3) + { p->GetBooleanArrayRegion (this, val0, val1, val2, val3); } + + void GetByteArrayRegion (jbyteArray val0, jsize val1, jsize val2, jbyte * val3) + { p->GetByteArrayRegion (this, val0, val1, val2, val3); } + + void GetCharArrayRegion (jcharArray val0, jsize val1, jsize val2, jchar * val3) + { p->GetCharArrayRegion (this, val0, val1, val2, val3); } + + void GetShortArrayRegion (jshortArray val0, jsize val1, jsize val2, jshort * val3) + { p->GetShortArrayRegion (this, val0, val1, val2, val3); } + + void GetIntArrayRegion (jintArray val0, jsize val1, jsize val2, jint * val3) + { p->GetIntArrayRegion (this, val0, val1, val2, val3); } + + void GetLongArrayRegion (jlongArray val0, jsize val1, jsize val2, jlong * val3) + { p->GetLongArrayRegion (this, val0, val1, val2, val3); } + + void GetFloatArrayRegion (jfloatArray val0, jsize val1, jsize val2, jfloat * val3) + { p->GetFloatArrayRegion (this, val0, val1, val2, val3); } + + void GetDoubleArrayRegion (jdoubleArray val0, jsize val1, jsize val2, jdouble * val3) + { p->GetDoubleArrayRegion (this, val0, val1, val2, val3); } + + void SetBooleanArrayRegion (jbooleanArray val0, jsize val1, jsize val2, jboolean * val3) + { p->SetBooleanArrayRegion (this, val0, val1, val2, val3); } + + void SetByteArrayRegion (jbyteArray val0, jsize val1, jsize val2, jbyte * val3) + { p->SetByteArrayRegion (this, val0, val1, val2, val3); } + + void SetCharArrayRegion (jcharArray val0, jsize val1, jsize val2, jchar * val3) + { p->SetCharArrayRegion (this, val0, val1, val2, val3); } + + void SetShortArrayRegion (jshortArray val0, jsize val1, jsize val2, jshort * val3) + { p->SetShortArrayRegion (this, val0, val1, val2, val3); } + + void SetIntArrayRegion (jintArray val0, jsize val1, jsize val2, jint * val3) + { p->SetIntArrayRegion (this, val0, val1, val2, val3); } + + void SetLongArrayRegion (jlongArray val0, jsize val1, jsize val2, jlong * val3) + { p->SetLongArrayRegion (this, val0, val1, val2, val3); } + + void SetFloatArrayRegion (jfloatArray val0, jsize val1, jsize val2, jfloat * val3) + { p->SetFloatArrayRegion (this, val0, val1, val2, val3); } + + void SetDoubleArrayRegion (jdoubleArray val0, jsize val1, jsize val2, jdouble * val3) + { p->SetDoubleArrayRegion (this, val0, val1, val2, val3); } + + jint RegisterNatives (jclass cl0, const JNINativeMethod * val1, jint val2) + { return p->RegisterNatives (this, cl0, val1, val2); } + + jint UnregisterNatives (jclass cl0) + { return p->UnregisterNatives (this, cl0); } + + jint MonitorEnter (jobject obj0) + { return p->MonitorEnter (this, obj0); } + + jint MonitorExit (jobject obj0) + { return p->MonitorExit (this, obj0); } + + jint GetJavaVM (JavaVM ** val0) + { return p->GetJavaVM (this, val0); } + + /* ---- JNI 1.2 functions ---- */ + + void GetStringRegion (jstring val0, jsize val1, jsize val2, jchar * val3) + { p->GetStringRegion (this, val0, val1, val2, val3); } + + void GetStringUTFRegion (jstring val0, jsize val1, jsize val2, char * val3) + { p->GetStringUTFRegion (this, val0, val1, val2, val3); } + + void * GetPrimitiveArrayCritical (jarray val0, jboolean * val1) + { return p->GetPrimitiveArrayCritical (this, val0, val1); } + + void ReleasePrimitiveArrayCritical (jarray val0, void * val1, jint val2) + { p->ReleasePrimitiveArrayCritical (this, val0, val1, val2); } + + const jchar * GetStringCritical (jstring val0, jboolean * val1) + { return p->GetStringCritical (this, val0, val1); } + + void ReleaseStringCritical (jstring val0, const jchar * val1) + { p->ReleaseStringCritical (this, val0, val1); } + + jweak NewWeakGlobalRef (jobject obj0) + { return p->NewWeakGlobalRef (this, obj0); } + + void DeleteWeakGlobalRef (jweak val0) + { p->DeleteWeakGlobalRef (this, val0); } + + jboolean ExceptionCheck () + { return p->ExceptionCheck (this); } + + /* ---- JNI 1.4 functions ---- */ + + jobject NewDirectByteBuffer (void *addr, jlong capacity) + { return p->NewDirectByteBuffer (this, addr, capacity); } + + void *GetDirectBufferAddress (jobject buf) + { return p->GetDirectBufferAddress (this, buf); } + + jlong GetDirectBufferCapacity (jobject buf) + { return p->GetDirectBufferCapacity (this, buf); } + + /* ---- JNI 1.6 functions ---- */ + + jobjectRefType GetObjectRefType (jobject obj) + { return p->GetObjectRefType (this, obj); } +}; + +#endif /* __cplusplus */ + +/* + * Invocation API. + */ + +struct JNIInvokeInterface_ +{ + void *reserved0; + void *reserved1; + void *reserved2; + + jint (JNICALL *DestroyJavaVM) (JavaVM *); + jint (JNICALL *AttachCurrentThread) (JavaVM *, void **, void *); + jint (JNICALL *DetachCurrentThread) (JavaVM *); + jint (JNICALL *GetEnv) (JavaVM *, void **, jint); + jint (JNICALL *AttachCurrentThreadAsDaemon) (JavaVM *, void **, void *); +}; + +#ifdef __cplusplus + +class _Jv_JavaVM +{ +public: + const struct JNIInvokeInterface_ *functions; + + jint DestroyJavaVM () + { return functions->DestroyJavaVM (this); } + + jint AttachCurrentThread (void **penv, void *args) + { return functions->AttachCurrentThread (this, penv, args); } + + jint DetachCurrentThread () + { return functions->DetachCurrentThread (this); } + + jint GetEnv (void **penv, jint version) + { return functions->GetEnv (this, penv, version); } + + jint AttachCurrentThreadAsDaemon (void **penv, void *args) + { return functions->AttachCurrentThreadAsDaemon (this, penv, args); } +}; + +#endif /* __cplusplus */ + +typedef struct JavaVMAttachArgs +{ + jint version; /* Must be JNI_VERSION_1_2. */ + char *name; /* The name of the thread (or NULL). */ + jobject group; /* Global ref of a ThreadGroup object + (or NULL). */ +} JavaVMAttachArgs; + +typedef struct JavaVMOption +{ + char *optionString; + void *extraInfo; +} JavaVMOption; + +typedef struct JavaVMInitArgs +{ + /* Must be JNI_VERSION_1_2. */ + jint version; + + /* Number of options. */ + jint nOptions; + + /* Options to the VM. */ + JavaVMOption *options; + + /* Whether we should ignore unrecognized options. */ + jboolean ignoreUnrecognized; +} JavaVMInitArgs; + +typedef struct JDK1_1InitArgs +{ + /* VM version. Should be JNI_VERSION_1_1. Note that before JDK + 1.1.2, this field was named 'reserved0'. (I don't know what the + current 'reserved0' field was named then.) */ + jint version; + + /* A null-terminated array of environment strings, each of the form + "KEY=VALUE". This is used to set system properties. Note that + before JDK 1.1.2, this field was named 'reserved1'. */ + char **properties; + + jint checkSource; + jint nativeStackSize; + jint javaStackSize; + jint minHeapSize; + jint maxHeapSize; + jint verifyMode; + const char *classpath; + + jint (JNICALL *vfprintf) (FILE *file, const char *fmt, va_list args); + void (JNICALL *exit) (jint value); + void (JNICALL *abort) (void); + + jint enableClassGC; + jint enableVerboseGC; + jint disableAsyncGC; + + jint reserved0; + jint reserved1; + jint reserved2; +} JDK1_1InitArgs; + +typedef struct JDK1_1AttachArgs +{ + /* Dummy field since C cannot have empty structs. The name and type + are chosen to comply with the spec. */ + void *__padding; +} JDK1_1AttachArgs; + + +/* Keep c-font-lock-extra-types in alphabetical order. */ +/* +Local Variables: +c-font-lock-extra-types: ("\\sw+_t" \ + "JNIEnv" "JNINativeMethod" "JavaVM" "JavaVMOption" "jarray" \ + "jboolean" "jbooleanArray" "jbyte" "jbyteArray" "jchar" "jcharArray" \ + "jclass" "jdouble" "jdoubleArray" "jfieldID" "jfloat" "jfloatArray" \ + "jint" "jintArray" "jlong" "jlongArray" "jmethodID" "jobject" \ + "jstring" "jthrowable" "jvalue" "jweak") +End: +*/ + +#endif /* _CLASSPATH_JNI_H */ Added: vmkit/trunk/include/j3/jni_md.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/jni_md.h?rev=134159&view=auto ============================================================================== --- vmkit/trunk/include/j3/jni_md.h (added) +++ vmkit/trunk/include/j3/jni_md.h Thu Jun 30 09:58:28 2011 @@ -0,0 +1,45 @@ +/* jni_md.h + Copyright (C) 2001, 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +As a special exception, if you link this library with other files to +produce an executable, this library does not by itself cause the +resulting executable to be covered by the GNU General Public License. +This exception does not however invalidate any other reasons why the +executable file might be covered by the GNU General Public License. */ + +#ifndef __CLASSPATH_JNI_MD_H__ +#define __CLASSPATH_JNI_MD_H__ + +/* Define some defaults */ +#define JNICALL +#define JNIEXPORT +#define JNIIMPORT + +typedef unsigned char jboolean; +typedef signed char jbyte; +typedef unsigned short jchar; +typedef short jshort; +typedef int jint; +typedef long long jlong; +typedef float jfloat; +typedef double jdouble; +typedef jint jsize; + +#endif /* __CLASSPATH_JNI_MD_H__ */ Modified: vmkit/trunk/lib/J3/Classpath/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Classpath/Makefile?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Classpath/Makefile (original) +++ vmkit/trunk/lib/J3/Classpath/Makefile Thu Jun 30 09:58:28 2011 @@ -20,4 +20,4 @@ include $(LEVEL)/Makefile.common -CXX.Flags += -I$(PROJ_SRC_DIR)/../VMCore $(CLASSPATH_FLAGS) +CXX.Flags += -I$(PROJ_SRC_DIR)/../VMCore -I$(PROJ_SRC_DIR)/../../../include/j3 Modified: vmkit/trunk/lib/J3/Compiler/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/Makefile?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Compiler/Makefile (original) +++ vmkit/trunk/lib/J3/Compiler/Makefile Thu Jun 30 09:58:28 2011 @@ -11,8 +11,7 @@ include $(LEVEL)/Makefile.config MODULE_WITH_GC = J3Compiler -EXTRA_DIST = ExceptionsCheck.inc ExceptionsDwarf.inc include $(LEVEL)/Makefile.common -CXX.Flags += -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath $(CLASSPATH_FLAGS) -I$(PROJ_SRC_DIR)/../VMCore +CXX.Flags += -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath -I$(PROJ_SRC_DIR)/../VMCore Modified: vmkit/trunk/lib/J3/IJvm/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/IJvm/Makefile?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/lib/J3/IJvm/Makefile (original) +++ vmkit/trunk/lib/J3/IJvm/Makefile Thu Jun 30 09:58:28 2011 @@ -14,7 +14,7 @@ include $(LEVEL)/Makefile.common -CXX.Flags += -I$(PROJ_OBJ_DIR)/../Classpath -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath $(CLASSPATH_FLAGS) -I$(PROJ_SRC_DIR)/../../../include/jnjvm +CXX.Flags += -I$(PROJ_OBJ_DIR)/../Classpath -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath -I$(PROJ_SRC_DIR)/../../../include/j3 ifeq ($(ISOLATE_BUILD), 1) CXX.Flags += -I$(PROJ_SRC_DIR)/../Isolate Modified: vmkit/trunk/lib/J3/VMCore/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/Makefile?rev=134159&r1=134158&r2=134159&view=diff ============================================================================== --- vmkit/trunk/lib/J3/VMCore/Makefile (original) +++ vmkit/trunk/lib/J3/VMCore/Makefile Thu Jun 30 09:58:28 2011 @@ -14,4 +14,4 @@ include $(LEVEL)/Makefile.common -CXX.Flags += -I$(PROJ_OBJ_DIR)/../Classpath -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath $(CLASSPATH_FLAGS) -I$(PROJ_SRC_DIR)/../../../include/j3 -Wno-mismatched-tags +CXX.Flags += -I$(PROJ_OBJ_DIR)/../Classpath -I$(PROJ_OBJ_DIR)/../LLVMRuntime -I$(PROJ_SRC_DIR)/../Classpath -I$(PROJ_SRC_DIR)/../../../include/j3 From nicolas.geoffray at lip6.fr Thu Jun 30 07:58:50 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 14:58:50 -0000 Subject: [vmkit-commits] [vmkit] r134160 - /vmkit/trunk/include/j3/jni.h Message-ID: <20110630145850.8522C2A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 09:58:50 2011 New Revision: 134160 URL: http://llvm.org/viewvc/llvm-project?rev=134160&view=rev Log: Avoid -Wmismatched-tags warnings. Modified: vmkit/trunk/include/j3/jni.h Modified: vmkit/trunk/include/j3/jni.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/jni.h?rev=134160&r1=134159&r2=134160&view=diff ============================================================================== --- vmkit/trunk/include/j3/jni.h (original) +++ vmkit/trunk/include/j3/jni.h Thu Jun 30 09:58:50 2011 @@ -92,8 +92,8 @@ #define JNI_TRUE true #define JNI_FALSE false -typedef struct _Jv_JNIEnv JNIEnv; -typedef struct _Jv_JavaVM JavaVM; +typedef class _Jv_JNIEnv JNIEnv; +typedef class _Jv_JavaVM JavaVM; # else /* __cplusplus */ From nicolas.geoffray at lip6.fr Thu Jun 30 08:02:58 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 15:02:58 -0000 Subject: [vmkit-commits] [vmkit] r134161 - in /vmkit/trunk/lib/J3: IJvm/ Isolate/ Makefile Message-ID: <20110630150258.AA9812A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 10:02:58 2011 New Revision: 134161 URL: http://llvm.org/viewvc/llvm-project?rev=134161&view=rev Log: Remove old directories. Removed: vmkit/trunk/lib/J3/IJvm/ vmkit/trunk/lib/J3/Isolate/ Modified: vmkit/trunk/lib/J3/Makefile Modified: vmkit/trunk/lib/J3/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Makefile?rev=134161&r1=134160&r2=134161&view=diff ============================================================================== --- vmkit/trunk/lib/J3/Makefile (original) +++ vmkit/trunk/lib/J3/Makefile Thu Jun 30 10:02:58 2011 @@ -11,12 +11,5 @@ DIRS = LLVMRuntime VMCore Classpath Compiler include $(LEVEL)/Makefile.config - -ifeq ($(ISOLATE_SHARING_BUILD), 1) - DIRS += Isolate -endif - - - include $(LEVEL)/Makefile.common From nicolas.geoffray at lip6.fr Thu Jun 30 08:32:02 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 15:32:02 -0000 Subject: [vmkit-commits] [vmkit] r134162 - in /vmkit/trunk: ./ lib/J3/Classpath/ lib/J3/Compiler/ lib/J3/VMCore/ lib/Mvm/CommonThread/ lib/Mvm/Compiler/ lib/Mvm/JITGCPass/ lib/Mvm/MMTk/ lib/Mvm/Runtime/ lib/Mvm/StaticGCPass/ mmtk/inline/ mmtk/java/ mmtk/java/src/org/j3/config/ mmtk/magic/ mmtk/mmtk-alloc/ mmtk/mmtk-j3/ tools/j3/ tools/llcj/ tools/vmjc/ Message-ID: <20110630153202.349562A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 10:32:01 2011 New Revision: 134162 URL: http://llvm.org/viewvc/llvm-project?rev=134162&view=rev Log: Ignore some files. Modified: vmkit/trunk/ (props changed) vmkit/trunk/lib/J3/Classpath/ (props changed) vmkit/trunk/lib/J3/Compiler/ (props changed) vmkit/trunk/lib/J3/VMCore/ (props changed) vmkit/trunk/lib/Mvm/CommonThread/ (props changed) vmkit/trunk/lib/Mvm/Compiler/ (props changed) vmkit/trunk/lib/Mvm/JITGCPass/ (props changed) vmkit/trunk/lib/Mvm/MMTk/ (props changed) vmkit/trunk/lib/Mvm/Runtime/ (props changed) vmkit/trunk/lib/Mvm/StaticGCPass/ (props changed) vmkit/trunk/mmtk/inline/ (props changed) vmkit/trunk/mmtk/java/ (props changed) vmkit/trunk/mmtk/java/src/org/j3/config/ (props changed) vmkit/trunk/mmtk/magic/ (props changed) vmkit/trunk/mmtk/mmtk-alloc/ (props changed) vmkit/trunk/mmtk/mmtk-j3/ (props changed) vmkit/trunk/tools/j3/ (props changed) vmkit/trunk/tools/llcj/ (props changed) vmkit/trunk/tools/vmjc/ (props changed) Propchange: vmkit/trunk/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -9,5 +9,6 @@ config.status Makefile.common Release-Asserts +Release+Asserts Debug Propchange: vmkit/trunk/lib/J3/Classpath/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,3 +1,4 @@ Release +Release+Asserts Classpath.inc Classpath.h Propchange: vmkit/trunk/lib/J3/Compiler/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,2 +1,3 @@ Debug Release +Release+Asserts Propchange: vmkit/trunk/lib/J3/VMCore/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,2 +1,3 @@ Debug Release +Release+Asserts Propchange: vmkit/trunk/lib/Mvm/CommonThread/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,2 +1,3 @@ Debug Release +Release+Asserts Propchange: vmkit/trunk/lib/Mvm/Compiler/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,3 +1,4 @@ Release +Release+Asserts LLVMRuntime.inc LLVMRuntime.gen.ll Propchange: vmkit/trunk/lib/Mvm/JITGCPass/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1 +1,2 @@ Release +Release+Asserts Propchange: vmkit/trunk/lib/Mvm/MMTk/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -0,0 +1 @@ +Release+Asserts Propchange: vmkit/trunk/lib/Mvm/Runtime/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,2 +1,3 @@ Debug Release +Release+Asserts Propchange: vmkit/trunk/lib/Mvm/StaticGCPass/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1 +1,2 @@ Release +Release+Asserts Propchange: vmkit/trunk/mmtk/inline/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -0,0 +1,2 @@ +Release+Asserts +*.inc Propchange: vmkit/trunk/mmtk/java/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1 +1,6 @@ build.xml +Release+Asserts +mmtk-vmkit.bc +mmtk-vmkit-optimized.bc +mmtk-vmkit.jar +classes Propchange: vmkit/trunk/mmtk/java/src/org/j3/config/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -0,0 +1 @@ +Selected.java Propchange: vmkit/trunk/mmtk/magic/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1 +1,2 @@ Release +Release+Asserts Propchange: vmkit/trunk/mmtk/mmtk-alloc/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -0,0 +1 @@ +Release+Asserts Propchange: vmkit/trunk/mmtk/mmtk-j3/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1 +1,2 @@ Release +Release+Asserts Propchange: vmkit/trunk/tools/j3/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,4 +1,5 @@ Release +Release+Asserts vmkitoptimized.bc vmkit.s vmkit.bc @@ -6,3 +7,5 @@ jnjvm.bc j3.bc j3.s +FrametablesExterns.inc +FrametablesSymbols.inc Propchange: vmkit/trunk/tools/llcj/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,2 +1,3 @@ Release +Release+Asserts LinkPaths.h Propchange: vmkit/trunk/tools/vmjc/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Jun 30 10:32:01 2011 @@ -1,4 +1,5 @@ Release +Release+Asserts vmkitoptimized.bc vmkit.s vmkit.bc From nicolas.geoffray at lip6.fr Thu Jun 30 09:18:58 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 16:18:58 -0000 Subject: [vmkit-commits] [vmkit] r134164 - /vmkit/trunk/Makefile.common.in Message-ID: <20110630161858.D4BE32A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 11:18:58 2011 New Revision: 134164 URL: http://llvm.org/viewvc/llvm-project?rev=134164&view=rev Log: Don't create a BYTECODE_LIBRARY if MODULE_WITH_GC is not set. Modified: vmkit/trunk/Makefile.common.in Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134164&r1=134163&r2=134164&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 11:18:58 2011 @@ -20,12 +20,14 @@ # Define BYTECODE_LIBRARY before including LLVM's Makefile.common to get # dependencies right. -BYTECODE_LIBRARY = 1 +ifeq ($(MODULE_WITH_GC), 1) + BYTECODE_LIBRARY = 1 +endif # Include LLVM's Master Makefile. include $(LLVM_OBJ_ROOT)/Makefile.common -CXX.Flags += @GC_FLAGS@ -fno-exceptions -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -DENABLE_THREADS -fno-rtti +CXX.Flags += @GC_FLAGS@ -fno-exceptions -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing -Wno-deprecated -ansi -fno-rtti # GNU Classpath flags CLASSPATH_FLAGS = From nicolas.geoffray at lip6.fr Thu Jun 30 09:25:27 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 16:25:27 -0000 Subject: [vmkit-commits] [vmkit] r134165 - in /vmkit/trunk: Makefile.common.in tools/j3/Makefile Message-ID: <20110630162527.0BBBD2A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 11:25:26 2011 New Revision: 134165 URL: http://llvm.org/viewvc/llvm-project?rev=134165&view=rev Log: More cleanup. Modified: vmkit/trunk/Makefile.common.in vmkit/trunk/tools/j3/Makefile Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134165&r1=134164&r2=134165&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 11:25:26 2011 @@ -18,12 +18,22 @@ # Set the root directory of this project's install prefix PROJ_INSTALL_ROOT := @prefix@ +MMTK_PLAN = @MMTK_PLAN@ +MMTK_PLAN_HEADER = @MMTK_PLAN_HEADER@ +WITH_64 = @WITH_64@ +ANT = @ANT@ + # Define BYTECODE_LIBRARY before including LLVM's Makefile.common to get # dependencies right. ifeq ($(MODULE_WITH_GC), 1) BYTECODE_LIBRARY = 1 endif +ifeq ($(BUILD_FRAMETABLE), 1) + BUILT_SOURCES = FrametablesSymbols.inc FrametablesExterns.inc +endif + + # Include LLVM's Master Makefile. include $(LLVM_OBJ_ROOT)/Makefile.common Modified: vmkit/trunk/tools/j3/Makefile URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/j3/Makefile?rev=134165&r1=134164&r2=134165&view=diff ============================================================================== --- vmkit/trunk/tools/j3/Makefile (original) +++ vmkit/trunk/tools/j3/Makefile Thu Jun 30 11:25:26 2011 @@ -12,7 +12,6 @@ TOOLNAME = j3 USEDLIBS = Classpath.a J3.a J3Compiler.a Mvm.a MvmCompiler.a CommonThread.a FinalMMTk.a InlineMMTk.a -BUILT_SOURCES = FrametablesSymbols.inc FrametablesExterns.inc BUILD_FRAMETABLE = 1 LINK_COMPONENTS = jit nativecodegen scalaropts instrumentation ipa ipo asmparser linker From nicolas.geoffray at lip6.fr Thu Jun 30 09:34:49 2011 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 30 Jun 2011 16:34:49 -0000 Subject: [vmkit-commits] [vmkit] r134166 - /vmkit/trunk/Makefile.common.in Message-ID: <20110630163449.880A42A6C12C@llvm.org> Author: geoffray Date: Thu Jun 30 11:34:49 2011 New Revision: 134166 URL: http://llvm.org/viewvc/llvm-project?rev=134166&view=rev Log: Remove accidental added lines. Modified: vmkit/trunk/Makefile.common.in Modified: vmkit/trunk/Makefile.common.in URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134166&r1=134165&r2=134166&view=diff ============================================================================== --- vmkit/trunk/Makefile.common.in (original) +++ vmkit/trunk/Makefile.common.in Thu Jun 30 11:34:49 2011 @@ -18,11 +18,6 @@ # Set the root directory of this project's install prefix PROJ_INSTALL_ROOT := @prefix@ -MMTK_PLAN = @MMTK_PLAN@ -MMTK_PLAN_HEADER = @MMTK_PLAN_HEADER@ -WITH_64 = @WITH_64@ -ANT = @ANT@ - # Define BYTECODE_LIBRARY before including LLVM's Makefile.common to get # dependencies right. ifeq ($(MODULE_WITH_GC), 1)