Dan Sugalski writes:
: Resizing the vtable at runtime is a really dodgy thing. There are some 
: rather huge threading implications here--changing their size (as opposed to 
: using up a limited number of "uncommitted" spots we leave at the end) means 
: potentially having to move all the vtables around, which means updating the 
: vtable pointers already stuck into variables. This, one could assume, falls 
: firmly in the "yuck" category.

I think we definitely have to be able to resize vtables at compile time,
which is a form of run time.  It's vaguely possible we could restrict
multithreading during compile phase.

On the other hand, if objects point at their class, and the class points
at the vtable, I don't see any big deal in resizing.  When you're ready
to commit a new vtable it's a single pointer swap.

Larry

Reply via email to