[MLton-devel] new header words

Stephen Weeks MLton@mlton.org
Fri, 5 Jul 2002 10:57:48 -0700


I just did a self compile with the new header words, which allow 19
bits for a type index.  There were only 109 different object types
required.  So we have plenty of bits (or types) to spare should we
need them.

To show the different layouts, I've included below the relevant part
of the C code from the self compile.

typedef enum { 
	ARRAY_TAG,
	NORMAL_TAG,
	STACK_TAG,
} GC_ObjectTypeTag;

typedef struct {
	GC_ObjectTypeTag tag;
	ushort numNonPointers;
	ushort numPointers;
} GC_ObjectType;

static GC_ObjectType objectTypes[] = {
	{ 2, 0, 0 },
	{ 0, 1, 0 },
	{ 1, 2, 1 },
	{ 0, 4, 0 },
	{ 1, 1, 0 },
	{ 0, 0, 0 },
	{ 1, 1, 1 },
	{ 1, 0, 2 },
	{ 1, 0, 3 },
	{ 1, 0, 1 },
	{ 1, 2, 0 },
	{ 1, 3, 0 },
	{ 1, 1, 2 },
	{ 1, 6, 3 },
	{ 1, 0, 4 },
	{ 1, 3, 1 },
	{ 1, 0, 5 },
	{ 1, 4, 0 },
	{ 1, 1, 4 },
	{ 1, 0, 8 },
	{ 1, 1, 16 },
	{ 1, 1, 21 },
	{ 1, 4, 20 },
	{ 1, 0, 7 },
	{ 0, 0, 1 },
	{ 1, 1, 7 },
	{ 1, 3, 220 },
	{ 1, 1, 3 },
	{ 1, 0, 51 },
	{ 1, 0, 6 },
	{ 1, 0, 40 },
	{ 1, 1, 38 },
	{ 1, 1, 5 },
	{ 1, 0, 17 },
	{ 1, 0, 36 },
	{ 1, 0, 55 },
	{ 1, 0, 16 },
	{ 1, 0, 12 },
	{ 1, 0, 10 },
	{ 1, 0, 18 },
	{ 1, 1, 116 },
	{ 1, 0, 24 },
	{ 1, 2, 2 },
	{ 1, 0, 13 },
	{ 1, 1, 14 },
	{ 1, 1, 6 },
	{ 1, 0, 25 },
	{ 1, 0, 14 },
	{ 1, 0, 69 },
	{ 1, 0, 9 },
	{ 1, 0, 15 },
	{ 1, 1, 9 },
	{ 1, 0, 65 },
	{ 1, 1, 8 },
	{ 1, 2, 16 },
	{ 1, 2, 3 },
	{ 1, 3, 8 },
	{ 1, 1, 12 },
	{ 1, 2, 22 },
	{ 1, 2, 5 },
	{ 1, 1, 11 },
	{ 1, 1, 15 },
	{ 1, 1, 26 },
	{ 1, 1, 25 },
	{ 1, 1, 34 },
	{ 1, 2, 29 },
	{ 1, 3, 12 },
	{ 1, 0, 11 },
	{ 1, 0, 29 },
	{ 1, 0, 20 },
	{ 1, 10, 0 },
	{ 1, 2, 4 },
	{ 1, 8, 0 },
	{ 1, 2, 8 },
	{ 1, 0, 28 },
	{ 1, 0, 22 },
	{ 1, 2, 9 },
	{ 1, 2, 17 },
	{ 1, 4, 8 },
	{ 1, 3, 7 },
	{ 1, 7, 0 },
	{ 1, 2, 86 },
	{ 1, 0, 19 },
	{ 1, 0, 53 },
	{ 1, 1, 39 },
	{ 1, 1, 18 },
	{ 1, 0, 32 },
	{ 1, 1, 59 },
	{ 1, 3, 2 },
	{ 1, 2, 14 },
	{ 1, 0, 31 },
	{ 1, 1, 37 },
	{ 1, 0, 37 },
	{ 1, 2, 96 },
	{ 1, 4, 2 },
	{ 1, 4, 1 },
	{ 1, 6, 1 },
	{ 1, 1, 19 },
	{ 1, 1, 29 },
	{ 1, 3, 3 },
	{ 1, 2, 10 },
	{ 1, 1, 10 },
	{ 1, 1, 20 },
	{ 1, 1, 13 },
	{ 1, 0, 26 },
	{ 1, 2, 63 },
	{ 1, 1, 23 },
	{ 1, 2, 13 },
	{ 1, 2, 6 },
};



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel