Template "methods".
commit585ea667bb9a37dcb96cdd8e4c4f2d40c4382d21
authorArtur Skawina <art.08.09@gmail.com>
Wed, 1 Feb 2012 18:18:21 +0000 (1 19:18 +0100)
committerArtur Skawina <art.08.09@gmail.com>
Wed, 1 Feb 2012 18:18:21 +0000 (1 19:18 +0100)
treebbe38298b8909ea158a54789367d6b3b1c17a86b
parenteabf688adb5a31c550dbfc9522bda69865e3c1ca
Template "methods".

This helps current GDC, as it does not inline functions from modules
other than the current one (unless you use LTO or compile all modules
together).

But the real reason for the switch is not performance, it's the fact
that some library functions documented in the GIR files are not
present in the libraries. This means that if unused methods are not
discarded then linking every program using certain modules fails.

GC-sections would also be a solution, but using templates is more
portable.

Unfortunately the D frontend does not currently allow templates that
have the same name as functions, so mixins overloading existing
methods need to be changed. Hence no girtod runtime option allowing
turning this feature on/off.
21 files changed:
gtk2/atk.d
gtk2/cairo.d
gtk2/cally.d
gtk2/clutter.d
gtk2/clutterx11.d
gtk2/cogl.d
gtk2/coglpango.d
gtk2/fontconfig2.d
gtk2/freetype2.d
gtk2/gdk2.d
gtk2/gdkpixbuf2.d
gtk2/gio2.d
gtk2/gl.d
gtk2/glib2.d
gtk2/gmodule2.d
gtk2/gobject2.d
gtk2/gtk2.d
gtk2/json.d
gtk2/pango.d
gtk2/pangocairo.d
gtk2/pangoft2.d