Another compile-time perversion. Or not?
Don Clugston
dac at nospam.com.au
Thu Aug 31 02:21:12 PDT 2006
Walter Bright wrote:
> Ivan Senji wrote:
>> Actually dmd produces one more line:
>> Internal error: ..\ztc\cgobj.c 395
>> but that isn't a part of the fractal.
>
> That is caused by the compiler writing all the const values out to the
> object file, and overflowing the counters in the object module format
> because there are so many. Unfortunately, it isn't fixable, it's an
> artifact of the format.
>
> The slowness is also caused by the generation of stupendous object files.
Why do all of the const values need to be written to object file? I
would expect that once a template has been constant folded, it should be
possible to discard that reference to it. If it is not used elsewhere,
it shouldn't need to be included at all.
As I understand it, the use of modules makes the situation fundamentally
different to C++, where an entirely different file could define a
specialisation of the template -- in C++, the linker has a lot of work
to do.
Have I missed something?
More information about the Digitalmars-d-announce
mailing list