Some Ideas for Dynamic Vtables in D

grauzone none at example.net
Sat Feb 14 11:27:51 PST 2009


Michel Fortin wrote:
> <http://michelf.com/weblog/2009/some-ideas-for-dynamic-vtables-in-d/>
> 

I think this will never work in D:
 >This process could cause vtables to be relocated in memory. To solve
 >this, we could fix each object’s vtable pointer using the GC type
 >information about each memory block could be used.

Even if the heap contained all type information, what about scope 
classes on the stack?

For extension methods, if would probably be better to use some kind of 
separate vtable for this.

To prevent ABI breakage with normal methods, one could use the linker, 
probably. I really should try to write some proof-of-concept assembler 
code to find out, if it's possible to use the linker to allocate vtable 
offsets.



More information about the Digitalmars-d mailing list