Mercurial > projects > ldc
annotate dmd/template.h @ 1626:8fa4ab3dcc88
Merge DMD r320: refactor
---
dmd/expression.c | 7 +++----
dmd/expression.h | 2 +-
dmd/mtype.c | 34 ++++++++--------------------------
3 files changed, 12 insertions(+), 31 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:23 -0300 |
parents | 3da302cc4966 |
children |
rev | line source |
---|---|
159 | 1 |
2 // Compiler implementation of the D programming language | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
3 // Copyright (c) 1999-2009 by Digital Mars |
159 | 4 // All Rights Reserved |
5 // written by Walter Bright | |
6 // http://www.digitalmars.com | |
7 // License for redistribution is by either the Artistic License | |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | |
9 // See the included readme.txt for details. | |
10 | |
11 #ifndef DMD_TEMPLATE_H | |
12 #define DMD_TEMPLATE_H | |
13 | |
14 #ifdef __DMC__ | |
15 #pragma once | |
16 #endif /* __DMC__ */ | |
17 | |
527
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
336
diff
changeset
|
18 #include <string> |
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
336
diff
changeset
|
19 |
159 | 20 #include "root.h" |
21 #include "arraytypes.h" | |
22 #include "dsymbol.h" | |
23 #include "mtype.h" | |
24 | |
25 | |
26 struct OutBuffer; | |
27 struct Identifier; | |
28 struct TemplateInstance; | |
29 struct TemplateParameter; | |
30 struct TemplateTypeParameter; | |
336 | 31 struct TemplateThisParameter; |
159 | 32 struct TemplateValueParameter; |
33 struct TemplateAliasParameter; | |
34 struct TemplateTupleParameter; | |
35 struct Type; | |
36 struct TypeTypeof; | |
37 struct Scope; | |
38 struct Expression; | |
39 struct AliasDeclaration; | |
40 struct FuncDeclaration; | |
41 struct HdrGenState; | |
42 enum MATCH; | |
43 | |
44 struct Tuple : Object | |
45 { | |
46 Objects objects; | |
47 | |
48 int dyncast() { return DYNCAST_TUPLE; } // kludge for template.isType() | |
49 }; | |
50 | |
51 | |
52 struct TemplateDeclaration : ScopeDsymbol | |
53 { | |
54 TemplateParameters *parameters; // array of TemplateParameter's | |
55 | |
56 TemplateParameters *origParameters; // originals for Ddoc | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
57 Expression *constraint; |
336 | 58 Array instances; // array of TemplateInstance's |
159 | 59 |
60 TemplateDeclaration *overnext; // next overloaded TemplateDeclaration | |
61 TemplateDeclaration *overroot; // first in overnext list | |
62 | |
1587 | 63 int semanticRun; // 1 semantic() run |
64 | |
159 | 65 Dsymbol *onemember; // if !=NULL then one member of this template |
66 | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
67 TemplateDeclaration(Loc loc, Identifier *id, TemplateParameters *parameters, |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
68 Expression *constraint, Array *decldefs); |
159 | 69 Dsymbol *syntaxCopy(Dsymbol *); |
70 void semantic(Scope *sc); | |
71 int overloadInsert(Dsymbol *s); | |
72 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
336 | 73 const char *kind(); |
159 | 74 char *toChars(); |
75 | |
76 void emitComment(Scope *sc); | |
1587 | 77 void toJsonBuffer(OutBuffer *buf); |
159 | 78 // void toDocBuffer(OutBuffer *buf); |
79 | |
80 MATCH matchWithInstance(TemplateInstance *ti, Objects *atypes, int flag); | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
81 MATCH leastAsSpecialized(TemplateDeclaration *td2); |
159 | 82 |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
83 MATCH deduceFunctionTemplateMatch(Loc loc, Objects *targsi, Expression *ethis, Expressions *fargs, Objects *dedargs); |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
84 FuncDeclaration *deduceFunctionTemplate(Scope *sc, Loc loc, Objects *targsi, Expression *ethis, Expressions *fargs, int flags = 0); |
159 | 85 void declareParameter(Scope *sc, TemplateParameter *tp, Object *o); |
86 | |
87 TemplateDeclaration *isTemplateDeclaration() { return this; } | |
88 | |
89 TemplateTupleParameter *isVariadic(); | |
90 int isOverloadable(); | |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
91 |
1615
3da302cc4966
Merge DMD r294: bugzilla 2816 Sudden-death static assert is not...
Leandro Lucarella <llucax@gmail.com>
parents:
1609
diff
changeset
|
92 void makeParamNamesVisibleInConstraint(Scope *paramscope); |
3da302cc4966
Merge DMD r294: bugzilla 2816 Sudden-death static assert is not...
Leandro Lucarella <llucax@gmail.com>
parents:
1609
diff
changeset
|
93 |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
94 #if IN_LLVM |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
561
diff
changeset
|
95 // LDC |
527
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
336
diff
changeset
|
96 std::string intrinsicName; |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
97 #endif |
159 | 98 }; |
99 | |
100 struct TemplateParameter | |
101 { | |
102 /* For type-parameter: | |
103 * template Foo(ident) // specType is set to NULL | |
104 * template Foo(ident : specType) | |
105 * For value-parameter: | |
106 * template Foo(valType ident) // specValue is set to NULL | |
107 * template Foo(valType ident : specValue) | |
108 * For alias-parameter: | |
109 * template Foo(alias ident) | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
110 * For this-parameter: |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
111 * template Foo(this ident) |
159 | 112 */ |
113 | |
114 Loc loc; | |
115 Identifier *ident; | |
116 | |
117 Declaration *sparam; | |
118 | |
119 TemplateParameter(Loc loc, Identifier *ident); | |
120 | |
121 virtual TemplateTypeParameter *isTemplateTypeParameter(); | |
122 virtual TemplateValueParameter *isTemplateValueParameter(); | |
123 virtual TemplateAliasParameter *isTemplateAliasParameter(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
124 #if DMDV2 |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
125 virtual TemplateThisParameter *isTemplateThisParameter(); |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
126 #endif |
159 | 127 virtual TemplateTupleParameter *isTemplateTupleParameter(); |
128 | |
129 virtual TemplateParameter *syntaxCopy() = 0; | |
130 virtual void declareParameter(Scope *sc) = 0; | |
131 virtual void semantic(Scope *) = 0; | |
132 virtual void print(Object *oarg, Object *oded) = 0; | |
133 virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs) = 0; | |
134 virtual Object *specialization() = 0; | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
135 virtual Object *defaultArg(Loc loc, Scope *sc) = 0; |
159 | 136 |
137 /* If TemplateParameter's match as far as overloading goes. | |
138 */ | |
139 virtual int overloadMatch(TemplateParameter *) = 0; | |
140 | |
141 /* Match actual argument against parameter. | |
142 */ | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
143 virtual MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags = 0) = 0; |
159 | 144 |
145 /* Create dummy argument based on parameter. | |
146 */ | |
147 virtual void *dummyArg() = 0; | |
148 }; | |
149 | |
150 struct TemplateTypeParameter : TemplateParameter | |
151 { | |
152 /* Syntax: | |
153 * ident : specType = defaultType | |
154 */ | |
155 Type *specType; // type parameter: if !=NULL, this is the type specialization | |
156 Type *defaultType; | |
157 | |
158 TemplateTypeParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); | |
159 | |
160 TemplateTypeParameter *isTemplateTypeParameter(); | |
161 TemplateParameter *syntaxCopy(); | |
162 void declareParameter(Scope *sc); | |
163 void semantic(Scope *); | |
164 void print(Object *oarg, Object *oded); | |
165 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
166 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
167 Object *defaultArg(Loc loc, Scope *sc); |
159 | 168 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
169 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 170 void *dummyArg(); |
171 }; | |
172 | |
336 | 173 #if DMDV2 |
174 struct TemplateThisParameter : TemplateTypeParameter | |
175 { | |
176 /* Syntax: | |
177 * this ident : specType = defaultType | |
178 */ | |
179 Type *specType; // type parameter: if !=NULL, this is the type specialization | |
180 Type *defaultType; | |
181 | |
182 TemplateThisParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); | |
183 | |
184 TemplateThisParameter *isTemplateThisParameter(); | |
185 TemplateParameter *syntaxCopy(); | |
186 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
187 }; | |
188 #endif | |
189 | |
159 | 190 struct TemplateValueParameter : TemplateParameter |
191 { | |
192 /* Syntax: | |
193 * valType ident : specValue = defaultValue | |
194 */ | |
195 | |
196 Type *valType; | |
197 Expression *specValue; | |
198 Expression *defaultValue; | |
199 | |
200 static Expression *edummy; | |
201 | |
202 TemplateValueParameter(Loc loc, Identifier *ident, Type *valType, Expression *specValue, Expression *defaultValue); | |
203 | |
204 TemplateValueParameter *isTemplateValueParameter(); | |
205 TemplateParameter *syntaxCopy(); | |
206 void declareParameter(Scope *sc); | |
207 void semantic(Scope *); | |
208 void print(Object *oarg, Object *oded); | |
209 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
210 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
211 Object *defaultArg(Loc loc, Scope *sc); |
159 | 212 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
213 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 214 void *dummyArg(); |
215 }; | |
216 | |
217 struct TemplateAliasParameter : TemplateParameter | |
218 { | |
219 /* Syntax: | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
220 * specType ident : specAlias = defaultAlias |
159 | 221 */ |
222 | |
223 Type *specAliasT; | |
224 Dsymbol *specAlias; | |
225 | |
226 Type *defaultAlias; | |
227 | |
228 static Dsymbol *sdummy; | |
229 | |
230 TemplateAliasParameter(Loc loc, Identifier *ident, Type *specAliasT, Type *defaultAlias); | |
231 | |
232 TemplateAliasParameter *isTemplateAliasParameter(); | |
233 TemplateParameter *syntaxCopy(); | |
234 void declareParameter(Scope *sc); | |
235 void semantic(Scope *); | |
236 void print(Object *oarg, Object *oded); | |
237 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
238 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
239 Object *defaultArg(Loc loc, Scope *sc); |
159 | 240 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
241 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 242 void *dummyArg(); |
243 }; | |
244 | |
245 struct TemplateTupleParameter : TemplateParameter | |
246 { | |
247 /* Syntax: | |
248 * ident ... | |
249 */ | |
250 | |
251 TemplateTupleParameter(Loc loc, Identifier *ident); | |
252 | |
253 TemplateTupleParameter *isTemplateTupleParameter(); | |
254 TemplateParameter *syntaxCopy(); | |
255 void declareParameter(Scope *sc); | |
256 void semantic(Scope *); | |
257 void print(Object *oarg, Object *oded); | |
258 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
259 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
260 Object *defaultArg(Loc loc, Scope *sc); |
159 | 261 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
262 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 263 void *dummyArg(); |
264 }; | |
265 | |
266 struct TemplateInstance : ScopeDsymbol | |
267 { | |
268 /* Given: | |
269 * foo!(args) => | |
270 * name = foo | |
271 * tiargs = args | |
272 */ | |
273 Identifier *name; | |
274 //Array idents; | |
275 Objects *tiargs; // Array of Types/Expressions of template | |
276 // instance arguments [int*, char, 10*10] | |
277 | |
278 Objects tdtypes; // Array of Types/Expressions corresponding | |
279 // to TemplateDeclaration.parameters | |
280 // [int, char, 100] | |
281 | |
282 TemplateDeclaration *tempdecl; // referenced by foo.bar.abc | |
283 TemplateInstance *inst; // refer to existing instance | |
1367
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
284 TemplateInstance *tinst; // enclosing template instance |
159 | 285 ScopeDsymbol *argsym; // argument symbol table |
286 AliasDeclaration *aliasdecl; // !=NULL if instance is an alias for its | |
287 // sole member | |
288 WithScopeSymbol *withsym; // if a member of a with statement | |
1587 | 289 int semanticRun; // has semantic() been done? |
336 | 290 int semantictiargsdone; // has semanticTiargs() been done? |
159 | 291 int nest; // for recursion detection |
292 int havetempdecl; // 1 if used second constructor | |
293 Dsymbol *isnested; // if referencing local symbols, this is the context | |
294 int errors; // 1 if compiled with errors | |
295 #ifdef IN_GCC | |
296 /* On some targets, it is necessary to know whether a symbol | |
297 will be emitted in the output or not before the symbol | |
298 is used. This can be different from getModule(). */ | |
299 Module * objFileModule; | |
300 #endif | |
301 | |
302 TemplateInstance(Loc loc, Identifier *temp_id); | |
303 TemplateInstance(Loc loc, TemplateDeclaration *tempdecl, Objects *tiargs); | |
304 static Objects *arraySyntaxCopy(Objects *objs); | |
305 Dsymbol *syntaxCopy(Dsymbol *); | |
306 void semantic(Scope *sc); | |
307 void semantic2(Scope *sc); | |
308 void semantic3(Scope *sc); | |
309 void inlineScan(); | |
310 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
311 Dsymbol *toAlias(); // resolve real symbol | |
336 | 312 const char *kind(); |
159 | 313 int oneMember(Dsymbol **ps); |
1609
1d0220dd613a
Merge DMD r274: harmonization
Leandro Lucarella <llucax@gmail.com>
parents:
1587
diff
changeset
|
314 int needsTypeInference(Scope *sc); |
159 | 315 char *toChars(); |
316 char *mangle(); | |
1367
8026319762be
Merged DMD 1.045 !!!
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1195
diff
changeset
|
317 void printInstantiationTrace(); |
159 | 318 |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
319 #if IN_DMD |
336 | 320 void toObjFile(int multiobj); // compile to .obj file |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
321 #endif |
159 | 322 |
323 // Internal | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
324 static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs, int flags); |
159 | 325 void semanticTiargs(Scope *sc); |
326 TemplateDeclaration *findTemplateDeclaration(Scope *sc); | |
327 TemplateDeclaration *findBestMatch(Scope *sc); | |
328 void declareParameters(Scope *sc); | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
329 int hasNestedArgs(Objects *tiargs); |
159 | 330 Identifier *genIdent(); |
331 | |
332 TemplateInstance *isTemplateInstance() { return this; } | |
333 AliasDeclaration *isAliasDeclaration(); | |
561
d4e95db0e62b
Introducing template instantiation traces for static asserts and errors within templates.
Christian Kamm <kamm incasoftware de>
parents:
527
diff
changeset
|
334 |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
335 #if IN_LLVM |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
561
diff
changeset
|
336 // LDC |
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.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
875
diff
changeset
|
337 Module* tmodule; // module from outermost enclosing template instantiation |
1067
7ce8355fbcc6
Improved template emission control for singleobj building.
Christian Kamm <kamm incasoftware de>
parents:
940
diff
changeset
|
338 Module* emittedInModule; // which module this template instance has been emitted in |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
339 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
340 void codegen(Ir*); |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
341 #endif |
159 | 342 }; |
343 | |
344 struct TemplateMixin : TemplateInstance | |
345 { | |
346 Array *idents; | |
347 Type *tqual; | |
348 | |
349 TemplateMixin(Loc loc, Identifier *ident, Type *tqual, Array *idents, Objects *tiargs); | |
350 Dsymbol *syntaxCopy(Dsymbol *s); | |
351 void semantic(Scope *sc); | |
352 void semantic2(Scope *sc); | |
353 void semantic3(Scope *sc); | |
354 void inlineScan(); | |
336 | 355 const char *kind(); |
159 | 356 int oneMember(Dsymbol **ps); |
357 int hasPointers(); | |
358 char *toChars(); | |
321 | 359 char *mangle(); |
159 | 360 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
361 | |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
362 #if IN_DMD |
336 | 363 void toObjFile(int multiobj); // compile to .obj file |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
364 #endif |
159 | 365 |
366 TemplateMixin *isTemplateMixin() { return this; } | |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
367 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
368 #if IN_LLVM |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
369 void codegen(Ir*); |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
370 #endif |
159 | 371 }; |
372 | |
373 Expression *isExpression(Object *o); | |
374 Dsymbol *isDsymbol(Object *o); | |
375 Type *isType(Object *o); | |
376 Tuple *isTuple(Object *o); | |
377 Type *getType(Object *o); | |
378 Dsymbol *getDsymbol(Object *o); | |
379 | |
380 void ObjectToCBuffer(OutBuffer *buf, HdrGenState *hgs, Object *oarg); | |
381 | |
382 #endif /* DMD_TEMPLATE_H */ | |
1174
0b26cfb2d445
Add newlines to end of file.
Christian Kamm <kamm incasoftware de>
parents:
1147
diff
changeset
|
383 |