[vmkit-commits] [vmkit] r83832 - in /vmkit/trunk/lib/N3/VMCore: N3.cpp N3.h N3Initialise.cpp

Gael Thomas gael.thomas at lip6.fr
Mon Oct 12 01:39:33 PDT 2009


Author: gthomas
Date: Mon Oct 12 03:39:32 2009
New Revision: 83832

URL: http://llvm.org/viewvc/llvm-project?rev=83832&view=rev
Log:
ThreadSystem is now allocated with the assembly.


Modified:
    vmkit/trunk/lib/N3/VMCore/N3.cpp
    vmkit/trunk/lib/N3/VMCore/N3.h
    vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp

Modified: vmkit/trunk/lib/N3/VMCore/N3.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3.cpp?rev=83832&r1=83831&r2=83832&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/N3.cpp Mon Oct 12 03:39:32 2009
@@ -88,12 +88,10 @@
   buf->write("ThreadSystem<>");
 }
 
-ThreadSystem* ThreadSystem::allocateThreadSystem() {
-  ThreadSystem* res = gc_new(ThreadSystem)();
-  res->nonDaemonThreads = 1;
-  res->nonDaemonLock = new mvm::LockNormal();
-  res->nonDaemonVar  = new mvm::Cond();
-  return res;
+ThreadSystem::ThreadSystem() {
+  nonDaemonThreads = 1;
+  nonDaemonLock = new mvm::LockNormal();
+  nonDaemonVar  = new mvm::Cond();
 }
 
 N3::N3(mvm::BumpPtrAllocator &allocator, const char *name) : mvm::VirtualMachine(allocator) {
@@ -224,7 +222,7 @@
 
   vm->hashUTF8 = parent->hashUTF8;
   
-  vm->threadSystem = ThreadSystem::allocateThreadSystem();
+  vm->threadSystem = new(*a, "ThreadSystem") ThreadSystem();
 
   vm->assemblyPath = parent->assemblyPath;
   vm->coreAssembly = parent->coreAssembly;

Modified: vmkit/trunk/lib/N3/VMCore/N3.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3.h?rev=83832&r1=83831&r2=83832&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3.h (original)
+++ vmkit/trunk/lib/N3/VMCore/N3.h Mon Oct 12 03:39:32 2009
@@ -53,17 +53,15 @@
 class ArrayUInt16;
 class CLIString;
 
-class ThreadSystem : public mvm::Object {
+class ThreadSystem : public mvm::PermanentObject {
 public:
-  static VirtualTable* VT;
+	ThreadSystem();
+
   uint16 nonDaemonThreads;
   mvm::Lock* nonDaemonLock;
   mvm::Cond* nonDaemonVar;
 
   virtual void print(mvm::PrintBuffer* buf) const;
-  virtual void TRACER;
-
-  static ThreadSystem* allocateThreadSystem();
 };
 
 class ClArgumentsInfo {

Modified: vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp?rev=83832&r1=83831&r2=83832&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp Mon Oct 12 03:39:32 2009
@@ -189,7 +189,6 @@
   INIT(ArrayDouble);
   INIT(ArrayObject);
   INIT(CLIString);
-  INIT(ThreadSystem);
 
 #undef INIT
 





More information about the vmkit-commits mailing list