* mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
* aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
ICollection<T> wrappers.
svn path=/trunk/mono/; revision=149691
+2010-01-16 Zoltan Varga <vargaz@gmail.com>
+
+ * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
+
+ * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
+ ICollection<T> wrappers.
+
2010-01-16 Zoltan Varga <vargaz@gmail.com>
* debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
code = mono_aot_get_method (domain, m);
if (code) {
- if (mono_method_needs_static_rgctx_invoke (m, FALSE))
- code = mono_create_static_rgctx_trampoline (m, code);
+ if (mono_method_needs_static_rgctx_invoke (m, FALSE)) {
+ code = mono_create_static_rgctx_trampoline (m, mono_create_ftnptr (domain, code));
+ /* The call above returns an ftnptr */
+ code = mono_get_addr_from_ftnptr (code);
+ }
return code;
}
* methods code. These trampolines are similar to the unbox trampolines, they
* perform the same task as the static rgctx wrappers, but they are smaller/faster,
* and can be made to work with full AOT.
+ * On PPC addr should be an ftnptr and the return value is an ftnptr too.
*/
gpointer
mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
RgctxTrampInfo tmp_info;
RgctxTrampInfo *info;
+#ifdef PPC_USES_FUNCTION_DESCRIPTOR
+ g_assert (((gpointer*)addr) [2] == 0);
+#endif
+
if (mini_method_get_context (m)->method_inst)
ctx = mono_method_lookup_rgctx (mono_class_vtable (mono_domain_get (), m->klass), mini_method_get_context (m)->method_inst);
else