Easy question :)
Daniel Wang
danwang@CS.Princeton.EDU
05 Apr 2001 15:37:07 -0400
"Stephen Weeks" <sweeks@intertrust.com> writes:
> > 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.
>
> Hi Dan. It's good to hear you're working on it again. Is this post-thesis? :-)
Nope.. I need to run a few larger benchmarks to graduate. I avoided them in
the past because the larger benchmakrs caused an older version of MLTon's
optimizer to break. I'm hoping the newer version won't break. :)
>
> > 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?
>
> There are probably several passes that reverse the order of function arguments.
I don't mind if function arguments get reversed. It's the tuple layouts that
need to stay in the "obvious" order.
> I just checked and flattening is one for sure, but there are probably others.
> It seems like an easier solution would be to look for the rhandle argument in
> any position. Is there a reason that won't work?
I hacked the flattening code and changed a few List.fold's to List.foldr's
and things seem to be working for me again... I'm now wrestling with
trimming down the Basis so it only uses the subset need for my benchmarks,
and doesn't contain exception handlers which break my type-safe gc right
now. :)