Object.factory() and exe file size bloat

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 22 05:47:34 PDT 2015


On 22 August 2015 at 11:33, Johannes Pfau via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> Am Fri, 21 Aug 2015 15:16:01 +0200
> schrieb Iain Buclaw via Digitalmars-d <digitalmars-d at puremagic.com>:
>
> >
> > Other than that, the semantics of pragma(inline, true) should
> > guarantee that the function is never *written* to object file.
> >
>
> This really should be documented then. If we build a shared library
> with pragma(inline) functions not emitting the function prevents taking
> the address of that function in all client code. As this is a breaking
> change to 'normal' inline semantics it needs to be documented.
>
> https://github.com/D-Programming-Language/dlang.org/pull/1073
>

I wouldn't go as far as preventing these functions from having their
address taken.  In that instance, of *course* it needs to be written to
object file.  But it should be put in COMDAT as each external module that
takes its address will have a copy of it.

Regards
Iain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150822/51d00018/attachment.html>


More information about the Digitalmars-d mailing list