[MLton-devel] cvs commit: calling SML from C

Matthew Fluet MLton@mlton.org
Tue, 25 Mar 2003 08:11:39 -0500 (EST)


>   Warning: this checkin only supports calling SML from C with the C
>   codegen.  To get it to work with the native codegen, two things must
>   be done:
>
>   1. Add an implementation of MLton_callFromC to x86codegen.h.  It
>      shouldn't be too hard to pattern match off of MLton_callFromC in
>      ccodegen.h and main in x86codegen.h.
>
>   2. Implement C calls to Thread_returnToC in the x86 codegen.  Again,
>      the semantics are in the C codegen.
>
>   Matthew, can you look into those two things?

I probably won't get a chance to look at those two until the end of this
week or the weekend.  A brief look at ccodegen.h suggests that it
shouldn't be too hard, although there may be some trickery in
Thread_returnToC because we'll need to restore the C stack to %esp before
jumping back into the MLton_callFromC code.  I'll need to think about the
right way to do it.




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel