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!
#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
/*
#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