Mercurial > projects > ldc
annotate dmd/template.h @ 1351:8d501abecd24
Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Thu, 14 May 2009 17:20:17 +0200 |
parents | e961851fb8be |
children | 8026319762be |
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 | |
63 Scope *scope; | |
64 Dsymbol *onemember; // if !=NULL then one member of this template | |
65 | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
66 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
|
67 Expression *constraint, Array *decldefs); |
159 | 68 Dsymbol *syntaxCopy(Dsymbol *); |
69 void semantic(Scope *sc); | |
70 int overloadInsert(Dsymbol *s); | |
71 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
336 | 72 const char *kind(); |
159 | 73 char *toChars(); |
74 | |
75 void emitComment(Scope *sc); | |
76 // void toDocBuffer(OutBuffer *buf); | |
77 | |
78 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
|
79 MATCH leastAsSpecialized(TemplateDeclaration *td2); |
159 | 80 |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
81 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
|
82 FuncDeclaration *deduceFunctionTemplate(Scope *sc, Loc loc, Objects *targsi, Expression *ethis, Expressions *fargs, int flags = 0); |
159 | 83 void declareParameter(Scope *sc, TemplateParameter *tp, Object *o); |
84 | |
85 TemplateDeclaration *isTemplateDeclaration() { return this; } | |
86 | |
87 TemplateTupleParameter *isVariadic(); | |
88 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
|
89 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
90 #if IN_LLVM |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
561
diff
changeset
|
91 // LDC |
527
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
336
diff
changeset
|
92 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
|
93 #endif |
159 | 94 }; |
95 | |
96 struct TemplateParameter | |
97 { | |
98 /* For type-parameter: | |
99 * template Foo(ident) // specType is set to NULL | |
100 * template Foo(ident : specType) | |
101 * For value-parameter: | |
102 * template Foo(valType ident) // specValue is set to NULL | |
103 * template Foo(valType ident : specValue) | |
104 * For alias-parameter: | |
105 * template Foo(alias ident) | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
106 * For this-parameter: |
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
107 * template Foo(this ident) |
159 | 108 */ |
109 | |
110 Loc loc; | |
111 Identifier *ident; | |
112 | |
113 Declaration *sparam; | |
114 | |
115 TemplateParameter(Loc loc, Identifier *ident); | |
116 | |
117 virtual TemplateTypeParameter *isTemplateTypeParameter(); | |
118 virtual TemplateValueParameter *isTemplateValueParameter(); | |
119 virtual TemplateAliasParameter *isTemplateAliasParameter(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
120 #if DMDV2 |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
121 virtual TemplateThisParameter *isTemplateThisParameter(); |
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
122 #endif |
159 | 123 virtual TemplateTupleParameter *isTemplateTupleParameter(); |
124 | |
125 virtual TemplateParameter *syntaxCopy() = 0; | |
126 virtual void declareParameter(Scope *sc) = 0; | |
127 virtual void semantic(Scope *) = 0; | |
128 virtual void print(Object *oarg, Object *oded) = 0; | |
129 virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs) = 0; | |
130 virtual Object *specialization() = 0; | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
131 virtual Object *defaultArg(Loc loc, Scope *sc) = 0; |
159 | 132 |
133 /* If TemplateParameter's match as far as overloading goes. | |
134 */ | |
135 virtual int overloadMatch(TemplateParameter *) = 0; | |
136 | |
137 /* Match actual argument against parameter. | |
138 */ | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
139 virtual MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags = 0) = 0; |
159 | 140 |
141 /* Create dummy argument based on parameter. | |
142 */ | |
143 virtual void *dummyArg() = 0; | |
144 }; | |
145 | |
146 struct TemplateTypeParameter : TemplateParameter | |
147 { | |
148 /* Syntax: | |
149 * ident : specType = defaultType | |
150 */ | |
151 Type *specType; // type parameter: if !=NULL, this is the type specialization | |
152 Type *defaultType; | |
153 | |
154 TemplateTypeParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); | |
155 | |
156 TemplateTypeParameter *isTemplateTypeParameter(); | |
157 TemplateParameter *syntaxCopy(); | |
158 void declareParameter(Scope *sc); | |
159 void semantic(Scope *); | |
160 void print(Object *oarg, Object *oded); | |
161 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
162 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
163 Object *defaultArg(Loc loc, Scope *sc); |
159 | 164 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
165 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 166 void *dummyArg(); |
167 }; | |
168 | |
336 | 169 #if DMDV2 |
170 struct TemplateThisParameter : TemplateTypeParameter | |
171 { | |
172 /* Syntax: | |
173 * this ident : specType = defaultType | |
174 */ | |
175 Type *specType; // type parameter: if !=NULL, this is the type specialization | |
176 Type *defaultType; | |
177 | |
178 TemplateThisParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); | |
179 | |
180 TemplateThisParameter *isTemplateThisParameter(); | |
181 TemplateParameter *syntaxCopy(); | |
182 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
183 }; | |
184 #endif | |
185 | |
159 | 186 struct TemplateValueParameter : TemplateParameter |
187 { | |
188 /* Syntax: | |
189 * valType ident : specValue = defaultValue | |
190 */ | |
191 | |
192 Type *valType; | |
193 Expression *specValue; | |
194 Expression *defaultValue; | |
195 | |
196 static Expression *edummy; | |
197 | |
198 TemplateValueParameter(Loc loc, Identifier *ident, Type *valType, Expression *specValue, Expression *defaultValue); | |
199 | |
200 TemplateValueParameter *isTemplateValueParameter(); | |
201 TemplateParameter *syntaxCopy(); | |
202 void declareParameter(Scope *sc); | |
203 void semantic(Scope *); | |
204 void print(Object *oarg, Object *oded); | |
205 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
206 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
207 Object *defaultArg(Loc loc, Scope *sc); |
159 | 208 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
209 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 210 void *dummyArg(); |
211 }; | |
212 | |
213 struct TemplateAliasParameter : TemplateParameter | |
214 { | |
215 /* Syntax: | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
216 * specType ident : specAlias = defaultAlias |
159 | 217 */ |
218 | |
219 Type *specAliasT; | |
220 Dsymbol *specAlias; | |
221 | |
222 Type *defaultAlias; | |
223 | |
224 static Dsymbol *sdummy; | |
225 | |
226 TemplateAliasParameter(Loc loc, Identifier *ident, Type *specAliasT, Type *defaultAlias); | |
227 | |
228 TemplateAliasParameter *isTemplateAliasParameter(); | |
229 TemplateParameter *syntaxCopy(); | |
230 void declareParameter(Scope *sc); | |
231 void semantic(Scope *); | |
232 void print(Object *oarg, Object *oded); | |
233 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
234 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
235 Object *defaultArg(Loc loc, Scope *sc); |
159 | 236 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
237 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 238 void *dummyArg(); |
239 }; | |
240 | |
241 struct TemplateTupleParameter : TemplateParameter | |
242 { | |
243 /* Syntax: | |
244 * ident ... | |
245 */ | |
246 | |
247 TemplateTupleParameter(Loc loc, Identifier *ident); | |
248 | |
249 TemplateTupleParameter *isTemplateTupleParameter(); | |
250 TemplateParameter *syntaxCopy(); | |
251 void declareParameter(Scope *sc); | |
252 void semantic(Scope *); | |
253 void print(Object *oarg, Object *oded); | |
254 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
255 Object *specialization(); | |
875
330f999ade44
Merged DMD 1.038
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
664
diff
changeset
|
256 Object *defaultArg(Loc loc, Scope *sc); |
159 | 257 int overloadMatch(TemplateParameter *); |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
258 MATCH matchArg(Scope *sc, Objects *tiargs, int i, TemplateParameters *parameters, Objects *dedtypes, Declaration **psparam, int flags); |
159 | 259 void *dummyArg(); |
260 }; | |
261 | |
262 struct TemplateInstance : ScopeDsymbol | |
263 { | |
264 /* Given: | |
265 * foo!(args) => | |
266 * name = foo | |
267 * tiargs = args | |
268 */ | |
269 Identifier *name; | |
270 //Array idents; | |
271 Objects *tiargs; // Array of Types/Expressions of template | |
272 // instance arguments [int*, char, 10*10] | |
273 | |
274 Objects tdtypes; // Array of Types/Expressions corresponding | |
275 // to TemplateDeclaration.parameters | |
276 // [int, char, 100] | |
277 | |
278 TemplateDeclaration *tempdecl; // referenced by foo.bar.abc | |
279 TemplateInstance *inst; // refer to existing instance | |
280 ScopeDsymbol *argsym; // argument symbol table | |
281 AliasDeclaration *aliasdecl; // !=NULL if instance is an alias for its | |
282 // sole member | |
283 WithScopeSymbol *withsym; // if a member of a with statement | |
284 int semanticdone; // has semantic() been done? | |
336 | 285 int semantictiargsdone; // has semanticTiargs() been done? |
159 | 286 int nest; // for recursion detection |
287 int havetempdecl; // 1 if used second constructor | |
288 Dsymbol *isnested; // if referencing local symbols, this is the context | |
289 int errors; // 1 if compiled with errors | |
290 #ifdef IN_GCC | |
291 /* On some targets, it is necessary to know whether a symbol | |
292 will be emitted in the output or not before the symbol | |
293 is used. This can be different from getModule(). */ | |
294 Module * objFileModule; | |
295 #endif | |
296 | |
297 TemplateInstance(Loc loc, Identifier *temp_id); | |
298 TemplateInstance(Loc loc, TemplateDeclaration *tempdecl, Objects *tiargs); | |
299 static Objects *arraySyntaxCopy(Objects *objs); | |
300 Dsymbol *syntaxCopy(Dsymbol *); | |
301 void semantic(Scope *sc); | |
302 void semantic2(Scope *sc); | |
303 void semantic3(Scope *sc); | |
304 void inlineScan(); | |
305 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
306 Dsymbol *toAlias(); // resolve real symbol | |
336 | 307 const char *kind(); |
159 | 308 int oneMember(Dsymbol **ps); |
309 char *toChars(); | |
310 char *mangle(); | |
311 | |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
312 #if IN_DMD |
336 | 313 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
|
314 #endif |
159 | 315 |
316 // Internal | |
1195
e961851fb8be
Merged DMD 1.042.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1174
diff
changeset
|
317 static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs, int flags); |
159 | 318 void semanticTiargs(Scope *sc); |
319 TemplateDeclaration *findTemplateDeclaration(Scope *sc); | |
320 TemplateDeclaration *findBestMatch(Scope *sc); | |
321 void declareParameters(Scope *sc); | |
1103
b30fe7e1dbb9
- Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1067
diff
changeset
|
322 int hasNestedArgs(Objects *tiargs); |
159 | 323 Identifier *genIdent(); |
324 | |
325 TemplateInstance *isTemplateInstance() { return this; } | |
326 AliasDeclaration *isAliasDeclaration(); | |
561
d4e95db0e62b
Introducing template instantiation traces for static asserts and errors within templates.
Christian Kamm <kamm incasoftware de>
parents:
527
diff
changeset
|
327 |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
328 #if IN_LLVM |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
561
diff
changeset
|
329 // LDC |
561
d4e95db0e62b
Introducing template instantiation traces for static asserts and errors within templates.
Christian Kamm <kamm incasoftware de>
parents:
527
diff
changeset
|
330 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
|
331 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
|
332 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
|
333 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
|
334 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
335 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
|
336 #endif |
159 | 337 }; |
338 | |
339 struct TemplateMixin : TemplateInstance | |
340 { | |
341 Array *idents; | |
342 Type *tqual; | |
343 | |
344 Scope *scope; // for forward referencing | |
345 | |
346 TemplateMixin(Loc loc, Identifier *ident, Type *tqual, Array *idents, Objects *tiargs); | |
347 Dsymbol *syntaxCopy(Dsymbol *s); | |
348 void semantic(Scope *sc); | |
349 void semantic2(Scope *sc); | |
350 void semantic3(Scope *sc); | |
351 void inlineScan(); | |
336 | 352 const char *kind(); |
159 | 353 int oneMember(Dsymbol **ps); |
354 int hasPointers(); | |
355 char *toChars(); | |
321 | 356 char *mangle(); |
159 | 357 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
358 | |
1147
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
359 #if IN_DMD |
336 | 360 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
|
361 #endif |
159 | 362 |
363 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
|
364 |
dbe4af57b240
Changed use of toObjFile to a new codegen method.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1103
diff
changeset
|
365 #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
|
366 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
|
367 #endif |
159 | 368 }; |
369 | |
370 Expression *isExpression(Object *o); | |
371 Dsymbol *isDsymbol(Object *o); | |
372 Type *isType(Object *o); | |
373 Tuple *isTuple(Object *o); | |
374 Type *getType(Object *o); | |
375 Dsymbol *getDsymbol(Object *o); | |
376 | |
377 void ObjectToCBuffer(OutBuffer *buf, HdrGenState *hgs, Object *oarg); | |
378 | |
379 #endif /* DMD_TEMPLATE_H */ | |
1174
0b26cfb2d445
Add newlines to end of file.
Christian Kamm <kamm incasoftware de>
parents:
1147
diff
changeset
|
380 |