X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStg.h;h=f38eba40161634c5606b49547b0ebae0a67c9c00;hb=1ad39b525bc94452cd7d09685c82141080f03098;hp=12ccdbe3a94447f8b5771f24407a48e110528785;hpb=8846a7d80eb1c201e87afcc56a0c2705659871ad;p=ghc-hetmet.git diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 12ccdbe..f38eba4 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,7 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.3 1999/01/18 14:37:43 sof Exp $ + * $Id: Stg.h,v 1.6 1999/02/05 16:02:28 simonm Exp $ + * + * (c) The GHC Team, 1998-1999 * * Top-level include file for everything STG-ish. * @@ -25,6 +27,32 @@ #define COMPILER 1 #endif +/* bit macros + */ +#define BITS_PER_BYTE 8 +#define BITS_IN(x) (BITS_PER_BYTE * sizeof(x)) + +/* ----------------------------------------------------------------------------- + Assertions and Debuggery + -------------------------------------------------------------------------- */ + +#ifndef DEBUG +#define ASSERT(predicate) /* nothing */ +#else + +void _stgAssert (char *, unsigned int); + +#define ASSERT(predicate) \ + if (predicate) \ + /*null*/; \ + else \ + _stgAssert(__FILE__, __LINE__) +#endif /* DEBUG */ + +/* ----------------------------------------------------------------------------- + Include everything STG-ish + -------------------------------------------------------------------------- */ + /* Global type definitions*/ #include "StgTypes.h" @@ -90,8 +118,9 @@ #include "StgProf.h" #include "PrimOps.h" #include "Updates.h" -#include "Ticky.h" +#include "StgTicky.h" #include "CCall.h" +#include "Stable.h" /* Built-in entry points */ #include "StgMiscClosures.h" @@ -106,7 +135,7 @@ extern int prog_argc; extern char **environ; /* Creating and destroying an adjustor thunk. - I cannot make myself creating a separate .h file + I cannot make myself create a separate .h file for these two (sof.) */ extern void* createAdjustor(int cconv, StgStablePtr hptr, StgFunPtr wptr);