[m-dev.] for review: --target option, IL grades and copy-in/copy-out for MLDS

Tyson Dowd trd at cs.mu.OZ.AU
Tue Sep 5 13:44:44 AEDT 2000


On 05-Sep-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> That documentation doesn't explain why we need to use a local function
> as a proxy when in calling something in a model_non context from
> within pragma C code in IL.
> 
> Ah, it's all coming back to me now...
> MS Managed C++ won't let you call via a function pointer, and
> with `--target il' we generate managed C++ for `pragma c_code' fragments,
> which we put in a different file, so if we want to make a call to
> a continuation, we need to put the call in a separate function
> so that it gets compiled as C rather than managed C++.
> But this should all be documented.

Actually for the record, the proxy function gets compiled in IL rather
than managed C++ (you said C, but that was probably a braino). 
But yes, rather than calling the continuation in C++ (which we can't do),
we pass the continuation to a function in IL that will call the continuation. 

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list