[Mono-dev] Patch: Fix fast generic virtual method calls with remoting

Mark Probst mark.probst at gmail.com
Wed Oct 8 19:09:43 EDT 2008


Hi Rodrigo,

> @@ -1991,7 +1990,7 @@
>              iter = NULL;
>              j = 0;
>              while ((cm = mono_class_get_methods (interf, &iter)))
> -                pvt->vtable [slot + j++] = mono_method_signature
> (cm)->generic_param_count ? cm : arch_create_remoting_trampoline (cm,
> target_type);
> +                pvt->vtable [slot + j++] = mono_method_signature
> (cm)->generic_param_count ? cm : arch_create_remoting_trampoline (domain,
> cm, target_type);
>
>              slot += mono_class_num_methods (interf);
>          }
>
> Why this part of the vtable doesn't receive a remoting wrapper?

It probably needs one, too :-)

> Looks like your patch reverts Robert's changes and use a new trampoline
> instead, thou there are other changes in object.c that haven't been changed
> back and seen related to virtual generic methods.

My guess is that the changes regarding the vtable were just there to
save memory, i.e. to not create trampolines for the generic virtual
slots which are never jumped to.  Since fast virtual generic method
calls do jump to those slots, we need something there.

We don't have a particular test case for bug #78882, but we have
several tests for generic remoting invokes in the
System.Runtime.Remoting testsuite (those were the one that were
broken), which are fixed by this patch, and the test case attached
with the bug report runs as well.

Anyway, updated patch attached.

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generic_virtual_remoting.diff
Type: text/x-diff
Size: 7238 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081009/ded41fe7/attachment-0001.bin 


More information about the Mono-devel-list mailing list