X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Finterpreter%2Fstorage.h;fp=ghc%2Finterpreter%2Fstorage.h;h=87dacff06fc3ff786205943456b733a237e47e66;hb=73be95706890e7e8aa344d51592c5b7b02e07216;hp=2001e1281d468606afd86cabe4a66501b2710385;hpb=048117fec059dd2a75c1a1a1e0f9216aa766ad77;p=ghc-hetmet.git diff --git a/ghc/interpreter/storage.h b/ghc/interpreter/storage.h index 2001e12..87dacff 100644 --- a/ghc/interpreter/storage.h +++ b/ghc/interpreter/storage.h @@ -10,10 +10,12 @@ * included in the distribution. * * $RCSfile: storage.h,v $ - * $Revision: 1.34 $ - * $Date: 2000/03/13 11:37:17 $ + * $Revision: 1.35 $ + * $Date: 2000/03/22 18:14:23 $ * ------------------------------------------------------------------------*/ +#define DEBUG_STORAGE + /* -------------------------------------------------------------------------- * Typedefs for main data types: * Many of these type names are used to indicate the intended us of a data @@ -29,7 +31,6 @@ typedef Cell far *Heap; /* storage of heap */ typedef Cell Pair; /* pair cell */ typedef Int StackPtr; /* stack pointer */ typedef Cell Offset; /* offset/generic variable*/ -typedef Int Script; /* script file number */ typedef Int Module; /* module */ typedef Cell Tycon; /* type constructor */ typedef Cell Type; /* type expression */ @@ -53,6 +54,31 @@ typedef Cell QualId; typedef Cell ConVarId; /* -------------------------------------------------------------------------- + * Address ranges. + * + * -heapSize .. -1 cells in the heap + * 0 NIL + * + * 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 + * OFF_MIN(1,000) .. OFF_MAX(1,999) offsets + * CHAR_MIN(3,000) .. CHAR_MAX(3,255) chars + * + * SMALL_INT_MIN(100,000) .. SMALL_INT_MAX(499,999) smallish ints + * (300,000 denotes 0) + * + * NAME_BASE_ADDR (1,000,000 .. 1,899,999) names + * TYCON_BASE_ADDR (2,000,000 .. 2,899,999) tycons + * CCLASS_BASE_ADDR (3,000,000 .. 3,899,999) classes + * INST_BASE_ADDR (4,000,000 .. 4,899,999) instances + * MODULE_BASE_ADDR (5,000,000 .. 5,899,999) modules + * INVAR_BASE_ADDR (6,000,000 .. 6,899,999) invented var names + * INDVAR_BASE_ADDR (7,000,000 .. 7,899,999) invented dict var names + * TEXT_BASE_ADDR (8,000,000 .. 8M +TEXT_SIZE-1) text + * ------------------------------------------------------------------------*/ + +/* -------------------------------------------------------------------------- * Text storage: * provides storage for the characters making up identifier and symbol * names, string literals, character constants etc... @@ -74,6 +100,20 @@ extern Text fixLitText ( Text ); extern Syntax identSyntax ( Cell ); extern Syntax defaultSyntax ( Text ); +#define INVAR_BASE_ADDR 6000000 +#define INVAR_MAX_AVAIL 900000 +#define isInventedVar(c) (INVAR_BASE_ADDR<=(c) \ + && (c)