local refs

Stephen Weeks MLton@sourcelight.com
Mon, 10 Dec 2001 11:03:28 -0800


> Fine by me; just wanted someone to give it a sanity check.  For example,
> the old once pass marks variables as once if their block is used once and
> their defining expression is an Array_array or Ref_ref.  Everything else
> seems to get false.  And then, in constantPropagation, at the place where
> the once predicate is checked, we immediately kick out anything of type
> array.  So, it seems like only refs have something interesting done to
> them.

Yeah, constant propagation used to globailze both arrays and refs,
which is why once only cared about them.  At some point, we were
worried about space safety, and so only wanted to globalize small
values, which threw out arrays, and refs holding non-small things.

Shall you or I do the change?