[vmkit-commits] [vmkit] r120611 - in /vmkit/branches/multi-vm: include/j3/ include/mvm/ include/mvm/GC/ include/mvm/Threads/ lib/J3/Classpath/ lib/J3/Compiler/ lib/J3/VMCore/ lib/Mvm/Allocator/ lib/Mvm/BoehmGC/ lib/Mvm/CommonThread/ lib/Mvm/Compiler/ lib/Mvm/GCMmap2/ lib/Mvm/MMTk/ lib/Mvm/Runtime/ mmtk/mmtk-alloc/ mmtk/mmtk-j3/ tools/j3/ tools/n3-mono/ tools/n3-pnetlib/ tools/testCollector/ tools/vmjc/ tools/vmkit/ tools/vtoffset/

Gael Thomas gael.thomas at lip6.fr
Wed Dec 1 14:00:11 PST 2010


Author: gthomas
Date: Wed Dec  1 16:00:10 2010
New Revision: 120611

URL: http://llvm.org/viewvc/llvm-project?rev=120611&view=rev
Log:
First, simplify the managment of the different gc. Externally, we just have to include mvm/GC.h (moved from mvm/GC/GC.h) which include the specific MvmGC.h. 
Second, a MvmGC.h must define the class collectable (was gc) and GCVirtualTable (was VirtualTable) and they must inherits from gcroot and CommonVirtualTable. The classes gc an VirtualTable are now defined in GC.h. 
Third, move gc and VirtualTable in namespace mvm.


Added:
    vmkit/branches/multi-vm/include/mvm/GC.h
      - copied, changed from r120463, vmkit/branches/multi-vm/include/mvm/GC/GC.h
Removed:
    vmkit/branches/multi-vm/include/mvm/GC/
    vmkit/branches/multi-vm/lib/Mvm/MMTk/MutatorThread.cpp
Modified:
    vmkit/branches/multi-vm/include/j3/JavaCompiler.h
    vmkit/branches/multi-vm/include/mvm/Allocator.h
    vmkit/branches/multi-vm/include/mvm/JIT.h
    vmkit/branches/multi-vm/include/mvm/MethodInfo.h
    vmkit/branches/multi-vm/include/mvm/Threads/Locks.h
    vmkit/branches/multi-vm/include/mvm/Threads/ObjectLocks.h
    vmkit/branches/multi-vm/include/mvm/Threads/Thread.h
    vmkit/branches/multi-vm/include/mvm/VirtualMachine.h
    vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathConstructor.inc
    vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathMethod.inc
    vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathReflect.h
    vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMObject.inc
    vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMRuntime.inc
    vmkit/branches/multi-vm/lib/J3/Compiler/JavaAOTCompiler.cpp
    vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp
    vmkit/branches/multi-vm/lib/J3/Compiler/LLVMInfo.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/JNIReferences.h
    vmkit/branches/multi-vm/lib/J3/VMCore/JavaClass.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/JavaObject.h
    vmkit/branches/multi-vm/lib/J3/VMCore/JavaRuntimeJIT.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.h
    vmkit/branches/multi-vm/lib/J3/VMCore/Jni.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.h
    vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.h
    vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.cpp
    vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.h
    vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp
    vmkit/branches/multi-vm/lib/Mvm/Allocator/gcchunk.h
    vmkit/branches/multi-vm/lib/Mvm/BoehmGC/MvmGC.h
    vmkit/branches/multi-vm/lib/Mvm/BoehmGC/gc.cpp
    vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp
    vmkit/branches/multi-vm/lib/Mvm/CommonThread/ObjectLocks.cpp
    vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctlock.cpp
    vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp
    vmkit/branches/multi-vm/lib/Mvm/Compiler/EscapeAnalysis.cpp
    vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
    vmkit/branches/multi-vm/lib/Mvm/GCMmap2/MvmGC.h
    vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gc.cpp
    vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gccollector.cpp
    vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gcinit.cpp
    vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.cpp
    vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.h
    vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp
    vmkit/branches/multi-vm/lib/Mvm/Runtime/PrintBuffer.cpp
    vmkit/branches/multi-vm/mmtk/mmtk-alloc/Selected.cpp
    vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp
    vmkit/branches/multi-vm/mmtk/mmtk-j3/MMTkObject.h
    vmkit/branches/multi-vm/mmtk/mmtk-j3/ObjectModel.cpp
    vmkit/branches/multi-vm/mmtk/mmtk-j3/Scanning.cpp
    vmkit/branches/multi-vm/tools/j3/Main.cpp
    vmkit/branches/multi-vm/tools/n3-mono/Main.cpp
    vmkit/branches/multi-vm/tools/n3-pnetlib/Main.cpp
    vmkit/branches/multi-vm/tools/testCollector/Main.cpp
    vmkit/branches/multi-vm/tools/vmjc/vmjc.cpp
    vmkit/branches/multi-vm/tools/vmkit/CommandLine.cpp
    vmkit/branches/multi-vm/tools/vmkit/Launcher.cpp
    vmkit/branches/multi-vm/tools/vtoffset/VTOffset.cpp

Modified: vmkit/branches/multi-vm/include/j3/JavaCompiler.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/j3/JavaCompiler.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/j3/JavaCompiler.h (original)
+++ vmkit/branches/multi-vm/include/j3/JavaCompiler.h Wed Dec  1 16:00:10 2010
@@ -15,7 +15,7 @@
 #include <string>
 #include <dlfcn.h>
 
-#include "mvm/GC/GC.h"
+#include "mvm/GC.h"
 #include "mvm/Allocator.h"
 
 namespace mvm {

Modified: vmkit/branches/multi-vm/include/mvm/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/Allocator.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Allocator.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Allocator.h Wed Dec  1 16:00:10 2010
@@ -18,8 +18,6 @@
 
 #include "mvm/Threads/Locks.h"
 
-class VirtualTable;
-
 #define declare_gcroot(type, name) type name; llvm_gcroot(name, 0); name
 
 namespace mvm {

Copied: vmkit/branches/multi-vm/include/mvm/GC.h (from r120463, vmkit/branches/multi-vm/include/mvm/GC/GC.h)
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/GC.h?p2=vmkit/branches/multi-vm/include/mvm/GC.h&p1=vmkit/branches/multi-vm/include/mvm/GC/GC.h&r1=120463&r2=120611&rev=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/GC/GC.h (original)
+++ vmkit/branches/multi-vm/include/mvm/GC.h Wed Dec  1 16:00:10 2010
@@ -8,36 +8,56 @@
 //===----------------------------------------------------------------------===//
 
 
-#ifndef MVM_GC_H
-#define MVM_GC_H
+#ifndef _GC_H_
+#define _GC_H_
 
 #include <stdint.h>
 #include "ObjectHeader.h"
 
-struct VirtualTable;
+namespace mvm {
+
+	class VirtualTable;
+	class gc;
 
-class gcRoot {
-public:
-  virtual           ~gcRoot() {}
-  virtual void      tracer(uintptr_t closure) {}
-  uintptr_t header;
+	class gcRoot {
+	public:
+		virtual           ~gcRoot() {}
+		virtual void      tracer(uintptr_t closure) {}
+		uintptr_t header;
   
-  /// getVirtualTable - Returns the virtual table of this object.
-  ///
-  VirtualTable* getVirtualTable() const {
-    return ((VirtualTable**)(this))[0];
-  }
+		/// getVirtualTable - Returns the virtual table of this object.
+		///
+		VirtualTable* getVirtualTable() const {
+			return ((VirtualTable**)(this))[0];
+		}
   
-  /// setVirtualTable - Sets the virtual table of this object.
-  ///
-  void setVirtualTable(VirtualTable* VT) {
-    ((VirtualTable**)(this))[0] = VT;
-  }
-};
+		/// setVirtualTable - Sets the virtual table of this object.
+		///
+		void setVirtualTable(VirtualTable* VT) {
+			((VirtualTable**)(this))[0] = VT;
+		}
+	};
+
+	class CommonVirtualTable {
+	public:
+	};
+
+} // namespace mvm
+
+#include "MvmGC.h"
 
 namespace mvm {
+	class gc : public collectable {
+	};
+
+	class VirtualTable : public GCVirtualTable {
+	public:
+		VirtualTable(uintptr_t d, uintptr_t o, uintptr_t t) : GCVirtualTable(d, o, t) {}
+		VirtualTable() {}
+	};
+
   static const uint32_t HashBits = 8;
   static const uint64_t GCBitMask = ((1 << GCBits) - 1);
-}
+} // namespace mvm
 
 #endif

Modified: vmkit/branches/multi-vm/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/JIT.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/JIT.h (original)
+++ vmkit/branches/multi-vm/include/mvm/JIT.h Wed Dec  1 16:00:10 2010
@@ -19,7 +19,7 @@
 #include "llvm/Target/TargetMachine.h"
 
 #include "mvm/MethodInfo.h"
-#include "mvm/GC/GC.h"
+#include "mvm/GC.h"
 
 namespace llvm {
   class Constant;

Modified: vmkit/branches/multi-vm/include/mvm/MethodInfo.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/MethodInfo.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/MethodInfo.h (original)
+++ vmkit/branches/multi-vm/include/mvm/MethodInfo.h Wed Dec  1 16:00:10 2010
@@ -11,7 +11,7 @@
 #define MVM_METHODINFO_H
 
 #include "mvm/Allocator.h"
-#include "mvm/GC/GC.h"
+#include "mvm/GC.h"
 
 namespace mvm {
 

Modified: vmkit/branches/multi-vm/include/mvm/Threads/Locks.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/Threads/Locks.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Threads/Locks.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Threads/Locks.h Wed Dec  1 16:00:10 2010
@@ -24,10 +24,10 @@
 #define llvm_gcroot(a, b)
 #endif
 
-class gc;
-
 namespace mvm {
 
+class gc;
+
 extern "C" uint8  llvm_atomic_cmp_swap_i8(uint8* ptr,  uint8 cmp,
                                           uint8 val);
 extern "C" uint16 llvm_atomic_cmp_swap_i16(uint16* ptr, uint16 cmp,

Modified: vmkit/branches/multi-vm/include/mvm/Threads/ObjectLocks.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/Threads/ObjectLocks.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Threads/ObjectLocks.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Threads/ObjectLocks.h Wed Dec  1 16:00:10 2010
@@ -12,7 +12,7 @@
 
 #include "ObjectHeader.h"
 #include "mvm/Allocator.h"
-#include "mvm/GC/GC.h"
+#include "mvm/GC.h"
 #include "mvm/Threads/Cond.h"
 #include "mvm/Threads/Locks.h"
 #include "mvm/Threads/Thread.h"

Modified: vmkit/branches/multi-vm/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/Threads/Thread.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Threads/Thread.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Threads/Thread.h Wed Dec  1 16:00:10 2010
@@ -34,10 +34,9 @@
   #define END_CATCH }
 #endif
 
-class gc;
-
 namespace mvm {
 
+class gc;
 class MethodInfo;
 class VirtualMachine;
 

Modified: vmkit/branches/multi-vm/include/mvm/VirtualMachine.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/VirtualMachine.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/VirtualMachine.h (original)
+++ vmkit/branches/multi-vm/include/mvm/VirtualMachine.h Wed Dec  1 16:00:10 2010
@@ -13,7 +13,7 @@
 #include "mvm/Allocator.h"
 #include "mvm/Threads/CollectionRV.h"
 #include "mvm/Threads/Locks.h"
-#include "mvm/GC/GC.h"
+#include "mvm/GC.h"
 
 #include <cassert>
 #include <map>

Modified: vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathConstructor.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathConstructor.inc?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathConstructor.inc (original)
+++ vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathConstructor.inc Wed Dec  1 16:00:10 2010
@@ -78,7 +78,7 @@
                                ArrayObject* args,
                                JavaObject* Clazz, jint index) {
   JavaObject* res = 0;
-  gc* excp = 0;
+	mvm::gc* excp = 0;
 	JavaObject* jexcp;
 	
   llvm_gcroot(cons, 0);

Modified: vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathMethod.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathMethod.inc?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathMethod.inc (original)
+++ vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathMethod.inc Wed Dec  1 16:00:10 2010
@@ -99,7 +99,7 @@
 
   JavaObject* res = 0;
   JavaObject* jexc = 0;
-  gc* exc = 0;
+	mvm::gc* exc = 0;
   
   llvm_gcroot(res, 0);
   llvm_gcroot(Meth, 0);

Modified: vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathReflect.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathReflect.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathReflect.h (original)
+++ vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathReflect.h Wed Dec  1 16:00:10 2010
@@ -10,7 +10,7 @@
 #ifndef JNJVM_CLASSPATH_REFLECT_H
 #define JNJVM_CLASSPATH_REFLECT_H
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 #include "JavaClass.h"
 #include "JavaObject.h"

Modified: vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMObject.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMObject.inc?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMObject.inc (original)
+++ vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMObject.inc Wed Dec  1 16:00:10 2010
@@ -47,7 +47,7 @@
     assert(cl->isClass() && "Not a class!");
     size = cl->asClass()->getVirtualSize();
   }
-  res = (JavaObject*)gc::operator new(size, src->getVirtualTable());
+  res = (JavaObject*)mvm::gc::operator new(size, src->getVirtualTable());
   memcpy((void*)((uintptr_t)res + 2 * sizeof(void*)),
          (void*)((uintptr_t)src + 2 * sizeof(void*)),
          size - 2 * sizeof(void*));

Modified: vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMRuntime.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMRuntime.inc?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMRuntime.inc (original)
+++ vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMRuntime.inc Wed Dec  1 16:00:10 2010
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 #include "types.h"
 

Modified: vmkit/branches/multi-vm/lib/J3/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Compiler/JavaAOTCompiler.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/Compiler/JavaAOTCompiler.cpp Wed Dec  1 16:00:10 2010
@@ -1415,7 +1415,7 @@
   Elemts.push_back(Tracer ? 
       ConstantExpr::getCast(Instruction::BitCast, Tracer, PTy) : N);
   
-  for (uint32_t i = 0; i < VirtualTable::numberOfSpecializedTracers(); i++) {
+  for (uint32_t i = 0; i < mvm::VirtualTable::numberOfSpecializedTracers(); i++) {
     // Push null for now.
     Elemts.push_back(N);
   }
@@ -2211,11 +2211,11 @@
 #ifdef WITH_MMTK
 
 #include <set>
-extern std::set<gc*> __InternalSet__;
+extern std::set<mvm::gc*> __InternalSet__;
 
 CommonClass* JavaAOTCompiler::getUniqueBaseClass(CommonClass* cl) {
-  std::set<gc*>::iterator I = __InternalSet__.begin();
-  std::set<gc*>::iterator E = __InternalSet__.end();
+  std::set<mvm::gc*>::iterator I = __InternalSet__.begin();
+  std::set<mvm::gc*>::iterator E = __InternalSet__.end();
   CommonClass* currentClass = 0;
 
   for (; I != E; ++I) {

Modified: vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp Wed Dec  1 16:00:10 2010
@@ -24,7 +24,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include <../lib/ExecutionEngine/JIT/JIT.h>
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/VirtualMachine.h"
 #include "mvm/VMKit.h"
 

Modified: vmkit/branches/multi-vm/lib/J3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Compiler/LLVMInfo.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/Compiler/LLVMInfo.cpp Wed Dec  1 16:00:10 2010
@@ -16,7 +16,7 @@
 #include "llvm/Support/MutexGuard.h"
 #include "llvm/Target/TargetData.h"
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/JIT.h"
 
 #include "JavaConstantPool.h"

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JNIReferences.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JNIReferences.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JNIReferences.h (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JNIReferences.h Wed Dec  1 16:00:10 2010
@@ -25,7 +25,7 @@
 private:
   JNILocalReferences* prev;
   uint32_t length;
-  gc* localReferences[MAXIMUM_REFERENCES];
+	mvm::gc* localReferences[MAXIMUM_REFERENCES];
 
 public:
   
@@ -34,7 +34,7 @@
     length = 0;
   }
 
-  gc** addJNIReference(JavaThread* th, gc* obj);
+	mvm::gc** addJNIReference(JavaThread* th, mvm::gc* obj);
 
   void removeJNIReferences(JavaThread* th, uint32_t num);
 

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JavaClass.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JavaClass.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JavaClass.cpp Wed Dec  1 16:00:10 2010
@@ -263,9 +263,9 @@
   UserCommonClass* cl = baseClass();
   uint32 logSize = cl->isPrimitive() ? 
     cl->asPrimitiveClass()->logSize : (sizeof(JavaObject*) == 8 ? 3 : 2);
-  VirtualTable* VT = virtualVT;
+	mvm::VirtualTable* VT = virtualVT;
   uint32 size = sizeof(JavaObject) + sizeof(ssize_t) + (n << logSize);
-  res = (JavaObject*)gc::operator new(size, VT);
+  res = (JavaObject*)mvm::gc::operator new(size, VT);
   JavaArray::setSize(res, n);
   return res;
 }
@@ -456,7 +456,7 @@
           this == classLoader->bootstrapLoader->upcalls->newClass)
          && "Uninitialized class when allocating.");
   assert(getVirtualVT() && "No VT\n");
-  res = (JavaObject*)gc::operator new(getVirtualSize(), getVirtualVT());
+  res = (JavaObject*)mvm::gc::operator new(getVirtualSize(), getVirtualVT());
 
   return res;
 }

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JavaObject.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JavaObject.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JavaObject.h (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JavaObject.h Wed Dec  1 16:00:10 2010
@@ -11,7 +11,7 @@
 #define JNJVM_JAVA_OBJECT_H
 
 #include "mvm/Allocator.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/UTF8.h"
 #include "mvm/Threads/Locks.h"
 #include "mvm/Threads/Thread.h"
@@ -46,7 +46,7 @@
 /// These are placed here for fast access of information from a Java object
 /// (that only points to the VT, not the class).
 ///
-class JavaVirtualTable : public VirtualTable {
+class JavaVirtualTable : public mvm::VirtualTable {
 public:
 
   /// cl - The class which defined this virtual table.
@@ -228,7 +228,7 @@
 
 /// JavaObject - This class represents a Java object.
 ///
-class JavaObject : public gc {
+class JavaObject : public mvm::gc {
 private:
   
   /// waitIntern - internal wait on a monitor

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JavaRuntimeJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JavaRuntimeJIT.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JavaRuntimeJIT.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JavaRuntimeJIT.cpp Wed Dec  1 16:00:10 2010
@@ -53,7 +53,7 @@
   // exception check. Therefore, we trick LLVM to check the return value of the
   // function.
 #define hack_check(type)																							\
-		gc* obj = mvm::Thread::get()->getPendingException();							\
+		mvm::gc* obj = mvm::Thread::get()->getPendingException();					\
 		if (obj) return (type)obj;
 
 	hack_check(void*);

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.cpp Wed Dec  1 16:00:10 2010
@@ -139,8 +139,7 @@
   }
 }
 
-gc** JNILocalReferences::addJNIReference(JavaThread* th,
-                                                 gc* obj) {
+mvm::gc** JNILocalReferences::addJNIReference(JavaThread* th, mvm::gc* obj) {
   llvm_gcroot(obj, 0);
   
   if (length == MAXIMUM_REFERENCES) {

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.h (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JavaThread.h Wed Dec  1 16:00:10 2010
@@ -89,7 +89,7 @@
   ///
   JNILocalReferences* localJNIRefs;
 
-  gc** pushJNIRef(gc* obj) {
+	mvm::gc** pushJNIRef(mvm::gc* obj) {
     llvm_gcroot(obj, 0);
     if (!obj) return 0;
    

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/Jni.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/Jni.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/Jni.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/Jni.cpp Wed Dec  1 16:00:10 2010
@@ -187,7 +187,7 @@
   
   BEGIN_JNI_EXCEPTION
 
-	gc* obj = mut->getPendingException();
+	mvm::gc* obj = mut->getPendingException();
   llvm_gcroot(obj, 0);
   if (obj == NULL) RETURN_FROM_JNI(NULL);
   jthrowable res = (jthrowable)JavaThread::j3Thread(mut)->pushJNIRef(obj);

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.cpp Wed Dec  1 16:00:10 2010
@@ -20,7 +20,7 @@
 
 #include "mvm/Threads/Thread.h"
 #include "mvm/VMKit.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 #include "ClasspathReflect.h"
 #include "JavaArray.h"
@@ -47,7 +47,7 @@
 /// initialiseClass - Java class initialisation. Java specification §2.17.5.
 
 void UserClass::initialiseClass(Jnjvm* vm) {
-  gc* exc = NULL;
+	mvm::gc* exc = NULL;
   JavaObject* obj = NULL;
 	JavaObject* jexc;
 	
@@ -1182,7 +1182,7 @@
 }
 
 void Jnjvm::executeClass(const char* className, ArrayObject* args) {
-  gc* exc = NULL;
+	mvm::gc* exc = NULL;
   JavaObject* obj = NULL;
   JavaObject* group = NULL;
   
@@ -1270,7 +1270,7 @@
   JavaString* str = NULL;
   JavaObject* instrumenter = NULL;
   ArrayObject* args = NULL;
-  gc* exc = NULL;
+	mvm::gc* exc = NULL;
 	JavaObject *jexc;
 	
 	llvm_gcroot(jexc, 0);
@@ -1422,12 +1422,12 @@
   finalizerThread->scanFinalizationQueue(closure);
 }
 
-void Jnjvm::addFinalizationCandidate(gc* object) {
+void Jnjvm::addFinalizationCandidate(mvm::gc* object) {
   llvm_gcroot(object, 0);
   finalizerThread->addFinalizationCandidate(object);
 }
 
-size_t Jnjvm::getObjectSize(gc* object) {
+size_t Jnjvm::getObjectSize(mvm::gc* object) {
   // TODO: because this is called during GC, there is no need to do
   // llvm_gcroot. For clarity, it may be useful to have a special type
   // in this case.
@@ -1453,7 +1453,7 @@
   return size;
 }
 
-const char* Jnjvm::getObjectTypeName(gc* object) {
+const char* Jnjvm::getObjectTypeName(mvm::gc* object) {
   JavaObject* src = (JavaObject*)object;
   if (VMClassLoader::isVMClassLoader(src)) {
     return "VMClassLoader";

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.h (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/Jnjvm.h Wed Dec  1 16:00:10 2010
@@ -137,9 +137,9 @@
   virtual void scanSoftReferencesQueue(uintptr_t closure);
   virtual void scanPhantomReferencesQueue(uintptr_t closure);
   virtual void scanFinalizationQueue(uintptr_t closure);
-  virtual void addFinalizationCandidate(gc* obj);
-  virtual size_t getObjectSize(gc* obj);
-  virtual const char* getObjectTypeName(gc* obj);
+  virtual void addFinalizationCandidate(mvm::gc* obj);
+  virtual size_t getObjectSize(mvm::gc* obj);
+  virtual const char* getObjectTypeName(mvm::gc* obj);
 
   /// CreateError - Creates a Java object of the specified exception class
   /// and calling its <init> function.
@@ -368,7 +368,7 @@
 
 	// asjavaException - convert from gc to JavaObject. Will be used to identify the points
 	// where we must test the original vm of the exception
-	static JavaObject* asJavaException(gc* o) { llvm_gcroot(o, 0); return (JavaObject*)o; } 
+	static JavaObject* asJavaException(mvm::gc* o) { llvm_gcroot(o, 0); return (JavaObject*)o; } 
 };
 
 } // end namespace j3

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp Wed Dec  1 16:00:10 2010
@@ -669,7 +669,7 @@
 
 UserClass* JnjvmClassLoader::constructClass(const UTF8* name,
                                             ClassBytes* bytes) {
-  gc* excp = NULL;
+	mvm::gc* excp = NULL;
   llvm_gcroot(excp, 0);
   UserClass* res = NULL;
   lock.lock();

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.h (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.h Wed Dec  1 16:00:10 2010
@@ -452,7 +452,7 @@
 
   /// VT - The VirtualTable for this GC-class.
   ///
-  static VirtualTable VT;
+  static mvm::VirtualTable VT;
 
   /// Is the object a VMClassLoader object?
   ///

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.cpp Wed Dec  1 16:00:10 2010
@@ -21,7 +21,7 @@
     SoftReferencesQueue(ReferenceQueue::SOFT), 
     PhantomReferencesQueue(ReferenceQueue::PHANTOM) {
 
-  ToEnqueue = new gc*[INITIAL_QUEUE_SIZE];
+  ToEnqueue = new mvm::gc*[INITIAL_QUEUE_SIZE];
   ToEnqueueLength = INITIAL_QUEUE_SIZE;
   ToEnqueueIndex = 0;
 
@@ -29,7 +29,7 @@
 }
 
 
-bool enqueueReference(gc* _obj) {
+bool enqueueReference(mvm::gc* _obj) {
   Jnjvm* vm = JavaThread::get()->getJVM();
   JavaObject* obj = (JavaObject*)_obj;
   llvm_gcroot(obj, 0);
@@ -38,7 +38,7 @@
   return (bool)meth->invokeIntSpecialBuf(vm, cl, obj, 0);
 }
 
-void invokeEnqueue(gc* res) {
+void invokeEnqueue(mvm::gc* res) {
   llvm_gcroot(res, 0);
   TRY {
     enqueueReference(res);
@@ -47,7 +47,7 @@
 }
 
 void ReferenceThread::enqueueStart(ReferenceThread* th) {
-  gc* res = NULL;
+	mvm::gc* res = NULL;
   llvm_gcroot(res, 0);
 
   while (true) {
@@ -73,11 +73,11 @@
 }
 
 
-void ReferenceThread::addToEnqueue(gc* obj) {
+void ReferenceThread::addToEnqueue(mvm::gc* obj) {
   llvm_gcroot(obj, 0);
   if (ToEnqueueIndex >= ToEnqueueLength) {
     uint32 newLength = ToEnqueueLength * GROW_FACTOR;
-    gc** newQueue = new gc*[newLength];
+		mvm::gc** newQueue = new mvm::gc*[newLength];
     if (!newQueue) {
       fprintf(stderr, "I don't know how to handle reference overflow yet!\n");
       abort();
@@ -92,32 +92,32 @@
   ToEnqueue[ToEnqueueIndex++] = obj;
 }
 
-gc** getReferentPtr(gc* _obj) {
+mvm::gc** getReferentPtr(mvm::gc* _obj) {
   JavaObjectReference* obj = (JavaObjectReference*)_obj;
   llvm_gcroot(obj, 0);
-  return (gc**)JavaObjectReference::getReferentPtr(obj);
+  return (mvm::gc**)JavaObjectReference::getReferentPtr(obj);
 }
 
-void setReferent(gc* _obj, gc* val) {
+void setReferent(mvm::gc* _obj, mvm::gc* val) {
   JavaObjectReference* obj = (JavaObjectReference*)_obj;
   llvm_gcroot(obj, 0);
   llvm_gcroot(val, 0);
   JavaObjectReference::setReferent(obj, (JavaObject*)val);
 }
  
-void clearReferent(gc* _obj) {
+void clearReferent(mvm::gc* _obj) {
   JavaObjectReference* obj = (JavaObjectReference*)_obj;
   llvm_gcroot(obj, 0);
   JavaObjectReference::setReferent(obj, NULL);
 }
 
-gc* ReferenceQueue::processReference(gc* reference, ReferenceThread* th, uintptr_t closure) {
+mvm::gc* ReferenceQueue::processReference(mvm::gc* reference, ReferenceThread* th, uintptr_t closure) {
   if (!mvm::Collector::isLive(reference, closure)) {
     clearReferent(reference);
     return NULL;
   }
 
-  gc* referent = *(getReferentPtr(reference));
+	mvm::gc* referent = *(getReferentPtr(reference));
 
   if (!referent) {
     return NULL;
@@ -132,10 +132,10 @@
     // Nothing to do.
   }
 
-  gc* newReference =
+	mvm::gc* newReference =
       mvm::Collector::getForwardedReference(reference, closure);
   if (mvm::Collector::isLive(referent, closure)) {
-    gc* newReferent = mvm::Collector::getForwardedReferent(referent, closure);
+		mvm::gc* newReferent = mvm::Collector::getForwardedReferent(referent, closure);
     setReferent(newReference, newReferent);
     return newReference;
   } else {
@@ -150,8 +150,8 @@
   uint32 NewIndex = 0;
 
   for (uint32 i = 0; i < CurrentIndex; ++i) {
-    gc* obj = References[i];
-    gc* res = processReference(obj, th, closure);
+		mvm::gc* obj = References[i];
+		mvm::gc* res = processReference(obj, th, closure);
     if (res) References[NewIndex++] = res;
   }
 
@@ -160,11 +160,11 @@
 
 
 FinalizerThread::FinalizerThread(Jnjvm* vm) : MutatorThread(vm->vmkit) {
-  FinalizationQueue = new gc*[INITIAL_QUEUE_SIZE];
+  FinalizationQueue = new mvm::gc*[INITIAL_QUEUE_SIZE];
   QueueLength = INITIAL_QUEUE_SIZE;
   CurrentIndex = 0;
 
-  ToBeFinalized = new gc*[INITIAL_QUEUE_SIZE];
+  ToBeFinalized = new mvm::gc*[INITIAL_QUEUE_SIZE];
   ToBeFinalizedLength = INITIAL_QUEUE_SIZE;
   CurrentFinalizedIndex = 0;
 
@@ -174,7 +174,7 @@
 void FinalizerThread::growFinalizationQueue() {
   if (CurrentIndex >= QueueLength) {
     uint32 newLength = QueueLength * GROW_FACTOR;
-    gc** newQueue = new gc*[newLength];
+		mvm::gc** newQueue = new mvm::gc*[newLength];
     if (!newQueue) {
       fprintf(stderr, "I don't know how to handle finalizer overflows yet!\n");
       abort();
@@ -189,7 +189,7 @@
 void FinalizerThread::growToBeFinalizedQueue() {
   if (CurrentFinalizedIndex >= ToBeFinalizedLength) {
     uint32 newLength = ToBeFinalizedLength * GROW_FACTOR;
-    gc** newQueue = new gc*[newLength];
+		mvm::gc** newQueue = new mvm::gc*[newLength];
     if (!newQueue) {
       fprintf(stderr, "I don't know how to handle finalizer overflows yet!\n");
       abort();
@@ -202,7 +202,7 @@
 }
 
 
-void FinalizerThread::addFinalizationCandidate(gc* obj) {
+void FinalizerThread::addFinalizationCandidate(mvm::gc* obj) {
   llvm_gcroot(obj, 0);
   FinalizationQueueLock.acquire();
  
@@ -218,7 +218,7 @@
 void FinalizerThread::scanFinalizationQueue(uintptr_t closure) {
   uint32 NewIndex = 0;
   for (uint32 i = 0; i < CurrentIndex; ++i) {
-    gc* obj = FinalizationQueue[i];
+		mvm::gc* obj = FinalizationQueue[i];
 
     if (!mvm::Collector::isLive(obj, closure)) {
       obj = mvm::Collector::retainForFinalize(FinalizationQueue[i], closure);
@@ -238,7 +238,7 @@
 
 typedef void (*destructor_t)(void*);
 
-void invokeFinalizer(gc* _obj) {
+void invokeFinalizer(mvm::gc* _obj) {
   Jnjvm* vm = JavaThread::get()->getJVM();
   JavaObject* obj = (JavaObject*)_obj;
   llvm_gcroot(obj, 0);
@@ -247,7 +247,7 @@
   meth->invokeIntVirtualBuf(vm, cl, obj, 0);
 }
 
-void invokeFinalize(gc* res) {
+void invokeFinalize(mvm::gc* res) {
   llvm_gcroot(res, 0);
   TRY {
     invokeFinalizer(res);
@@ -256,7 +256,7 @@
 }
 
 void FinalizerThread::finalizerStart(FinalizerThread* th) {
-  gc* res = NULL;
+	mvm::gc* res = NULL;
   llvm_gcroot(res, 0);
 
   while (true) {
@@ -275,7 +275,7 @@
       th->FinalizationQueueLock.release();
       if (!res) break;
 
-      VirtualTable* VT = res->getVirtualTable();
+			mvm::VirtualTable* VT = res->getVirtualTable();
       if (VT->operatorDelete) {
         destructor_t dest = (destructor_t)VT->destructor;
         dest(res);

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.h (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/ReferenceQueue.h Wed Dec  1 16:00:10 2010
@@ -25,13 +25,13 @@
 
 class ReferenceQueue {
 private:
-  gc** References;
+	mvm::gc** References;
   uint32 QueueLength;
   uint32 CurrentIndex;
   mvm::SpinLock QueueLock;
   uint8_t semantics;
 
-  gc* processReference(gc*, ReferenceThread*, uintptr_t closure);
+	mvm::gc* processReference(mvm::gc*, ReferenceThread*, uintptr_t closure);
 public:
 
   static const uint8_t WEAK = 1;
@@ -40,8 +40,8 @@
 
 
   ReferenceQueue(uint8_t s) {
-    References = new gc*[INITIAL_QUEUE_SIZE];
-    memset(References, 0, INITIAL_QUEUE_SIZE * sizeof(gc*));
+    References = new mvm::gc*[INITIAL_QUEUE_SIZE];
+    memset(References, 0, INITIAL_QUEUE_SIZE * sizeof(mvm::gc*));
     QueueLength = INITIAL_QUEUE_SIZE;
     CurrentIndex = 0;
     semantics = s;
@@ -51,13 +51,13 @@
     delete[] References;
   }
  
-  void addReference(gc* ref) {
+  void addReference(mvm::gc* ref) {
     llvm_gcroot(ref, 0);
     QueueLock.acquire();
     if (CurrentIndex >= QueueLength) {
       uint32 newLength = QueueLength * GROW_FACTOR;
-      gc** newQueue = new gc*[newLength];
-      memset(newQueue, 0, newLength * sizeof(gc*));
+			mvm::gc** newQueue = new mvm::gc*[newLength];
+      memset(newQueue, 0, newLength * sizeof(mvm::gc*));
       if (!newQueue) {
         fprintf(stderr, "I don't know how to handle reference overflow yet!\n");
         abort();
@@ -96,7 +96,7 @@
   ///
   ReferenceQueue PhantomReferencesQueue;
 
-  gc** ToEnqueue;
+	mvm::gc** ToEnqueue;
   uint32 ToEnqueueLength;
   uint32 ToEnqueueIndex;
   
@@ -106,27 +106,27 @@
   mvm::Cond EnqueueCond;
   mvm::SpinLock ToEnqueueLock;
 
-  void addToEnqueue(gc* obj);
+  void addToEnqueue(mvm::gc* obj);
 
   static void enqueueStart(ReferenceThread*);
 
   /// addWeakReference - Add a weak reference to the queue.
   ///
-  void addWeakReference(gc* ref) {
+  void addWeakReference(mvm::gc* ref) {
     llvm_gcroot(ref, 0);
     WeakReferencesQueue.addReference(ref);
   }
   
   /// addSoftReference - Add a weak reference to the queue.
   ///
-  void addSoftReference(gc* ref) {
+  void addSoftReference(mvm::gc* ref) {
     llvm_gcroot(ref, 0);
     SoftReferencesQueue.addReference(ref);
   }
   
   /// addPhantomReference - Add a weak reference to the queue.
   ///
-  void addPhantomReference(gc* ref) {
+  void addPhantomReference(mvm::gc* ref) {
     llvm_gcroot(ref, 0);
     PhantomReferencesQueue.addReference(ref);
   }
@@ -147,7 +147,7 @@
   /// finalizationQueue - A list of allocated objets that contain a finalize
   /// method.
   ///
-  gc** FinalizationQueue;
+	mvm::gc** FinalizationQueue;
 
   /// CurrentIndex - Current index in the queue of finalizable objects.
   ///
@@ -163,7 +163,7 @@
   
   /// ToBeFinalized - List of objects that are scheduled to be finalized.
   ///
-  gc** ToBeFinalized;
+	mvm::gc** ToBeFinalized;
   
   /// ToBeFinalizedLength - Current length of the queue of objects scheduled
   /// for finalization.
@@ -192,7 +192,7 @@
   /// addFinalizationCandidate - Add an object to the queue of objects with
   /// a finalization method.
   ///
-  void addFinalizationCandidate(gc*);
+  void addFinalizationCandidate(mvm::gc*);
 
   /// scanFinalizationQueue - Scan objets with a finalized method and schedule
   /// them for finalization if they are not live.

Modified: vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp Wed Dec  1 16:00:10 2010
@@ -53,9 +53,9 @@
 // Classpath with the vmdata field).
 //===----------------------------------------------------------------------===//
 
-VirtualTable VMClassLoader::VT((uintptr_t)VMClassLoader::staticDestructor,
-                               (uintptr_t)VMClassLoader::staticDestructor,
-                               (uintptr_t)VMClassLoader::staticTracer);
+mvm::VirtualTable VMClassLoader::VT((uintptr_t)VMClassLoader::staticDestructor,
+																		(uintptr_t)VMClassLoader::staticDestructor,
+																		(uintptr_t)VMClassLoader::staticTracer);
 
 //===----------------------------------------------------------------------===//
 // Trace methods for Java objects. There are four types of objects:
@@ -336,7 +336,7 @@
   JNILocalReferences* end = localJNIRefs;
   while (end != NULL) {
     for (uint32 i = 0; i < end->length; ++i) {
-      gc** obj = end->localReferences + i;
+			mvm::gc** obj = end->localReferences + i;
       mvm::Collector::markAndTraceRoot(obj, closure);
     }
     end = end->prev;

Modified: vmkit/branches/multi-vm/lib/Mvm/Allocator/gcchunk.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Allocator/gcchunk.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Allocator/gcchunk.h (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Allocator/gcchunk.h Wed Dec  1 16:00:10 2010
@@ -11,11 +11,12 @@
 #define _GC_CHUNK_H_
 
 #include "mvm/VirtualMachine.h"
+#include "mvm/GC.h"
 
 #include "gcmapper.h"
 #include "types.h"
 
-class gcRoot;        /* object collectable */
+using namespace mvm;
 
 /* description d'un bout de mémoire */
 class GCChunkNode {

Modified: vmkit/branches/multi-vm/lib/Mvm/BoehmGC/MvmGC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/BoehmGC/MvmGC.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/BoehmGC/MvmGC.h (original)
+++ vmkit/branches/multi-vm/lib/Mvm/BoehmGC/MvmGC.h Wed Dec  1 16:00:10 2010
@@ -29,12 +29,11 @@
 
 extern "C" void * GC_dlopen(const char *path, int mode) throw ();
 
-#include "mvm/GC/GC.h"
-
 #define  gc_new(Class)  __gc_new(Class::VT) Class
 #define __gc_new new
 
-class gc : public gcRoot {
+namespace mvm {
+class collectable : public gcRoot {
 public:
 
   void markAndTrace() const {}
@@ -141,6 +140,6 @@
     return true;
   }
 };
-
+}
 
 #endif

Modified: vmkit/branches/multi-vm/lib/Mvm/BoehmGC/gc.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/BoehmGC/gc.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/BoehmGC/gc.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/BoehmGC/gc.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/Threads/Thread.h"
 
 using namespace mvm;

Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp Wed Dec  1 16:00:10 2010
@@ -9,7 +9,7 @@
 
 #include <cassert>
 #include <signal.h>
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/VirtualMachine.h"
 #include "mvm/Threads/CollectionRV.h"
 #include "mvm/VMKit.h"

Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/ObjectLocks.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/ObjectLocks.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/ObjectLocks.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/ObjectLocks.cpp Wed Dec  1 16:00:10 2010
@@ -14,7 +14,7 @@
 #include "mvm/Threads/ObjectLocks.h"
 #include "mvm/Threads/Thread.h"
 #include "mvm/VirtualMachine.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "cterror.h"
 #include <cerrno>
 #include <sys/time.h>

Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctlock.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctlock.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctlock.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctlock.cpp Wed Dec  1 16:00:10 2010
@@ -13,7 +13,7 @@
 #include "mvm/Threads/Locks.h"
 #include "mvm/Threads/Thread.h"
 #include "mvm/VirtualMachine.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "cterror.h"
 #include <cerrno>
 #include <sys/time.h>

Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp Wed Dec  1 16:00:10 2010
@@ -9,7 +9,7 @@
 
 #include "debug.h"
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/MethodInfo.h"
 #include "mvm/VirtualMachine.h"
 #include "mvm/Threads/Cond.h"

Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/EscapeAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/EscapeAnalysis.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/EscapeAnalysis.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/EscapeAnalysis.cpp Wed Dec  1 16:00:10 2010
@@ -23,9 +23,10 @@
 #include <cstddef>
 #include <map>
 
-#include "mvm/GC/GC.h"
+#include "mvm/GC.h"
 
 using namespace llvm;
+using namespace mvm;
 
 namespace {
 

Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp Wed Dec  1 16:00:10 2010
@@ -42,9 +42,8 @@
 #include "mvm/Threads/Locks.h"
 #include "mvm/Threads/Thread.h"
 #include "mvm/VirtualMachine.h"
-#include "mvm/GC/GC.h"
 #include "MutatorThread.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 #include <dlfcn.h>
 #include <sys/mman.h>

Modified: vmkit/branches/multi-vm/lib/Mvm/GCMmap2/MvmGC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/GCMmap2/MvmGC.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/GCMmap2/MvmGC.h (original)
+++ vmkit/branches/multi-vm/lib/Mvm/GCMmap2/MvmGC.h Wed Dec  1 16:00:10 2010
@@ -11,13 +11,14 @@
 #ifndef MVM_MMAP_GC_H
 #define MVM_MMAP_GC_H
 
-#include "mvm/GC/GC.h"
 #include "types.h"
 #include "gcalloc.h"
 
 #define gc_allocator std::allocator
 
-struct VirtualTable {
+namespace mvm {
+class GCVirtualTable : public CommonVirtualTable {
+public:
   uintptr_t destructor;
   uintptr_t operatorDelete;
   uintptr_t tracer;
@@ -34,19 +35,17 @@
     return &destructor;
   }
 
-  VirtualTable(uintptr_t d, uintptr_t o, uintptr_t t) {
+  GCVirtualTable(uintptr_t d, uintptr_t o, uintptr_t t) {
     destructor = d;
     operatorDelete = o;
     tracer = t;
   }
 
-  VirtualTable() {}
+  GCVirtualTable() {}
 
   static void emptyTracer(void*) {}
 };
 
-namespace mvm {
-
 class Thread;
 
 class Collector {
@@ -361,10 +360,7 @@
 
 };
 
-}
-
-
-class gc : public gcRoot {
+class collectable : public gcRoot {
 public:
  
   size_t objectSize() const {
@@ -389,4 +385,6 @@
 
 };
 
+}
+
 #endif

Modified: vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gc.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gc.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gc.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gc.cpp Wed Dec  1 16:00:10 2010
@@ -9,7 +9,7 @@
 
 #include "mvm/GC/GC.h"
 #include "mvm/Threads/Thread.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 using namespace mvm;
 

Modified: vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gccollector.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gccollector.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gccollector.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gccollector.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 using namespace mvm;
 

Modified: vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gcinit.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gcinit.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gcinit.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/GCMmap2/gcinit.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 using namespace mvm;
 

Removed: vmkit/branches/multi-vm/lib/Mvm/MMTk/MutatorThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/MMTk/MutatorThread.cpp?rev=120610&view=auto
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/MMTk/MutatorThread.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/MMTk/MutatorThread.cpp (removed)
@@ -1,14 +0,0 @@
-//===--------- MutatorThread.cpp - Thread for GC --------------------------===//
-//
-//                     The VMKit project
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-
-#include "MutatorThread.h"
-#include "MvmGC.h"
-
-using namespace mvm;

Modified: vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "MutatorThread.h"
 #include "mvm/VirtualMachine.h"
 

Modified: vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.h (original)
+++ vmkit/branches/multi-vm/lib/Mvm/MMTk/MvmGC.h Wed Dec  1 16:00:10 2010
@@ -11,12 +11,14 @@
 #ifndef MVM_MMTK_GC_H
 #define MVM_MMTK_GC_H
 
-#include "mvm/GC/GC.h"
 #include <cstdlib>
 
 #define gc_allocator std::allocator
 
-struct VirtualTable {
+namespace mvm {
+
+class GCVirtualTable : public CommonVirtualTable {
+public:
   uintptr_t destructor;
   uintptr_t operatorDelete;
   uintptr_t tracer;
@@ -34,20 +36,20 @@
     return &destructor;
   }
 
-  VirtualTable(uintptr_t d, uintptr_t o, uintptr_t t) {
+  GCVirtualTable(uintptr_t d, uintptr_t o, uintptr_t t) {
     destructor = d;
     operatorDelete = o;
     tracer = t;
   }
 
-  VirtualTable() {}
+  GCVirtualTable() {}
 
   static void emptyTracer(void*) {}
 };
 
 extern "C" void* gcmallocUnresolved(uint32_t sz, VirtualTable* VT);
 
-class gc : public gcRoot {
+class collectable : public gcRoot {
 public:
 
   size_t objectSize() const {
@@ -60,8 +62,6 @@
   }
 
 };
-
-namespace mvm {
   
 class Collector {
 public:

Modified: vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp Wed Dec  1 16:00:10 2010
@@ -10,7 +10,7 @@
 #include "mvm/Allocator.h"
 #include "mvm/MethodInfo.h"
 #include "mvm/VirtualMachine.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 #include <dlfcn.h>
 #include <map>

Modified: vmkit/branches/multi-vm/lib/Mvm/Runtime/PrintBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Runtime/PrintBuffer.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Runtime/PrintBuffer.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Runtime/PrintBuffer.cpp Wed Dec  1 16:00:10 2010
@@ -10,7 +10,7 @@
 #include <cstdio>
 #include <cstdlib>
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/PrintBuffer.h"
 
 using namespace mvm;

Modified: vmkit/branches/multi-vm/mmtk/mmtk-alloc/Selected.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-alloc/Selected.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-alloc/Selected.cpp (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-alloc/Selected.cpp Wed Dec  1 16:00:10 2010
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "MutatorThread.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 #include "mvm/VirtualMachine.h"
 

Modified: vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp Wed Dec  1 16:00:10 2010
@@ -11,7 +11,7 @@
 #include "mvm/VirtualMachine.h"
 #include "mvm/VMKit.h"
 #include "MMTkObject.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 namespace mmtk {
 

Modified: vmkit/branches/multi-vm/mmtk/mmtk-j3/MMTkObject.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-j3/MMTkObject.h?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-j3/MMTkObject.h (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-j3/MMTkObject.h Wed Dec  1 16:00:10 2010
@@ -12,7 +12,7 @@
 
 #include <stdint.h>
 #include "MutatorThread.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 namespace mmtk {
 
@@ -22,7 +22,7 @@
   MMTkObject* delegatee;
 };
 
-struct MMTkVirtualTable : public VirtualTable {
+struct MMTkVirtualTable : public mvm::VirtualTable {
   MMTkClass* cl;
 };
 

Modified: vmkit/branches/multi-vm/mmtk/mmtk-j3/ObjectModel.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-j3/ObjectModel.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-j3/ObjectModel.cpp (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-j3/ObjectModel.cpp Wed Dec  1 16:00:10 2010
@@ -21,24 +21,24 @@
   return sizeof(void*);
 }
 
-extern "C" uintptr_t Java_org_j3_mmtk_ObjectModel_readAvailableBitsWord__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, gc* obj) {
+extern "C" uintptr_t Java_org_j3_mmtk_ObjectModel_readAvailableBitsWord__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, mvm::gc* obj) {
   return obj->header;
 }
 
 extern "C" void Java_org_j3_mmtk_ObjectModel_writeAvailableBitsWord__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_Word_2 (
-    MMTkObject* OM, gc* obj, uintptr_t val) {
+    MMTkObject* OM, mvm::gc* obj, uintptr_t val) {
   obj->header = val;
 }
 
-extern "C" gc* Java_org_j3_mmtk_ObjectModel_objectStartRef__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, gc* obj) {
+extern "C" mvm::gc* Java_org_j3_mmtk_ObjectModel_objectStartRef__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, mvm::gc* obj) {
   return obj;
 }
 
-extern "C" gc* Java_org_j3_mmtk_ObjectModel_refToAddress__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, gc* obj) {
+extern "C" mvm::gc* Java_org_j3_mmtk_ObjectModel_refToAddress__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, mvm::gc* obj) {
   return obj;
 }
 
-extern "C" uint8_t Java_org_j3_mmtk_ObjectModel_readAvailableByte__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, gc* obj) {
+extern "C" uint8_t Java_org_j3_mmtk_ObjectModel_readAvailableByte__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, mvm::gc* obj) {
 #if defined(__PPC__)
   return ((uint8_t*)obj)[7];
 #else
@@ -46,7 +46,7 @@
 #endif
 }
 
-extern "C" void Java_org_j3_mmtk_ObjectModel_writeAvailableByte__Lorg_vmmagic_unboxed_ObjectReference_2B (MMTkObject* OM, gc* obj, uint8_t val) {
+extern "C" void Java_org_j3_mmtk_ObjectModel_writeAvailableByte__Lorg_vmmagic_unboxed_ObjectReference_2B (MMTkObject* OM, mvm::gc* obj, uint8_t val) {
 #if defined(__PPC__)
   ((uint8_t*)obj)[7] = val;
 #else
@@ -54,17 +54,17 @@
 #endif
 }
 
-extern "C" gc* Java_org_j3_mmtk_ObjectModel_getObjectFromStartAddress__Lorg_vmmagic_unboxed_Address_2 (MMTkObject* OM, gc* obj) {
+extern "C" mvm::gc* Java_org_j3_mmtk_ObjectModel_getObjectFromStartAddress__Lorg_vmmagic_unboxed_Address_2 (MMTkObject* OM, mvm::gc* obj) {
   return obj;
 }
 
-extern "C" uintptr_t Java_org_j3_mmtk_ObjectModel_prepareAvailableBits__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, gc* obj) {
+extern "C" uintptr_t Java_org_j3_mmtk_ObjectModel_prepareAvailableBits__Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* OM, mvm::gc* obj) {
   return obj->header;
 }
 
 extern "C" uint8_t
 Java_org_j3_mmtk_ObjectModel_attemptAvailableBits__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_Word_2Lorg_vmmagic_unboxed_Word_2(
-    MMTkObject* OM, gc* obj, intptr_t oldValue, intptr_t newValue) { 
+    MMTkObject* OM, mvm::gc* obj, intptr_t oldValue, intptr_t newValue) { 
   intptr_t val = __sync_val_compare_and_swap(&(obj->header), oldValue, newValue);
   return (val == oldValue);
 }
@@ -78,13 +78,13 @@
 }
 
 extern "C" uintptr_t JnJVM_org_j3_bindings_Bindings_copy__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II(
-    gc* obj, VirtualTable* VT, int size, int allocator) ALWAYS_INLINE;
+                 mvm::gc* obj, mvm::VirtualTable* VT, int size, int allocator) ALWAYS_INLINE;
 
 extern "C" uintptr_t Java_org_j3_mmtk_ObjectModel_copy__Lorg_vmmagic_unboxed_ObjectReference_2I (
-    MMTkObject* OM, gc* src, int allocator) ALWAYS_INLINE;
+    MMTkObject* OM, mvm::gc* src, int allocator) ALWAYS_INLINE;
 
 extern "C" uintptr_t Java_org_j3_mmtk_ObjectModel_copy__Lorg_vmmagic_unboxed_ObjectReference_2I (
-    MMTkObject* OM, gc* src, int allocator) {
+    MMTkObject* OM, mvm::gc* src, int allocator) {
   size_t size = mvm::Thread::get()->MyVM->getObjectSize(src);
   size = llvm::RoundUpToAlignment(size, sizeof(void*));
   uintptr_t res = JnJVM_org_j3_bindings_Bindings_copy__Lorg_vmmagic_unboxed_ObjectReference_2Lorg_vmmagic_unboxed_ObjectReference_2II(
@@ -136,7 +136,7 @@
 };
 
 extern "C" FakeByteArray* Java_org_j3_mmtk_ObjectModel_getTypeDescriptor__Lorg_vmmagic_unboxed_ObjectReference_2 (
-    MMTkObject* OM, gc* src) {
+    MMTkObject* OM, mvm::gc* src) {
   const char* name = mvm::Thread::get()->MyVM->getObjectTypeName(src);
   // This code is only used for debugging on a fatal error. It is fine to
   // allocate in the C++ heap.

Modified: vmkit/branches/multi-vm/mmtk/mmtk-j3/Scanning.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-j3/Scanning.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-j3/Scanning.cpp (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-j3/Scanning.cpp Wed Dec  1 16:00:10 2010
@@ -10,7 +10,7 @@
 #include "debug.h"
 #include "mvm/VirtualMachine.h"
 #include "MMTkObject.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 
 namespace mmtk {
 
@@ -46,9 +46,9 @@
   // Nothing to do.
 }
 
-extern "C" void Java_org_j3_mmtk_Scanning_specializedScanObject__ILorg_mmtk_plan_TransitiveClosure_2Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* Scanning, uint32_t id, MMTkObject* TC, gc* obj) ALWAYS_INLINE;
+extern "C" void Java_org_j3_mmtk_Scanning_specializedScanObject__ILorg_mmtk_plan_TransitiveClosure_2Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* Scanning, uint32_t id, MMTkObject* TC, mvm::gc* obj) ALWAYS_INLINE;
 
-extern "C" void Java_org_j3_mmtk_Scanning_specializedScanObject__ILorg_mmtk_plan_TransitiveClosure_2Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* Scanning, uint32_t id, MMTkObject* TC, gc* obj) {
+extern "C" void Java_org_j3_mmtk_Scanning_specializedScanObject__ILorg_mmtk_plan_TransitiveClosure_2Lorg_vmmagic_unboxed_ObjectReference_2 (MMTkObject* Scanning, uint32_t id, MMTkObject* TC, mvm::gc* obj) {
   assert(obj && "No object to trace");
   assert(obj->getVirtualTable() && "No virtual table");
   assert(obj->getVirtualTable()->tracer && "No tracer in VT");
@@ -60,7 +60,7 @@
 }
 
 extern "C" void Java_org_j3_mmtk_Scanning_scanObject__Lorg_mmtk_plan_TransitiveClosure_2Lorg_vmmagic_unboxed_ObjectReference_2 (
-    MMTkObject* Scanning, uintptr_t TC, gc* obj) {
+    MMTkObject* Scanning, uintptr_t TC, mvm::gc* obj) {
   assert(obj && "No object to trace");
   assert(obj->getVirtualTable() && "No virtual table");
   assert(obj->getVirtualTable()->tracer && "No tracer in VT");

Modified: vmkit/branches/multi-vm/tools/j3/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/j3/Main.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/j3/Main.cpp (original)
+++ vmkit/branches/multi-vm/tools/j3/Main.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/JIT.h"
 #include "mvm/VMKit.h"
 #include "mvm/VirtualMachine.h"

Modified: vmkit/branches/multi-vm/tools/n3-mono/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/n3-mono/Main.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/n3-mono/Main.cpp (original)
+++ vmkit/branches/multi-vm/tools/n3-mono/Main.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/JIT.h"
 #include "mvm/Object.h"
 #include "mvm/VirtualMachine.h"

Modified: vmkit/branches/multi-vm/tools/n3-pnetlib/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/n3-pnetlib/Main.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/n3-pnetlib/Main.cpp (original)
+++ vmkit/branches/multi-vm/tools/n3-pnetlib/Main.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/JIT.h"
 #include "mvm/Object.h"
 #include "mvm/VirtualMachine.h"

Modified: vmkit/branches/multi-vm/tools/testCollector/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/testCollector/Main.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/testCollector/Main.cpp (original)
+++ vmkit/branches/multi-vm/tools/testCollector/Main.cpp Wed Dec  1 16:00:10 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/Threads/Thread.h"
 #include <stdio.h>
 

Modified: vmkit/branches/multi-vm/tools/vmjc/vmjc.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/vmjc/vmjc.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/vmjc/vmjc.cpp (original)
+++ vmkit/branches/multi-vm/tools/vmjc/vmjc.cpp Wed Dec  1 16:00:10 2010
@@ -36,7 +36,7 @@
 #include "llvm/Target/TargetMachine.h"
 
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/JIT.h"
 #include "mvm/VMKit.h"
 #include "mvm/VirtualMachine.h"

Modified: vmkit/branches/multi-vm/tools/vmkit/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/vmkit/CommandLine.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/vmkit/CommandLine.cpp (original)
+++ vmkit/branches/multi-vm/tools/vmkit/CommandLine.cpp Wed Dec  1 16:00:10 2010
@@ -14,7 +14,7 @@
 #include <stdlib.h>
 
 #include "CommandLine.h"
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/Threads/Thread.h"
 
 using namespace mvm;

Modified: vmkit/branches/multi-vm/tools/vmkit/Launcher.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/vmkit/Launcher.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/vmkit/Launcher.cpp (original)
+++ vmkit/branches/multi-vm/tools/vmkit/Launcher.cpp Wed Dec  1 16:00:10 2010
@@ -18,7 +18,7 @@
 #include "llvm/Target/TargetData.h"
 
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/Config/config.h"
 #include "mvm/JIT.h"
 #include "mvm/VMKit.h"

Modified: vmkit/branches/multi-vm/tools/vtoffset/VTOffset.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/vtoffset/VTOffset.cpp?rev=120611&r1=120610&r2=120611&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/vtoffset/VTOffset.cpp (original)
+++ vmkit/branches/multi-vm/tools/vtoffset/VTOffset.cpp Wed Dec  1 16:00:10 2010
@@ -12,7 +12,7 @@
 #include <signal.h>
 #include <stdio.h>
 
-#include "MvmGC.h"
+#include "mvm/GC.h"
 #include "mvm/PrintBuffer.h"
 #include "mvm/Threads/Thread.h"
 #include "mvm/Sigsegv.h"





More information about the vmkit-commits mailing list