Mercurial > projects > ldc
diff dmd/template.c @ 940:39519a1ff603
Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 04 Feb 2009 18:48:03 +0100 |
parents | 27a379f288bf |
children | 1714836f2c0b |
line wrap: on
line diff
--- a/dmd/template.c Wed Feb 04 18:39:39 2009 +0100 +++ b/dmd/template.c Wed Feb 04 18:48:03 2009 +0100 @@ -2901,7 +2901,10 @@ this->havetempdecl = 1; this->isnested = NULL; this->errors = 0; + + // LDC this->tinst = NULL; + this->tmodule = NULL; assert((size_t)tempdecl->scope > 0x10000); } @@ -2979,6 +2982,7 @@ // get the enclosing template instance from the scope tinst tinst = sc->tinst; + tmodule = sc->module; #if LOG printf("\tdo semantic\n");