Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
939:cac9895be400 | 940:39519a1ff603 |
---|---|
2899 this->withsym = NULL; | 2899 this->withsym = NULL; |
2900 this->nest = 0; | 2900 this->nest = 0; |
2901 this->havetempdecl = 1; | 2901 this->havetempdecl = 1; |
2902 this->isnested = NULL; | 2902 this->isnested = NULL; |
2903 this->errors = 0; | 2903 this->errors = 0; |
2904 | |
2905 // LDC | |
2904 this->tinst = NULL; | 2906 this->tinst = NULL; |
2907 this->tmodule = NULL; | |
2905 | 2908 |
2906 assert((size_t)tempdecl->scope > 0x10000); | 2909 assert((size_t)tempdecl->scope > 0x10000); |
2907 } | 2910 } |
2908 | 2911 |
2909 | 2912 |
2977 } | 2980 } |
2978 semanticdone = 1; | 2981 semanticdone = 1; |
2979 | 2982 |
2980 // get the enclosing template instance from the scope tinst | 2983 // get the enclosing template instance from the scope tinst |
2981 tinst = sc->tinst; | 2984 tinst = sc->tinst; |
2985 tmodule = sc->module; | |
2982 | 2986 |
2983 #if LOG | 2987 #if LOG |
2984 printf("\tdo semantic\n"); | 2988 printf("\tdo semantic\n"); |
2985 #endif | 2989 #endif |
2986 if (havetempdecl) | 2990 if (havetempdecl) |