[vmkit-commits] [vmkit] r196325 - each function has its own module, remove the module from class loader

Gael Thomas gael.thomas at lip6.fr
Tue Dec 3 14:24:18 PST 2013


Author: gthomas
Date: Tue Dec  3 16:24:18 2013
New Revision: 196325

URL: http://llvm.org/viewvc/llvm-project?rev=196325&view=rev
Log:
each function has its own module, remove the module from class loader

Modified:
    vmkit/branches/mcjit/include/j3/j3classloader.h
    vmkit/branches/mcjit/lib/j3/vm/j3classloader.cc

Modified: vmkit/branches/mcjit/include/j3/j3classloader.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/mcjit/include/j3/j3classloader.h?rev=196325&r1=196324&r2=196325&view=diff
==============================================================================
--- vmkit/branches/mcjit/include/j3/j3classloader.h (original)
+++ vmkit/branches/mcjit/include/j3/j3classloader.h Tue Dec  3 16:24:18 2013
@@ -57,8 +57,7 @@ namespace j3 {
 		vmkit::NameMap<J3Class*>::map        classes;      /* classes managed by this class loader */
 		vmkit::NameMap<J3Type*>::map         types;        /* shortcut to find types */
 		vmkit::NameMap<J3MethodType*>::map   methodTypes;  /* shortcut to find method types - REMOVE */
-		llvm::Module*                        _module;      /* the associated llvm module */
-		MethodRefMap                          methods;      /* all te known method */
+		MethodRefMap                         methods;      /* all te known method */
 
 		void                          wrongType(J3Class* from, const vmkit::Name* type);
 		J3Type*                       getTypeInternal(J3Class* from, const vmkit::Name* type, uint32_t start, uint32_t* end);
@@ -97,7 +96,6 @@ namespace j3 {
 		J3Class*                      getClass(const vmkit::Name* name);                     /* find a class */
 		J3Type*                       getType(J3Class* from, const vmkit::Name* type);       /* find a type */
 		J3MethodType*                 getMethodType(J3Class* from, const vmkit::Name* sign); /* get a method type */
-		llvm::Module*                 module() { return _module; }
 
 		virtual J3ClassBytes*         lookup(const vmkit::Name* name);
 

Modified: vmkit/branches/mcjit/lib/j3/vm/j3classloader.cc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/mcjit/lib/j3/vm/j3classloader.cc?rev=196325&r1=196324&r2=196325&view=diff
==============================================================================
--- vmkit/branches/mcjit/lib/j3/vm/j3classloader.cc (original)
+++ vmkit/branches/mcjit/lib/j3/vm/j3classloader.cc Tue Dec  3 16:24:18 2013
@@ -7,7 +7,6 @@
 #include "llvm/ExecutionEngine/JIT.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 
-#include "llvm/IR/Module.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/DerivedTypes.h"
 
@@ -54,8 +53,6 @@ J3ClassLoader::J3ClassLoader(J3* v, J3Ob
 	pthread_mutex_init(&_mutexSymbolTable, 0);
 
 	_vm = v;
-
-	_module = new llvm::Module("j3", vm()->llvmContext());
 }
 
 void J3ClassLoader::addSymbol(const char* id, J3Symbol* symbol) {





More information about the vmkit-commits mailing list