Correctify usage of -DDEBUG and -DDEBUG_EXTRA.
* Hugs version 1.4, December 1997
*
* $RCSfile: options.h,v $
- * $Revision: 1.5 $
- * $Date: 1999/04/27 10:07:22 $
+ * $Revision: 1.6 $
+ * $Date: 1999/04/27 12:27:56 $
* ------------------------------------------------------------------------*/
/* Turn on debugging output and some sanity checks
*/
-#define DEBUG 1
-/*#define NDEBUG */
+/*#define DEBUG 1*/
+#undef DEBUG
/* Make stack tags more informative than just their size.
* Helps when printing the stack and when running sanity checks.
*/
-#define DEBUG_EXTRA 1
+/*#define DEBUG_EXTRA 1*/
+#undef DEBUG_EXTRA
/* Turn lazy blackholing on/off.
* Warning: Lazy blackholing can't be disabled in GHC generated code.
* Copyright (c) 1994-1998.
*
* $RCSfile: Evaluator.c,v $
- * $Revision: 1.12 $
- * $Date: 1999/04/27 10:07:16 $
+ * $Revision: 1.13 $
+ * $Date: 1999/04/27 12:27:50 $
* ---------------------------------------------------------------------------*/
#include "Rts.h"
#define USE_GCC_LABELS 1
#else
#define USE_GCC_LABELS 0
+#error yo dudes
#endif
/* --------------------------------------------------------------------------
* Crude profiling stuff (mainly to assess effect of optimiser)
* ------------------------------------------------------------------------*/
-#if CRUDE_PROFILING
+#ifdef CRUDE_PROFILING
#define M_CPTAB 10000
#define CP_NIL (-1)
/* Macros to save/load local state. */
-#if DEBUG
+#ifdef DEBUG
#define SSS { tSp=Sp = xSp; tSu=Su = xSu; tSpLim=SpLim = xSpLim; }
#define LLL { tSp=xSp = Sp; tSu=xSu = Su; tSpLim=xSpLim = SpLim; }
#else
register StgClosure* obj; /* object currently under evaluation */
char eCount; /* enter counter, for context switching */
-#if DEBUG
+#ifdef DEBUG
/* use the t values to check that Su/Sp/SpLim do not change unexpectedly */
StgPtr tSp = Sp; StgUpdateFrame* tSu = Su; StgPtr tSpLim = SpLim;
#endif
enterLoop:
-#if DEBUG
+#ifdef DEBUG
assert(Sp == tSp);
assert(Su == tSu);
assert(SpLim == tSpLim);
IF_DEBUG(evaluator,
fprintf(stderr, "object to enter is a constructor -- "
"jumping directly to return continuation\n" );
- )
+ );
goto bco_entry;
}
static inline StgPtr grabHpUpd( nat size )
{
ASSERT( size >= MIN_UPD_SIZE + sizeofW(StgHeader) );
-#if CRUDE_PROFILING
+#ifdef CRUDE_PROFILING
cp_bill_words ( size );
#endif
return allocate(size);
static inline StgPtr grabHpNonUpd( nat size )
{
ASSERT( size >= MIN_NONUPD_SIZE + sizeofW(StgHeader) );
-#if CRUDE_PROFILING
+#ifdef CRUDE_PROFILING
cp_bill_words ( size );
#endif
return allocate(size);
/* -----------------------------------------------------------------------------
- * $Id: Printer.c,v 1.10 1999/03/15 16:30:29 simonm Exp $
+ * $Id: Printer.c,v 1.11 1999/04/27 12:27:49 sewardj Exp $
*
* Copyright (c) 1994-1999.
*
}
#endif
-extern void printPtr( StgPtr p )
+void printPtr( StgPtr p )
{
char* str;
const char *raw;
#endif /* HAVE_BFD_H */
+#else /* DEBUG */
+void printPtr( StgPtr p )
+{
+ fprintf(stderr, "ptr 0x%p (enable -DDEBUG for more info) " , p );
+}
+
+void printObj( StgClosure *obj )
+{
+ fprintf(stderr, "obj 0x%p (enable -DDEBUG for more info) " , obj );
+}
#endif /* DEBUG */