Very nice. As a follow up would be interesting to also reverse engineer the structure of the vtable itself. I guess it’s a list of pointers to the method implementations?
- the size of the pointed type - the alignment of the pointed type - a function pointer for its drop glue
That's already quite big to inline to save on indirection, and this is before adding more methods.