[Mono-devel-list] Question vtable

Paolo Molaro lupus at ximian.com
Tue Nov 30 10:41:50 EST 2004


On 11/30/04 Christoph Stiedl wrote:
> > 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. 
>  
> 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? 

We call mono_class_init (cmethod->klass) and that will call 
mono_class_setup_vtable () which takes care of assigning the slots
for the methods in the class.

lupus

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



More information about the Mono-devel-list mailing list