Cross-module inlining

Johannes Pfau via D.gnu d.gnu at puremagic.com
Wed Nov 26 07:40:48 PST 2014


Has anybody had a closer look at cross-module inlining?
What exactly is necessary to get it working and how difficult would it
be to implement?

AFAICS
* We'd need to do semantic3 on all imported modules
* We'd have to call (a modified) toObjfile on all functions from
  imported modules

However, we of course can't emit the functions so could we mark them
as EXTERN? I've also tried to do that, but in non-toy examples
GDC always crashes somewhere. Do we also need to call toObjfile for
variables, classes, etc used in these functions (of course somehow
without emitting symbols)?

All in all this seems to be a complicated task, correct?


More information about the D.gnu mailing list