Hi, mono uses a method called IMT:
http://primates.ximian.com/~massi/blog/archive/2007/May-10.html Zoltan On Jan 16, 2008 9:01 PM, <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to learn about the under-the-hood workings of virtual > calls to interfaces methods in languages like C# and Java. I'm > asking on this mailing list because I figure someone here must have > implemented this. > > I understand virtual methods when you have a single inheritance class > hierarchy. Each object contains an extra field that effectively > points to an array of the function pointers (the "vtable"). So the C > equivalent of a virtual call would be something like: > > obj->type[method_offset](obj, arg, ...) > > Can someone give me a similar C equivalent of a virtual call to an > interface method? Is there a generally accepted "best" solution, or > do different VMs have different techniques? > > thanks, > Rob > > > > _______________________________________________ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list