comparison dmd/aggregate.h @ 1147:dbe4af57b240

Changed use of toObjFile to a new codegen method. More versioning of DMD specific codegen code.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Fri, 27 Mar 2009 17:54:27 +0100
parents 1860414bf3b7
children 8026319762be
comparison
equal deleted inserted replaced
1146:1860414bf3b7 1147:dbe4af57b240
138 Expression *cloneMembers(); 138 Expression *cloneMembers();
139 void toDocBuffer(OutBuffer *buf); 139 void toDocBuffer(OutBuffer *buf);
140 140
141 PROT getAccess(Dsymbol *smember); // determine access to smember 141 PROT getAccess(Dsymbol *smember); // determine access to smember
142 142
143 #if IN_DMD
143 void toObjFile(int multiobj); // compile to .obj file 144 void toObjFile(int multiobj); // compile to .obj file
144 void toDt(dt_t **pdt); 145 void toDt(dt_t **pdt);
145 void toDebug(); // to symbolic debug info 146 void toDebug(); // to symbolic debug info
147 #endif
146 148
147 StructDeclaration *isStructDeclaration() { return this; } 149 StructDeclaration *isStructDeclaration() { return this; }
150
151 #if IN_LLVM
152 void codegen(Ir*);
153 #endif
148 }; 154 };
149 155
150 struct UnionDeclaration : StructDeclaration 156 struct UnionDeclaration : StructDeclaration
151 { 157 {
152 UnionDeclaration(Loc loc, Identifier *id); 158 UnionDeclaration(Loc loc, Identifier *id);
248 254
249 PROT getAccess(Dsymbol *smember); // determine access to smember 255 PROT getAccess(Dsymbol *smember); // determine access to smember
250 256
251 void addLocalClass(ClassDeclarations *); 257 void addLocalClass(ClassDeclarations *);
252 258
259 #if IN_DMD
253 // Back end 260 // Back end
254 void toObjFile(int multiobj); // compile to .obj file 261 void toObjFile(int multiobj); // compile to .obj file
255 #if IN_DMD
256 void toDebug(); 262 void toDebug();
257 unsigned baseVtblOffset(BaseClass *bc); 263 unsigned baseVtblOffset(BaseClass *bc);
258 Symbol *toSymbol(); 264 Symbol *toSymbol();
259 Symbol *toVtblSymbol(); 265 Symbol *toVtblSymbol();
260 void toDt(dt_t **pdt); 266 void toDt(dt_t **pdt);
262 268
263 Symbol *vtblsym; 269 Symbol *vtblsym;
264 #endif 270 #endif
265 271
266 ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; } 272 ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
273
274 #if IN_LLVM
275 virtual void codegen(Ir*);
276 #endif
267 }; 277 };
268 278
269 struct InterfaceDeclaration : ClassDeclaration 279 struct InterfaceDeclaration : ClassDeclaration
270 { 280 {
271 #if DMDV2 281 #if DMDV2
281 #if DMDV2 291 #if DMDV2
282 int isCPPinterface(); 292 int isCPPinterface();
283 #endif 293 #endif
284 virtual int isCOMinterface(); 294 virtual int isCOMinterface();
285 295
296 #if IN_DMD
286 void toObjFile(int multiobj); // compile to .obj file 297 void toObjFile(int multiobj); // compile to .obj file
287 #if IN_DMD
288 Symbol *toSymbol(); 298 Symbol *toSymbol();
289 #endif 299 #endif
290 300
291 InterfaceDeclaration *isInterfaceDeclaration() { return this; } 301 InterfaceDeclaration *isInterfaceDeclaration() { return this; }
302
303 #if IN_LLVM
304 void codegen(Ir*);
305 #endif
292 }; 306 };
293 307
294 #endif /* DMD_AGGREGATE_H */ 308 #endif /* DMD_AGGREGATE_H */