[project @ 1999-12-06 16:47:07 by sewardj]
authorsewardj <unknown>
Mon, 6 Dec 1999 16:47:09 +0000 (16:47 +0000)
committersewardj <unknown>
Mon, 6 Dec 1999 16:47:09 +0000 (16:47 +0000)
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.

ghc/interpreter/storage.c
ghc/interpreter/storage.h

index 1ee4eb8..04a9f84 100644 (file)
@@ -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;
index a81ec69..2ea30db 100644 (file)
@@ -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)