RTS tidyup sweep, first phase
[ghc-hetmet.git] / includes / stg / Types.h
similarity index 77%
rename from includes/StgTypes.h
rename to includes/stg/Types.h
index 7f2c08e..227356c 100644 (file)
@@ -19,9 +19,8 @@
        StgInt                  Signed version of StgWord
        StgAddr                 Generic address type
        
-       StgBool, StgVoid, StgClosurePtr, StgPtr, StgOffset, 
-       StgTSOPtr, StgForeignPtr, StgStackOffset, StgStackPtr,
-       StgCode, StgArray, StgByteArray, StgStablePtr, StgFunPtr,
+       StgBool, StgVoid, StgPtr, StgOffset, 
+       StgCode, StgStablePtr, StgFunPtr,
        StgUnion.
 
  * WARNING: Keep this file, MachDeps.h, and HsFFI.h in synch!
@@ -58,23 +57,17 @@ typedef unsigned int             StgWord32;
 #error GHC untested on this architecture: sizeof(int) != 4
 #endif
 
-#ifdef SUPPORT_LONG_LONGS
-/* assume long long is 64 bits */
-# ifndef _MSC_VER
-typedef signed long long int   StgInt64;
-typedef unsigned long long int StgWord64;
-# else
-typedef __int64 StgInt64;
-typedef unsigned __int64 StgWord64;
-# endif
-#elif SIZEOF_LONG == 8
+#if SIZEOF_LONG == 8
 typedef signed   long          StgInt64;
 typedef unsigned long          StgWord64;
 #elif defined(__MSVC__)
 typedef __int64                StgInt64;
 typedef unsigned __int64       StgWord64;
+#elif SIZEOF_LONG_LONG == 8
+typedef signed long long int   StgInt64;
+typedef unsigned long long int StgWord64;
 #else
-#error GHC untested on this architecture: sizeof(void *) < 8 and no long longs.
+#error cannot find a way to define StgInt64
 #endif
 
 /*
@@ -106,40 +99,21 @@ typedef StgWord16          StgHalfWord;
 
 #define W_MASK  (sizeof(W_)-1)
 
-typedef void*              StgAddr;
-
 /*
  * Other commonly-used STG datatypes.
  */
 
+typedef void*              StgAddr;
 typedef StgWord32          StgChar;
 typedef int                StgBool;
-
 typedef float             StgFloat;
 typedef double            StgDouble;
-                           
-typedef void               StgVoid;
-                           
-typedef struct StgClosure_ StgClosure;
-typedef StgClosure*        StgClosurePtr;
-typedef StgWord*           StgPtr;           /* pointer into closure       */
+typedef StgWord*           StgPtr;           /* heap or stack pointer */
 typedef StgWord volatile*  StgVolatilePtr;   /* pointer to volatile word   */
 typedef StgWord            StgOffset;        /* byte offset within closure */
-                           
-typedef struct StgTSO_*    StgTSOPtr;
-
-typedef void*              StgForeignPtr;
-
-typedef StgInt             StgStackOffset;   /* offset in words! */
-
-typedef StgWord*           StgStackPtr;
-
-typedef StgWord8          StgCode;         /* close enough */
-
-typedef StgPtr*            StgArray;        /* the goods of an Array# */
-typedef char*             StgByteArray;    /* the goods of a ByteArray# */
-
+typedef StgWord8          StgCode;          /* close enough */
 typedef void*             StgStablePtr;
+typedef StgWord8*          StgByteArray;
 
 /*
   Types for the generated C functions