Commit 0e0bde9e authored by sewardj's avatar sewardj
Browse files

[project @ 1999-12-06 16:47:07 by sewardj]

Remove compile-time address space allocated to tuples, and remove all
references to TUPMIN.  I think I have fixed the address mapping for
when TREX is defined, but you never know.
parent 39135867
......@@ -9,8 +9,8 @@
* included in the distribution.
*
* $RCSfile: storage.c,v $
* $Revision: 1.22 $
* $Date: 1999/12/06 16:25:25 $
* $Revision: 1.23 $
* $Date: 1999/12/06 16:47:07 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
......@@ -1841,7 +1841,10 @@ register Cell c; {
register Cell fstc = fst(c);
return isTag(fstc) ? fstc : AP;
}
if (c<TUPMIN) return c;
if (c<OFFMIN) return c;
#if TREX
if (isExt(c)) return EXT;
#endif
if (c>=INTMIN) return INTCELL;
if (c>=NAMEMIN){if (c>=CLASSMIN) {if (c>=CHARMIN) return CHARCELL;
......
......@@ -10,8 +10,8 @@
* included in the distribution.
*
* $RCSfile: storage.h,v $
* $Revision: 1.17 $
* $Date: 1999/12/06 16:25:27 $
* $Revision: 1.18 $
* $Date: 1999/12/06 16:47:09 $
* ------------------------------------------------------------------------*/
/* --------------------------------------------------------------------------
......@@ -312,7 +312,12 @@ extern Ptr cptrOf Args((Cell));
* ------------------------------------------------------------------------*/
#define SPECMIN 101
#define isSpec(c) (SPECMIN<=(c) && (c)<TUPMIN)/* Special cell values */
#if TREX
#define isSpec(c) (SPECMIN<=(c) && (c)<EXTMIN)/* Special cell values */
#else
#define isSpec(c) (SPECMIN<=(c) && (c)<OFFMIN)
#endif
#define NONE 101 /* Dummy stub */
#define STAR 102 /* Representing the kind of types */
......@@ -354,25 +359,12 @@ extern Ptr cptrOf Args((Cell));
* Tuple data/type constructors:
* ------------------------------------------------------------------------*/
#define TUPMIN 201
#if 0
#error xyzzy
#if TREX
#define isTuple(c) (TUPMIN<=(c) && (c)<EXTMIN)
#else
#define isTuple(c) (TUPMIN<=(c) && (c)<OFFMIN)
#endif
#define mkTuple(n) (TUPMIN+(n))
#define tupleOf(n) ((Int)((n)-TUPMIN))
#endif
extern Text ghcTupleText Args((Tycon));
#if TREX
#define EXTMIN (TUPMIN+NUM_TUPLES)
#define EXTMIN 201
#define isExt(c) (EXTMIN<=(c) && (c)<OFFMIN)
#define extText(e) tabExt[(e)-EXTMIN]
#define extField(c) arg(fun(c))
......@@ -391,7 +383,7 @@ extern Ext mkExt Args((Text));
#if TREX
#define OFFMIN (EXTMIN+NUM_EXT)
#else
#define OFFMIN (TUPMIN+NUM_TUPLES)
#define OFFMIN 201
#endif
#define isOffset(c) (OFFMIN<=(c) && (c)<MODMIN)
#define offsetOf(c) ((c)-OFFMIN)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment