local refs
Stephen Weeks
MLton@sourcelight.com
Fri, 7 Dec 2001 14:28:32 -0800
> We still need to compute multi-threaded and multi-used.
Don't we just need multi-used (for localization)? Of course, it has
to take Thread_copyCurrent into account.
> Do you think constant propagation would benefit significantly
> from redoing the Once pass to have:
>
> val once: Program.t -> {multiThreadedF: Func.t -> bool,
> multiUsedF: Func.t -> bool,
> multiThreadedL: Label.t -> bool,
> multiUsedL: Func.t -> bool}
>
> (or some variant thereof; that type looks ugly to me). That is, something
> that can be shared by both constant prop. and localRef.
If I'm right, then we just need
val once: Program.t -> {funcIsMultiUsed: Func.t -> bool,
labelIsMultiUsed: Label.t -> bool}
> Any thoughts about whether or not we should make Thread_copyCurrent a
> transfer?
Yes, we should so that labelIsMultiUsed makes sense.
It sounds like we've reached a consensus. I'll make the changes to
introduce preThreads and make thread.sml and cont.sml consistent in
their use of copyCurrent. We'll delay doing anything with improving
Thread.new to use a new primitive until we figure it out. You do the
new once pass, make Thread_copyCurrent a transfer, and fix local ref.
Either you or I can then fix constant propagation.