Am 02.08.2019 um 21:27 schrieb bla...@blaise.ru:
On 02.08.2019 21:36, bla...@blaise.ru wrote:
embed a copy of the body of insert_struct_hidden_paras into TVMTBuilder.generate_vmt, then merge those two procdef-member traversals into one (hey, performance!)

Would you guys oppose such a change? Then we could rename insert_struct_hidden_paras back to insert_record_hidden_paras :)

Aside from performance, I would like it for closures (for their nameless methods, the insertion of hidden parameters cannot be deferred until the VMT generation).

I raised this on core and it was rejected. Maintainability is more important than performance as it could easily be that something else is added to insert_struct_hidden_paras and then that is forgotten to be added in TVMTBuilder.generate_vmt.


Also, handle_calling_convention would need to be changed not to indirectly rely on current_filepos, but I see that as a bonus: the trick of swapping current_filepos could be removed from its callers (namely, insert_record_hidden_paras).


That proposal is accepted. However without an overload as I suggested, instead all callsites of handle_calling_convention will need to be adjusted. Feel free to draw up a patch for this.

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to