[MLton-devel] basis library benchmarks

Stephen Weeks MLton@mlton.org
Wed, 31 Jul 2002 14:54:55 -0700


> Part of this is due to the concat issue above, but not all.  The
> bigger problem is the usesCallcc reference to get tabulate to work
> in the presence of callcc.  As best I can make out, because String
> is derived from CharVector (instead of using it's own invocation of
> the sequence functor), then the code for CharVector.concat is really
> the code for Vector.concat -- i.e., the polmorphic vector code.
> Now, here's the part I don't understand fully: under basis-1997,
> inferSimplify eliminates the usesCallcc refernce, but under
> basis-2002, it does not.  The only difference I can see is that
> under basis-1997 it's in a monomorphic context, while under
> basis-2002 it's in a polymorphic context.

To avoid having to mess with instantiating type variables, the (S)Xml
simplifier only inlines monomorphic functions that are only called
once.  Obviously this is fine for Sxml, but hurts Xml simplification.
I'm surprised usesCallcc survives the Sxml simplification after
monomorphisation and makes it into environments.

> So, usesCallcc sticks around for a while, getting past around in
> environments (which seems odd, because it's global) and cascading
> through the optimizations.

No idea, except that maybe thread stuff is still around and is
confusing globalize.

My feeling is that just as we have not attempted to make our basis
library implementation thread safe, so should we abandon any attempts
to make the basis library "callcc safe".  It's certainly OK with the
spec, which doesn't mention callcc or threads.  If somebody uses
callcc and wants to use tabulate, they'll have to write their own
version that is callcc safe.


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel