[Issue 11009] Regression (2.064 git-head): DMD consumes huge memory when it compiles enum containing many items
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 11 03:25:55 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11009
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Phobos |DMD
--- Comment #3 from monarchdodra at gmail.com 2013-09-11 03:25:53 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > This smells like
> > https://github.com/D-Programming-Language/phobos/pull/1540
> >
> > Could you try it without that change?
>
> I tried it, and you are right.
Cool.
I think I know what might be the culprit. May I request you try it with HEAD
again, but this time, replace:
line 829-832:
// generate a switch statement with string literals instead of allocating
memory
// @@@BUG@@@ 10950 workaround: [CTFE] enum "char[]" not correctly duplicated
when used.
enum rep(S val) = mixin(format(`"%s"%s`,
toStr!string(val), charLiteralSuffix!(ElementEncodingType!T)));
With:
template rep(S val)
{
static immutable(T) rep = toStr!(immutable(T))(val);
}
I have a hunch that should greatly improve the situation.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list