[vmkit-commits] [vmkit] r121144 - /vmkit/branches/multi-vm/include/mvm/Threads/Thread.h

Gael Thomas gael.thomas at lip6.fr
Tue Dec 7 08:00:16 PST 2010


Author: gthomas
Date: Tue Dec  7 10:00:16 2010
New Revision: 121144

URL: http://llvm.org/viewvc/llvm-project?rev=121144&view=rev
Log:
move thread's field at the beginning of the class

Modified:
    vmkit/branches/multi-vm/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=121144&r1=121143&r2=121144&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Threads/Thread.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Threads/Thread.h Tue Dec  7 10:00:16 2010
@@ -157,6 +157,61 @@
 /// contains all thread-specific informations.
 // WARNING: if you modify this class, you must also change mvm-runtime.ll
 class Thread : public CircularBase<Thread> {
+public:
+  /// IsolateID - The Isolate ID of the thread's VM.
+  size_t IsolateID;                                      // 1
+
+  /// MyVM - The VM attached to this Thread.
+  VirtualMachine* MyVM;                                  // 2
+
+  /// baseSP - The base stack pointer.
+  void* baseSP;                                          // 3
+ 
+  /// doYield - Flag to tell the thread to yield for GC reasons.
+  bool doYield;                                          // 4
+
+  /// inRV - Flag to tell that the thread is being part of a rendezvous.
+  bool inRV;                                             // 5
+
+  /// joinedRV - Flag to tell that the thread has joined a rendezvous.
+  bool joinedRV;                                         // 6
+
+private:
+  /// lastSP - If the thread is running native code that can not be
+  /// interrupted, lastSP is not null and contains the value of the
+  /// stack pointer before entering native.
+  void* lastSP;                                          // 7
+ 
+  /// internalThreadID - The implementation specific thread id.
+  void* internalThreadID;                                // 8
+
+public:
+  /// routine - The function to invoke when the thread starts.
+  void (*routine)(mvm::Thread*);                         // 9
+
+  /// lastKnownFrame - The last frame that we know of, before resuming to JNI.
+  KnownFrame* lastKnownFrame;                            // 10
+  
+#ifdef RUNTIME_DWARF_EXCEPTIONS
+  void* internalPendingException;
+#else
+  /// lastExceptionBuffer - The last exception buffer on this thread's stack.
+  ExceptionBuffer* lastExceptionBuffer;                  // 11
+#endif
+
+  /// vmData - vm specific data
+	VMThreadData* vmData;                                  // 12
+
+  /// pendingException - the pending exception
+	gc* pendingException;                                  // 13
+
+	/// vmkit - a (shortcut) pointer to vmkit that contains information on all the vms
+	mvm::VMKit* vmkit;                                     // 14
+
+  /// allVmsData - the array of thread specific data.
+	VMThreadData** allVmsData;                             // 15
+
+
 protected:
   Thread(VMKit* vmk);
 
@@ -186,30 +241,6 @@
     return (uint64_t)this;
   }
  
-public:
-
-  /// IsolateID - The Isolate ID of the thread's VM.
-  size_t IsolateID;
-
-  /// MyVM - The VM attached to this Thread.
-  VirtualMachine* MyVM;
-
-  /// baseSP - The base stack pointer.
-  ///
-  void* baseSP;
- 
-  /// doYield - Flag to tell the thread to yield for GC reasons.
-  ///
-  bool doYield;
-
-  /// inRV - Flag to tell that the thread is being part of a rendezvous.
-  ///
-  bool inRV;
-
-  /// joinedRV - Flag to tell that the thread has joined a rendezvous.
-  ///
-  bool joinedRV;
-
   /// get - Get the thread specific data of the current thread.
   ///
   static Thread* get() {
@@ -218,16 +249,6 @@
   
 private:
   
-  /// lastSP - If the thread is running native code that can not be
-  /// interrupted, lastSP is not null and contains the value of the
-  /// stack pointer before entering native.
-  ///
-  void* lastSP;
- 
-  /// internalThreadID - The implementation specific thread id.
-  ///
-  void* internalThreadID;
-  
   /// internalThreadStart - The implementation sepcific thread starter
   /// function.
   ///
@@ -314,10 +335,6 @@
   void operator delete(void* th);
   virtual ~Thread();
 
-  /// routine - The function to invoke when the thread starts.
-  ///
-  void (*routine)(mvm::Thread*);
- 
   /// printBacktrace - Print the backtrace.
   ///
   void printBacktrace();
@@ -330,40 +347,11 @@
   ///
   uint32_t getFrameContextLength();
 
-  /// lastKnownFrame - The last frame that we know of, before resuming to JNI.
-  ///
-  KnownFrame* lastKnownFrame;
-  
-#ifdef RUNTIME_DWARF_EXCEPTIONS
-  void* internalPendingException;
-#else
-  /// lastExceptionBuffer - The last exception buffer on this thread's stack.
-  ///
-  ExceptionBuffer* lastExceptionBuffer;
-#endif
-
   void startKnownFrame(KnownFrame& F) __attribute__ ((noinline));
   void endKnownFrame();
   void startUnknownFrame(KnownFrame& F) __attribute__ ((noinline));
   void endUnknownFrame();
 
-  /// vmData - vm specific data
-  ///
-	VMThreadData* vmData;
-
-  /// pendingException - the pending exception
-  ///
-	gc* pendingException;
-
-public:
-	/// vmkit - a (shortcut) pointer to vmkit that contains information on all the vms
-	///
-	mvm::VMKit* vmkit;
-
-  /// allVmsData - the array of thread specific data.
-  ///
-	VMThreadData** allVmsData;
-
   /// reallocAllVmsData - realloc the allVmsData from old to n or 0 to n if allVmsData=0
 	///   must be protected by rendezvous.threadLock
   ///





More information about the vmkit-commits mailing list