[MLton-user] Invoking multiple MLton compiled libraries from the
same process
Wesley W. Terpstra
wesley at terpstra.ca
Wed May 4 16:50:30 PDT 2011
On Wed, May 4, 2011 at 9:27 PM, Nicolas Bertolotti <
Nicolas.Bertolotti at mathworks.fr> wrote:
> It seems to be possible to build multiple libraries using MLton and run
> them from the same process (at least, it works on my very small example).
>
Yes, I tried to make this possible.
I am wondering whether there are some other impacts that I have not
> identified which would make it much more complex than that.
>
The heap object types will conflict, for one.
Each compiled library will have allocated the identifiers separately and
they probably won't match structurally. It's not quite as simple as just
combining the tables, either, as the generated program creates heap objects
with the appropriate type id as an immediate constant.
Work-around-able with some indirection, I suppose.
You would also need to combine the lists of heap roots.
All doable, just some work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20110505/39dc3b7b/attachment.htm
More information about the MLton-user
mailing list