[project @ 2000-04-11 09:40:19 by simonmar]
[ghc-hetmet.git] / ghc / interpreter / storage.h
index c8b8449..4949a40 100644 (file)
  * included in the distribution.
  *
  * $RCSfile: storage.h,v $
- * $Revision: 1.39 $
- * $Date: 2000/04/05 10:25:08 $
+ * $Revision: 1.42 $
+ * $Date: 2000/04/07 16:25:20 $
  * ------------------------------------------------------------------------*/
 
-#define DEBUG_STORAGE
+#define DEBUG_STORAGE               /* a moderate level of sanity checking */
+#define DEBUG_STORAGE_EXTRA         /* max paranoia in sanity checks       */
 
 /* --------------------------------------------------------------------------
  * Typedefs for main data types:
@@ -159,12 +160,7 @@ extern  Int          cellsRecovered;    /* cells recovered by last gc      */
 
 extern  Pair         pair            ( Cell,Cell );
 extern  Void         garbageCollect  ( Void );
-
-extern  Void         overwrite       ( Pair,Pair );
-extern  Cell         markExpr        ( Cell );
-extern  Void         markWithoutMove ( Cell );
-
-#define mark(v)      v=markExpr(v)
+extern  Void         mark            ( Cell );
 
 #define isPair(c)    ((c)<0)
 #define isGenPair(c) ((c)<0 && -heapSize<=(c))
@@ -638,7 +634,8 @@ extern char*        nameFromOPtr    ( void* );
 
 extern void         addSection      ( Module,void*,void*,OSectionKind );
 extern OSectionKind lookupSection   ( void* );
-extern void*    lookupOExtraTabName ( char* sym );
+extern void*    lookupOExtraTabName                ( char* sym );
+extern void*    lookupOTabNameAbsolutelyEverywhere ( char* sym );
 
 #define isPrelude(m) (m==modulePrelude)
 
@@ -692,11 +689,11 @@ struct strTycon {
 extern struct strTycon* tabTycon;
 extern Int              tabTyconSz;
 
-extern Tycon newTycon     ( Text );
-extern Tycon findTycon    ( Text );
-extern Tycon addTycon     ( Tycon );
+extern Tycon newTycon      ( Text );
+extern Tycon findTycon     ( Text );
+extern Tycon addTycon      ( Tycon );
 extern Tycon findQualTycon ( Cell );
-extern Tycon addPrimTycon ( Text,Kind,Int,Cell,Cell );
+extern Tycon addPrimTycon  ( Text,Kind,Int,Cell,Cell );
 
 #define isSynonym(h)    (isTycon(h) && tycon(h).what==SYNONYM)
 #define isQualType(t)  (isPair(t) && fst(t)==QUAL)
@@ -709,6 +706,9 @@ extern Tycon addPrimTycon ( Text,Kind,Int,Cell,Cell );
 
 extern Tycon findQualTyconWithoutConsultingExportList ( QualId q );
 
+extern Int numQualifiers   ( Type );
+
+
 /* --------------------------------------------------------------------------
  * Globally defined name values:
  * ------------------------------------------------------------------------*/
@@ -1068,6 +1068,7 @@ extern  StackPtr sp;
 #define pushed(n)    stack(sp-(n))
 #define topfun(f)    top()=ap((f),top())
 #define toparg(x)    top()=ap(top(),(x))
+#define getsp()      sp
 
 extern  Void hugsStackOverflow ( Void );