crystal clear()

Steven Schveighoffer schveiguy at yahoo.com
Fri Sep 17 15:36:17 PDT 2010


On Fri, 17 Sep 2010 18:30:35 -0400, Sean Kelly <sean at invisibleduck.org>  
wrote:

> Steven Schveighoffer Wrote:
>>
>> But here is a legitimate question, how do we get the interfaces?   
>> There's
>> no indication in the ABI of where the interfaces are.  I know from logic
>> that they must be before the data members.  But logic also says that
>> interfaces defined by the derived types must appear after the data  
>> members
>> of the base class.  This is indeed tricky.
>
> I'd guess that the interface vtbls are referenced from the class vtbl,  
> so clearing the vptr should wipe everything.

They aren't.  They must occupy a pointer in the class, or else interfaces  
would have to be fat pointers (vtbl + this ptr)

-Steve


More information about the Digitalmars-d mailing list