On Wed, May 4, 2011 at 9:27 PM, Nicolas Bertolotti <span dir="ltr"><<a href="mailto:Nicolas.Bertolotti@mathworks.fr">Nicolas.Bertolotti@mathworks.fr</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="FR" link="blue" vlink="purple">
<div>
<p class="MsoNormal">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).</p></div></div></blockquote><div>Yes, I tried to make this possible. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="FR" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US">I am wondering whether there are some other impacts that I have
not identified which would make it much more complex than that.</span></p></div></div></blockquote><div> </div><div>The heap object types will conflict, for one.</div><div><br></div><div>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.</div>
<div><br></div><div>Work-around-able with some indirection, I suppose. </div><div><br></div><div>You would also need to combine the lists of heap roots.</div><div><br></div><div>All doable, just some work.</div></div>