/* -----------------------------------------------------------------------------
- * $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.
*
#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"
#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"
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);