comparison dmd2/template.c @ 953:5fa3e0ea06e9

Merged a bunch recent dmd v1 frontend changes into the dmd v2 tree.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Fri, 13 Feb 2009 22:20:30 +0100
parents 356e65836fb5
children 638d16625da2
comparison
equal deleted inserted replaced
952:29da57670853 953:5fa3e0ea06e9
3011 this->withsym = NULL; 3011 this->withsym = NULL;
3012 this->nest = 0; 3012 this->nest = 0;
3013 this->havetempdecl = 0; 3013 this->havetempdecl = 0;
3014 this->isnested = NULL; 3014 this->isnested = NULL;
3015 this->errors = 0; 3015 this->errors = 0;
3016
3017 // LDC
3016 this->tinst = NULL; 3018 this->tinst = NULL;
3019 this->tmodule = NULL;
3017 } 3020 }
3018 3021
3019 /***************** 3022 /*****************
3020 * This constructor is only called when we figured out which function 3023 * This constructor is only called when we figured out which function
3021 * template to instantiate. 3024 * template to instantiate.
3039 this->withsym = NULL; 3042 this->withsym = NULL;
3040 this->nest = 0; 3043 this->nest = 0;
3041 this->havetempdecl = 1; 3044 this->havetempdecl = 1;
3042 this->isnested = NULL; 3045 this->isnested = NULL;
3043 this->errors = 0; 3046 this->errors = 0;
3047
3048 // LDC
3044 this->tinst = NULL; 3049 this->tinst = NULL;
3050 this->tmodule = NULL;
3045 3051
3046 assert((size_t)tempdecl->scope > 0x10000); 3052 assert((size_t)tempdecl->scope > 0x10000);
3047 } 3053 }
3048 3054
3049 3055
3109 } 3115 }
3110 semanticdone = 1; 3116 semanticdone = 1;
3111 3117
3112 // get the enclosing template instance from the scope tinst 3118 // get the enclosing template instance from the scope tinst
3113 tinst = sc->tinst; 3119 tinst = sc->tinst;
3120
3121 // get the module of the outermost enclosing instantiation
3122 if (tinst)
3123 tmodule = tinst->tmodule;
3124 else
3125 tmodule = sc->module;
3126 //printf("%s in %s\n", toChars(), tmodule->toChars());
3114 3127
3115 #if LOG 3128 #if LOG
3116 printf("\tdo semantic\n"); 3129 printf("\tdo semantic\n");
3117 #endif 3130 #endif
3118 if (havetempdecl) 3131 if (havetempdecl)