[Mono-devel-list] Question vtable

Paolo Molaro lupus at ximian.com
Tue Nov 30 10:00:59 EST 2004

On 11/30/04 Christoph Stiedl wrote:
> I am currently trying to understand how callvirt 
> works. Could anybody tell me where to find the 
> place in the code where the this object of a 
> callvirt is inspected for the vtable and 
> how the correct method is chosen. Where is the 
> code that gets the slot number in the vtable for 
> a special token in a callvirt statement? 

The C code can be found in metadata/object.c, in the function
mono_object_get_virtual_method (). The equivalent code
is generated by the jit inline. Check mini_emit_virtual_call ()
in inssel.brg.


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list