X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStg.h;h=4c891b7fc86be34bc98df2216cdeae6ef1d10532;hb=f4a6a4134b8ba3f2fc7a193ed5b91313046b775a;hp=ebc471adeb9f1f5c1c0ece376e16aa7143576fc7;hpb=5edbd17d0f915ff56666e92c008bb6e2a7311290;p=ghc-hetmet.git diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index ebc471a..4c891b7 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.30 2000/05/18 11:32:21 panne Exp $ + * $Id: Stg.h,v 1.34 2000/12/04 12:31:20 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -102,13 +102,47 @@ void _stgAssert (char *, unsigned int); #endif /* DEBUG */ /* ----------------------------------------------------------------------------- - Include everything STG-ish + Global type definitions -------------------------------------------------------------------------- */ -/* Global type definitions*/ #include "StgTypes.h" #include "RtsTypes.h" +/* ----------------------------------------------------------------------------- + Shorthand forms + -------------------------------------------------------------------------- */ + +typedef StgChar C_; +typedef StgWord W_; +typedef StgWord* P_; +typedef P_* PP_; +typedef StgInt I_; +typedef StgAddr A_; +typedef const StgWord* D_; +typedef StgFunPtr F_; +typedef StgByteArray B_; +typedef StgClosurePtr L_; + +typedef StgInt64 LI_; +typedef StgWord64 LW_; + +/* + * We often want to know the size of something in units of an + * StgWord... (rounded up, of course!) + */ + +#define sizeofW(t) ((sizeof(t)+sizeof(W_)-1)/sizeof(W_)) + +/* + * It's nice to be able to grep for casts + */ + +#define stgCast(ty,e) ((ty)(e)) + +/* ----------------------------------------------------------------------------- + Include everything STG-ish + -------------------------------------------------------------------------- */ + /* Global constaints */ #include "Constants.h" @@ -179,6 +213,8 @@ void _stgAssert (char *, unsigned int); /* Runtime-system hooks */ #include "Hooks.h" +#include "HsFFI.h" + /* Misc stuff without a home */ DLL_IMPORT_RTS extern char **prog_argv; /* so we can get at these from Haskell */ DLL_IMPORT_RTS extern int prog_argc;