[Mono-dev] mono_method_get_unmanaged_thunk

Robert Jordan robertj at gmx.net
Sat May 3 10:17:23 EDT 2008


Sebastian Good wrote:
> The Embedding Mono page mentions possible future work on
> mono_method_get_unmanaged_thunk. We are using the embedding (reflection) API
> quite happily, writing our own marshaling for basic types (strings, arrays,
> enums, etc.) but would like to avoid the overhead of going through the
> generic invoke. When our wrappers initialize, it would be nice to simply JIT
> all the necessary methods and then call them directly via a C function
> pointer, as I think was imagined before. Exceptions are interesting; it
> would be quite acceptable to generate a thunk which took a MonoObject** to
> return the results of any exception. (On our wrappers we marshal the message
> and re-throw it as a C++ runtime_exception but I suspect this isn't what
> everyone would want to do.)
> 
> Is this a feature on the radar for anyone soon?
> 

There is a patch for this feature in Bugzilla:

https://bugzilla.novell.com/show_bug.cgi?id=386415

You may want to give it a try if you're compiling mono yourself.

Robert



More information about the Mono-devel-list mailing list