Mercurial > projects > ldc
annotate dmd/template.h @ 1168:ab186e535e72
A different fix to #218 and DMD2682 that does not lead to constant folding regressions.
Fixes run/const_15, run/c/const_16_B.
The price is removing the lvalueness of struct literals. If it turns out too
much code depends on this behavior or we don't want to break with DMD, we
could keep struct literals as lvalues and instead convert struct literals used
as expression initializers into struct initializers.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 29 Mar 2009 11:43:45 +0200 |
parents | dbe4af57b240 |
children | 0b26cfb2d445 |
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 #if DMDV2 |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
58 Expression *constraint; |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
59 #endif |
336 | 60 Array instances; // array of TemplateInstance's |
159 | 61 |
62 TemplateDeclaration *overnext; // next overloaded TemplateDeclaration | |
63 TemplateDeclaration *overroot; // first in overnext list | |
64 | |
65 Scope *scope; | |
66 Dsymbol *onemember; // if !=NULL then one member of this template | |
67 | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
68 TemplateDeclaration(Loc loc, Identifier *id, TemplateParameters *parameters, |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
69 #if DMDV2 |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
70 Expression *constraint, |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
71 #endif |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
72 Array *decldefs); |
159 | 73 Dsymbol *syntaxCopy(Dsymbol *); |
74 void semantic(Scope *sc); | |
75 int overloadInsert(Dsymbol *s); | |
76 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
336 | 77 const char *kind(); |
159 | 78 char *toChars(); |
79 | |
80 void emitComment(Scope *sc); | |
81 // void toDocBuffer(OutBuffer *buf); | |
82 | |
83 MATCH matchWithInstance(TemplateInstance *ti, Objects *atypes, int flag); | |
84 int leastAsSpecialized(TemplateDeclaration *td2); | |
85 | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
86 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
|
87 FuncDeclaration *deduceFunctionTemplate(Scope *sc, Loc loc, Objects *targsi, Expression *ethis, Expressions *fargs, int flags = 0); |
159 | 88 void declareParameter(Scope *sc, TemplateParameter *tp, Object *o); |
89 | |
90 TemplateDeclaration *isTemplateDeclaration() { return this; } | |
91 | |
92 TemplateTupleParameter *isVariadic(); | |
93 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
|
94 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
95 #if IN_LLVM |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
561
diff
changeset
|
96 // LDC |
527
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
336
diff
changeset
|
97 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
|
98 #endif |
159 | 99 }; |
100 | |
101 struct TemplateParameter | |
102 { | |
103 /* For type-parameter: | |
104 * template Foo(ident) // specType is set to NULL | |
105 * template Foo(ident : specType) | |
106 * For value-parameter: | |
107 * template Foo(valType ident) // specValue is set to NULL | |
108 * template Foo(valType ident : specValue) | |
109 * For alias-parameter: | |
110 * template Foo(alias ident) | |
111 */ | |
112 | |
113 Loc loc; | |
114 Identifier *ident; | |
115 | |
116 Declaration *sparam; | |
117 | |
118 TemplateParameter(Loc loc, Identifier *ident); | |
119 | |
120 virtual TemplateTypeParameter *isTemplateTypeParameter(); | |
121 virtual TemplateValueParameter *isTemplateValueParameter(); | |
122 virtual TemplateAliasParameter *isTemplateAliasParameter(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
123 #if DMDV2 |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
124 virtual TemplateThisParameter *isTemplateThisParameter(); |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
125 #endif |
159 | 126 virtual TemplateTupleParameter *isTemplateTupleParameter(); |
127 | |
128 virtual TemplateParameter *syntaxCopy() = 0; | |
129 virtual void declareParameter(Scope *sc) = 0; | |
130 virtual void semantic(Scope *) = 0; | |
131 virtual void print(Object *oarg, Object *oded) = 0; | |
132 virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs) = 0; | |
133 virtual Object *specialization() = 0; | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
134 virtual Object *defaultArg(Loc loc, Scope *sc) = 0; |
159 | 135 |
136 /* If TemplateParameter's match as far as overloading goes. | |
137 */ | |
138 virtual int overloadMatch(TemplateParameter *) = 0; | |
139 | |
140 /* Match actual argument against parameter. | |
141 */ | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
142 virtual MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags = 0) = 0; |
159 | 143 |
144 /* Create dummy argument based on parameter. | |
145 */ | |
146 virtual void *dummyArg() = 0; | |
147 }; | |
148 | |
149 struct TemplateTypeParameter : TemplateParameter | |
150 { | |
151 /* Syntax: | |
152 * ident : specType = defaultType | |
153 */ | |
154 Type *specType; // type parameter: if !=NULL, this is the type specialization | |
155 Type *defaultType; | |
156 | |
157 TemplateTypeParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); | |
158 | |
159 TemplateTypeParameter *isTemplateTypeParameter(); | |
160 TemplateParameter *syntaxCopy(); | |
161 void declareParameter(Scope *sc); | |
162 void semantic(Scope *); | |
163 void print(Object *oarg, Object *oded); | |
164 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
165 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
166 Object *defaultArg(Loc loc, Scope *sc); |
159 | 167 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
168 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 169 void *dummyArg(); |
170 }; | |
171 | |
336 | 172 #if DMDV2 |
173 struct TemplateThisParameter : TemplateTypeParameter | |
174 { | |
175 /* Syntax: | |
176 * this ident : specType = defaultType | |
177 */ | |
178 Type *specType; // type parameter: if !=NULL, this is the type specialization | |
179 Type *defaultType; | |
180 | |
181 TemplateThisParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); | |
182 | |
183 TemplateThisParameter *isTemplateThisParameter(); | |
184 TemplateParameter *syntaxCopy(); | |
185 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
186 }; | |
187 #endif | |
188 | |
159 | 189 struct TemplateValueParameter : TemplateParameter |
190 { | |
191 /* Syntax: | |
192 * valType ident : specValue = defaultValue | |
193 */ | |
194 | |
195 Type *valType; | |
196 Expression *specValue; | |
197 Expression *defaultValue; | |
198 | |
199 static Expression *edummy; | |
200 | |
201 TemplateValueParameter(Loc loc, Identifier *ident, Type *valType, Expression *specValue, Expression *defaultValue); | |
202 | |
203 TemplateValueParameter *isTemplateValueParameter(); | |
204 TemplateParameter *syntaxCopy(); | |
205 void declareParameter(Scope *sc); | |
206 void semantic(Scope *); | |
207 void print(Object *oarg, Object *oded); | |
208 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
209 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
210 Object *defaultArg(Loc loc, Scope *sc); |
159 | 211 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
212 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 213 void *dummyArg(); |
214 }; | |
215 | |
216 struct TemplateAliasParameter : TemplateParameter | |
217 { | |
218 /* Syntax: | |
219 * ident : specAlias = defaultAlias | |
220 */ | |
221 | |
222 Type *specAliasT; | |
223 Dsymbol *specAlias; | |
224 | |
225 Type *defaultAlias; | |
226 | |
227 static Dsymbol *sdummy; | |
228 | |
229 TemplateAliasParameter(Loc loc, Identifier *ident, Type *specAliasT, Type *defaultAlias); | |
230 | |
231 TemplateAliasParameter *isTemplateAliasParameter(); | |
232 TemplateParameter *syntaxCopy(); | |
233 void declareParameter(Scope *sc); | |
234 void semantic(Scope *); | |
235 void print(Object *oarg, Object *oded); | |
236 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
237 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
238 Object *defaultArg(Loc loc, Scope *sc); |
159 | 239 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
240 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 241 void *dummyArg(); |
242 }; | |
243 | |
244 struct TemplateTupleParameter : TemplateParameter | |
245 { | |
246 /* Syntax: | |
247 * ident ... | |
248 */ | |
249 | |
250 TemplateTupleParameter(Loc loc, Identifier *ident); | |
251 | |
252 TemplateTupleParameter *isTemplateTupleParameter(); | |
253 TemplateParameter *syntaxCopy(); | |
254 void declareParameter(Scope *sc); | |
255 void semantic(Scope *); | |
256 void print(Object *oarg, Object *oded); | |
257 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
258 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
259 Object *defaultArg(Loc loc, Scope *sc); |
159 | 260 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
261 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 262 void *dummyArg(); |
263 }; | |
264 | |
265 struct TemplateInstance : ScopeDsymbol | |
266 { | |
267 /* Given: | |
268 * foo!(args) => | |
269 * name = foo | |
270 * tiargs = args | |
271 */ | |
272 Identifier *name; | |
273 //Array idents; | |
274 Objects *tiargs; // Array of Types/Expressions of template | |
275 // instance arguments [int*, char, 10*10] | |
276 | |
277 Objects tdtypes; // Array of Types/Expressions corresponding | |
278 // to TemplateDeclaration.parameters | |
279 // [int, char, 100] | |
280 | |
281 TemplateDeclaration *tempdecl; // referenced by foo.bar.abc | |
282 TemplateInstance *inst; // refer to existing instance | |
283 ScopeDsymbol *argsym; // argument symbol table | |
284 AliasDeclaration *aliasdecl; // !=NULL if instance is an alias for its | |
285 // sole member | |
286 WithScopeSymbol *withsym; // if a member of a with statement | |
287 int semanticdone; // has semantic() been done? | |
336 | 288 int semantictiargsdone; // has semanticTiargs() been done? |
159 | 289 int nest; // for recursion detection |
290 int havetempdecl; // 1 if used second constructor | |
291 Dsymbol *isnested; // if referencing local symbols, this is the context | |
292 int errors; // 1 if compiled with errors | |
293 #ifdef IN_GCC | |
294 /* On some targets, it is necessary to know whether a symbol | |
295 will be emitted in the output or not before the symbol | |
296 is used. This can be different from getModule(). */ | |
297 Module * objFileModule; | |
298 #endif | |
299 | |
300 TemplateInstance(Loc loc, Identifier *temp_id); | |
301 TemplateInstance(Loc loc, TemplateDeclaration *tempdecl, Objects *tiargs); | |
302 static Objects *arraySyntaxCopy(Objects *objs); | |
303 Dsymbol *syntaxCopy(Dsymbol *); | |
304 void semantic(Scope *sc); | |
305 void semantic2(Scope *sc); | |
306 void semantic3(Scope *sc); | |
307 void inlineScan(); | |
308 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
309 Dsymbol *toAlias(); // resolve real symbol | |
336 | 310 const char *kind(); |
159 | 311 int oneMember(Dsymbol **ps); |
312 char *toChars(); | |
313 char *mangle(); | |
314 | |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
315 #if IN_DMD |
336 | 316 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
|
317 #endif |
159 | 318 |
319 // Internal | |
320 static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs); | |
321 void semanticTiargs(Scope *sc); | |
322 TemplateDeclaration *findTemplateDeclaration(Scope *sc); | |
323 TemplateDeclaration *findBestMatch(Scope *sc); | |
324 void declareParameters(Scope *sc); | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
325 int hasNestedArgs(Objects *tiargs); |
159 | 326 Identifier *genIdent(); |
327 | |
328 TemplateInstance *isTemplateInstance() { return this; } | |
329 AliasDeclaration *isAliasDeclaration(); | |
561
d4e95db0e62b
Introducing template instantiation traces for static asserts and errors within templates.
Christian Kamm <kamm incasoftware de>
parents:
527
diff
changeset
|
330 |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
331 #if IN_LLVM |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
561
diff
changeset
|
332 // LDC |
561
d4e95db0e62b
Introducing template instantiation traces for static asserts and errors within templates.
Christian Kamm <kamm incasoftware de>
parents:
527
diff
changeset
|
333 TemplateInstance *tinst; // enclosing template instance |
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
|
334 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
|
335 Module* emittedInModule; // which module this template instance has been emitted in |
561
d4e95db0e62b
Introducing template instantiation traces for static asserts and errors within templates.
Christian Kamm <kamm incasoftware de>
parents:
527
diff
changeset
|
336 void printInstantiationTrace(); |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
337 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
338 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
|
339 #endif |
159 | 340 }; |
341 | |
342 struct TemplateMixin : TemplateInstance | |
343 { | |
344 Array *idents; | |
345 Type *tqual; | |
346 | |
347 Scope *scope; // for forward referencing | |
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 */ |