Mercurial > projects > ldc
comparison dmd/template.h @ 1103:b30fe7e1dbb9
- Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 12 Mar 2009 20:37:27 +0100 |
parents | 7ce8355fbcc6 |
children | dbe4af57b240 |
comparison
equal
deleted
inserted
replaced
1102:ae950bd712d3 | 1103:b30fe7e1dbb9 |
---|---|
1 | 1 |
2 // Compiler implementation of the D programming language | 2 // Compiler implementation of the D programming language |
3 // Copyright (c) 1999-2008 by Digital Mars | 3 // Copyright (c) 1999-2009 by Digital Mars |
4 // All Rights Reserved | 4 // All Rights Reserved |
5 // written by Walter Bright | 5 // written by Walter Bright |
6 // http://www.digitalmars.com | 6 // http://www.digitalmars.com |
7 // License for redistribution is by either the Artistic License | 7 // License for redistribution is by either the Artistic License |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | 8 // in artistic.txt, or the GNU General Public License in gnu.txt. |
135 */ | 135 */ |
136 virtual int overloadMatch(TemplateParameter *) = 0; | 136 virtual int overloadMatch(TemplateParameter *) = 0; |
137 | 137 |
138 /* Match actual argument against parameter. | 138 /* Match actual argument against parameter. |
139 */ | 139 */ |
140 virtual MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam) = 0; | 140 virtual MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags = 0) = 0; |
141 | 141 |
142 /* Create dummy argument based on parameter. | 142 /* Create dummy argument based on parameter. |
143 */ | 143 */ |
144 virtual void *dummyArg() = 0; | 144 virtual void *dummyArg() = 0; |
145 }; | 145 }; |
161 void print(Object *oarg, Object *oded); | 161 void print(Object *oarg, Object *oded); |
162 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 162 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
163 Object *specialization(); | 163 Object *specialization(); |
164 Object *defaultArg(Loc loc, Scope *sc); | 164 Object *defaultArg(Loc loc, Scope *sc); |
165 int overloadMatch(TemplateParameter *); | 165 int overloadMatch(TemplateParameter *); |
166 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam); | 166 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
167 void *dummyArg(); | 167 void *dummyArg(); |
168 }; | 168 }; |
169 | 169 |
170 #if DMDV2 | 170 #if DMDV2 |
171 struct TemplateThisParameter : TemplateTypeParameter | 171 struct TemplateThisParameter : TemplateTypeParameter |
205 void print(Object *oarg, Object *oded); | 205 void print(Object *oarg, Object *oded); |
206 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 206 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
207 Object *specialization(); | 207 Object *specialization(); |
208 Object *defaultArg(Loc loc, Scope *sc); | 208 Object *defaultArg(Loc loc, Scope *sc); |
209 int overloadMatch(TemplateParameter *); | 209 int overloadMatch(TemplateParameter *); |
210 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam); | 210 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
211 void *dummyArg(); | 211 void *dummyArg(); |
212 }; | 212 }; |
213 | 213 |
214 struct TemplateAliasParameter : TemplateParameter | 214 struct TemplateAliasParameter : TemplateParameter |
215 { | 215 { |
233 void print(Object *oarg, Object *oded); | 233 void print(Object *oarg, Object *oded); |
234 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 234 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
235 Object *specialization(); | 235 Object *specialization(); |
236 Object *defaultArg(Loc loc, Scope *sc); | 236 Object *defaultArg(Loc loc, Scope *sc); |
237 int overloadMatch(TemplateParameter *); | 237 int overloadMatch(TemplateParameter *); |
238 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam); | 238 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
239 void *dummyArg(); | 239 void *dummyArg(); |
240 }; | 240 }; |
241 | 241 |
242 struct TemplateTupleParameter : TemplateParameter | 242 struct TemplateTupleParameter : TemplateParameter |
243 { | 243 { |
254 void print(Object *oarg, Object *oded); | 254 void print(Object *oarg, Object *oded); |
255 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 255 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
256 Object *specialization(); | 256 Object *specialization(); |
257 Object *defaultArg(Loc loc, Scope *sc); | 257 Object *defaultArg(Loc loc, Scope *sc); |
258 int overloadMatch(TemplateParameter *); | 258 int overloadMatch(TemplateParameter *); |
259 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam); | 259 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
260 void *dummyArg(); | 260 void *dummyArg(); |
261 }; | 261 }; |
262 | 262 |
263 struct TemplateInstance : ScopeDsymbol | 263 struct TemplateInstance : ScopeDsymbol |
264 { | 264 { |
316 static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs); | 316 static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs); |
317 void semanticTiargs(Scope *sc); | 317 void semanticTiargs(Scope *sc); |
318 TemplateDeclaration *findTemplateDeclaration(Scope *sc); | 318 TemplateDeclaration *findTemplateDeclaration(Scope *sc); |
319 TemplateDeclaration *findBestMatch(Scope *sc); | 319 TemplateDeclaration *findBestMatch(Scope *sc); |
320 void declareParameters(Scope *sc); | 320 void declareParameters(Scope *sc); |
321 int isNested(Objects *tiargs); | 321 int hasNestedArgs(Objects *tiargs); |
322 Identifier *genIdent(); | 322 Identifier *genIdent(); |
323 | 323 |
324 TemplateInstance *isTemplateInstance() { return this; } | 324 TemplateInstance *isTemplateInstance() { return this; } |
325 AliasDeclaration *isAliasDeclaration(); | 325 AliasDeclaration *isAliasDeclaration(); |
326 | 326 |