[Mono-devel-list] Question vtable

Christoph Stiedl Shorty.10 at gmx.at
Tue Nov 30 10:29:15 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 
 
Thanks very much but I have another question raised by your answers: 
method->slot seems to hold the actual slot number, but that value 
is not set in mono_get_method_from_token, called from mono_get_method_full 
which is invoked in method_to_ir at CEE_CALLVIRT. Where and when gets the 
slot entry of a method set? 
 
Thanks a lot for your help 
 
Christoph 
 
 
>  
> --  
> ----------------------------------------------------------------- 
> lupus at debian.org                                     debian/rules 
> lupus at ximian.com                             Monkeys do it better 
> _______________________________________________ 
> Mono-devel-list mailing list 
> Mono-devel-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-devel-list 
>  
 

-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!



More information about the Mono-devel-list mailing list