[swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

Joe Groff jgroff at apple.com
Mon Jul 31 11:59:50 CDT 2017

> On Jul 31, 2017, at 9:21 AM, Erik Eckstein <eeckstein at apple.com> wrote:
> Would it be possible that whenever a specialized class is instantiated and the metadata already exists with a generic vtable, it just overwrites the vtable pointer in the metadata with the specialized version?
> I didn’t think that through, but maybe the same could be done for witness tables?

Sure, we could redirect tables at runtime. It would require more runtime infrastructure, though we can't really get around uniquing vtables for classes, so that might be unavoidable.


More information about the swift-dev mailing list