ponyc
ponyc copied to clipboard
Avoid allocating multiple vtable indices to subordinate methods
This reduces vtable sizes.
@Praetonus - if you don't have time to finish this, can you talk about what concerns led you to add the "DO NOT MERGE" label?
@jemc thoughts on merging this? perhaps testing with master and then merging?
I'm going to open a new PR for this and if it passes CI against our latest, I'll add @jemc as a review to make sure I didn't mess anything up.
Discussed in the sync call today, and this looks good. Basically this means that method calls with different receiver caps that direct to the same underlying method (i.e. are "subordinate" to it) will not get their own separate color in the vtable - they will copy the color of that method which it is subordinate to.
@jemc I believe we ran into issues with this going boom, yes? Should we close? Should I open another because neither of us remembers?
@jemc i finally brought this back to life for new testing.
at the moment there's an assertion failure on line 301 of gendesc.c in make_vtable:
pony_assert(vtable[index] == NULL);
Any thoughts?
The new branch is subordinate-vtable-back-to-life