<div dir="ltr">Marc,<div><br></div><div>This was not my question i.e. if I can migrate between JS/PHP/Java on the one hand and C on the other hand -</div><div><br></div><div>My question was, if I can implement in C, a "VM" that executes a compiled version of the code, within some kind of interpreter, so I easily can do completely safe Scheme code execution within that VM -</div><div><br></div><div>I.e. I can followup memory allocation and which globals/what environment I allow the "guest" code to run.</div><div><br></div><div><br></div><div>Perhaps this could be as simple as getting the JS/PHP/Java-format GVM code and implementing some kind of interpreter/VM for it?</div><div><br></div><div>Thanks<br><div class="gmail_extra"><br><div class="gmail_quote">2015-10-21 20:40 GMT+08:00 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The code generated by the C backend and the code generated by the universal backend are incompatible when it comes to task migration.  This is because the two backends do not generate the same GVM code (due to differences in the set of inlined primitives).  Moreover, the low-level representation of stack frames is different (for example the C backend enforces alignment of stack frames), and the ordering of basic-blocks is different.  Currently I don’t have any plan to make the backends compatible for migrating continuations.  It might be possible to make closures compatible though and I will think about it.<br>
<br>
On the other hand, object->u8vector and u8vector->object are compatible for types other than procedures and continuations.  It is possible to transfer data (even with circularities) between them, so an ad-hoc remote procedure call implementation should not be too difficult to build.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marc<br>
</font></span><span class="im HOEnZb"><br>
> On Oct 20, 2015, at 11:45 PM, Bradley Lucier <<a href="mailto:lucier@math.purdue.edu">lucier@math.purdue.edu</a>> wrote:<br>
><br>
> Can you migrate it from a browser to a gambit-c interpreter running on some server (not php on Apache)?<br>
<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</div></div></blockquote></div><br></div></div></div>