[vmkit-commits] [vmkit] r83846 - in /vmkit/trunk: lib/Mvm/MMTk/MutatorThread.cpp lib/Mvm/MMTk/MutatorThread.h mmtk/mmtk-j3/MutatorThread.cpp mmtk/mmtk-j3/MutatorThread.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon Oct 12 04:08:45 PDT 2009
Author: geoffray
Date: Mon Oct 12 06:08:45 2009
New Revision: 83846
URL: http://llvm.org/viewvc/llvm-project?rev=83846&view=rev
Log:
Move MMTk runtime.
Added:
vmkit/trunk/lib/Mvm/MMTk/MutatorThread.cpp
- copied unchanged from r83841, vmkit/trunk/mmtk/mmtk-j3/MutatorThread.cpp
vmkit/trunk/lib/Mvm/MMTk/MutatorThread.h
- copied unchanged from r83841, vmkit/trunk/mmtk/mmtk-j3/MutatorThread.h
Removed:
vmkit/trunk/mmtk/mmtk-j3/MutatorThread.cpp
vmkit/trunk/mmtk/mmtk-j3/MutatorThread.h
Removed: vmkit/trunk/mmtk/mmtk-j3/MutatorThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-j3/MutatorThread.cpp?rev=83845&view=auto
==============================================================================
--- vmkit/trunk/mmtk/mmtk-j3/MutatorThread.cpp (original)
+++ vmkit/trunk/mmtk/mmtk-j3/MutatorThread.cpp (removed)
@@ -1,30 +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;
-
-uint32_t MutatorThread::MMTkMutatorSize = 0;
-uint32_t MutatorThread::MMTkCollectorSize = 0;
-
-void (*MutatorThread::MutatorInit)(uintptr_t) = 0;
-void (*MutatorThread::CollectorInit)(uintptr_t) = 0;
-
-gc* (*gc::MMTkGCAllocator)(uintptr_t Mutator, uint32_t sz, uint32_t align,
- uint32_t offset, uint32_t allocator,
- uint32_t site);
-
-extern "C" void* MMTkMutatorAllocate(uint32_t size, VirtualTable* VT) {
- void* val = MutatorThread::get()->Allocator.Allocate(size, "MMTk");
- ((void**)val)[0] = VT;
- return val;
-}
Removed: vmkit/trunk/mmtk/mmtk-j3/MutatorThread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-j3/MutatorThread.h?rev=83845&view=auto
==============================================================================
--- vmkit/trunk/mmtk/mmtk-j3/MutatorThread.h (original)
+++ vmkit/trunk/mmtk/mmtk-j3/MutatorThread.h (removed)
@@ -1,48 +0,0 @@
-//===--------- MutatorThread.h - Thread for GC ----------------------------===//
-//
-// The VMKit project
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-
-#ifndef MVM_MUTATOR_THREAD_H
-#define MVM_MUTATOR_THREAD_H
-
-#include "mvm/Allocator.h"
-#include "mvm/Threads/Thread.h"
-
-namespace mvm {
-
-class MutatorThread : public mvm::Thread {
-public:
- mvm::BumpPtrAllocator Allocator;
- uintptr_t MutatorContext;
- uintptr_t CollectorContext;
-
- static uint32_t MMTkMutatorSize;
- static uint32_t MMTkCollectorSize;
-
- static void (*MutatorInit)(uintptr_t);
- static void (*CollectorInit)(uintptr_t);
-
-
- MutatorThread() {
- MutatorContext = (uintptr_t)Allocator.Allocate(MMTkMutatorSize, "Mutator");
- MutatorInit(MutatorContext);
- CollectorContext =
- (uintptr_t)Allocator.Allocate(MMTkCollectorSize, "Collector");
- CollectorInit(CollectorContext);
- }
-
- static MutatorThread* get() {
- return (MutatorThread*)mvm::Thread::get();
- }
-
-};
-
-}
-
-#endif
More information about the vmkit-commits
mailing list