[MLton] stack-allocated references

Jake Donham jake at sparkplug.bitmechanic.com
Wed Feb 28 18:56:25 PST 2007


Matthew Fluet <fluet at tti-c.org> writes:

> [local ref becomes SSA var allocated on stack]

OK, that makes sense.

> I assume that an immutable stacklet can become mutable again when it
> becomes the top-most stacklet.

Yes.

> MLton should work fine with this scheme; MLton only mutates the
> top-most stack frame.  Any mutable data shared between stack frames
> must be in the heap.

Great.

Is there any limit to the size of a stack frame? Another way this
could fail is a stack frame exceeding the stacklet size. I guess that
is no problem to implement (just allocate a bigger stacklet) but you
would lose the realtime guarantee.

Thanks,

Jake



More information about the MLton mailing list