unfold and flattening

Stephen Weeks MLton@sourcelight.com
Wed, 18 Jul 2001 14:43:57 -0700


> What does the array primitive fill the array with?  If it doesn't fill it,
> then what if a GC happens before we fill it?  (To argue no GC can happen
> requires some argument about signals not happening either.)

If the array holds nonpointer values, then the array primitive doesn't fill it
in.  If the array holds pointer values, then the array primitive fills it in
with 0x1s, which is enough to avoid problems should there be a gc.  It could
cause a seg fault if the basis library attempts to get an element before filling
the array in, but that never happens :-).