Another compile-time perversion. Or not?
Ivan Senji
ivan.senji_REMOVE_ at _THIS__gmail.com
Thu Aug 31 03:00:09 PDT 2006
Don Clugston wrote:
> 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 was wondering the same thing. The only reason I could think of is for
speed efficiency.
> 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?
Me too looking for an answer :)
More information about the Digitalmars-d-announce
mailing list