Easy question :)

Daniel Wang danwang@CS.Princeton.EDU
04 Apr 2001 21:49:07 -0400


Hi all,
I'm back to hacking on my type safe GC using MLton. I'm updating my code to
work with the newer releases of MLton. In the process the simplify-type.fun
or some other pass has changed behavior from the older version in a way
that breaks some of my "hacks". In particular a type 


gc_clos6627_0 = fib_ret_fun_gc_clos6543_0 of [rhandle,
					      fib_ret_fun_gc_jump6628_0,
					      int,
					      fib_ret_clos_type6630_0]

gets optimized into


Datatypes:
gc_clos6627_0 = fib_ret_fun_gc_clos6543_0 of [fib_ret_clos_type6630_0,
					      int,
					      fib_ret_fun_gc_jump6628_0,
					      rhandle]


You'll notice the order of fields has been completely reversed. This breaks
some of my code down stream which looks at the first field of a constructor
for a value of type "rhandle" which is my hack to figure out what objects
are and are not region allocated and what region they are allocated in. 

Can anyone point me to the code where the fields get reorder? Or a place, I
can hack so that all rhandle's are the first field of every object?

I'm using the 2000-07-12 release of MLton. I'll update to the newest
release once I get this older version integrated with my very old code.