* included in the distribution.
*
* $RCSfile: storage.h,v $
- * $Revision: 1.37 $
- * $Date: 2000/03/28 10:20:56 $
+ * $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:
*
* TAG_NONPTR_MIN(100) .. TAG_NONPTR_MAX(115) non pointer tags
* TAG_PTR_MIN(200) .. TAG_PTR_MAX(298) pointer tags
- * TAG_SPEC_MIN(400) .. TAG_SPEC_MAX(425) special tags
+ * TAG_SPEC_MIN(400) .. TAG_SPEC_MAX(431) special tags
* OFF_MIN(1,000) .. OFF_MAX(1,999) offsets
* CHARR_MIN(3,000) .. CHARR_MAX(3,255) chars
*
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))
* ------------------------------------------------------------------------*/
#define TAG_SPEC_MIN 400
-#define TAG_SPEC_MAX 428
+#define TAG_SPEC_MAX 431
#define isSpec(c) (TAG_SPEC_MIN<=(c) && (c)<=TAG_SPEC_MAX)
#define INVAR 427 /* whatIs code for isInventedVar */
#define INDVAR 428 /* whatIs code for isInventedDictVar */
+#define FM_SOURCE 429 /* denotes source module (FileMode) */
+#define FM_OBJECT 430 /* denotes object module */
+#define FM_EITHER 431 /* no restriction; either is allowed */
+
/* --------------------------------------------------------------------------
* Tuple data/type constructors:
Bool completed; /* Fully loaded or just parsed? */
Time lastStamp; /* Time of last parse */
- Bool fromSrc; /* is it from source ? */
- Text srcExt; /* if yes, ".lhs", ".hs", etc" */
+ Cell mode; /* FM_SOURCE or FM_OBJECT */
+ Text srcExt; /* if mode==FM_SOURCE ".lhs", ".hs", etc */
List uses; /* :: [CONID] -- names of mods imported by this one */
Text objName; /* Name of the primary object code file. */
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)
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)
extern Tycon findQualTyconWithoutConsultingExportList ( QualId q );
+extern Int numQualifiers ( Type );
+
+
/* --------------------------------------------------------------------------
* Globally defined name values:
* ------------------------------------------------------------------------*/
Int number;
Cell type;
Cell defn;
+ Bool hasStrict; /* does constructor have strict components? */
Cell stgVar; /* really StgVar */
Text callconv; /* for foreign import/export */
void* primop; /* really StgPrim* */
#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 );