comparison dmd/statement.h @ 945:03d7c4aac654

SWITCHED TO LLVM 2.5 ! Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel. Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple. Fixed return calling convention for complex numbers, ST and ST(1) were switched around. Added some testcases. I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 08 Feb 2009 05:26:54 +0100
parents 545f54041d91
children b30fe7e1dbb9
comparison
equal deleted inserted replaced
944:eb310635d80e 945:03d7c4aac654
159 virtual Statement *inlineScan(InlineScanState *iss); 159 virtual Statement *inlineScan(InlineScanState *iss);
160 160
161 // Back end 161 // Back end
162 virtual void toIR(IRState *irs); 162 virtual void toIR(IRState *irs);
163 163
164 // LDC
165 virtual void toNakedIR(IRState *irs);
166
167 // Avoid dynamic_cast 164 // Avoid dynamic_cast
168 virtual DeclarationStatement *isDeclarationStatement() { return NULL; } 165 virtual DeclarationStatement *isDeclarationStatement() { return NULL; }
169 virtual CompoundStatement *isCompoundStatement() { return NULL; } 166 virtual CompoundStatement *isCompoundStatement() { return NULL; }
170 virtual ReturnStatement *isReturnStatement() { return NULL; } 167 virtual ReturnStatement *isReturnStatement() { return NULL; }
171 virtual IfStatement *isIfStatement() { return NULL; } 168 virtual IfStatement *isIfStatement() { return NULL; }
172 virtual CaseStatement* isCaseStatement() { return NULL; } 169 virtual CaseStatement* isCaseStatement() { return NULL; }
170
171 // LDC
172 virtual void toNakedIR(IRState *irs);
173 virtual AsmBlockStatement* endsWithAsm();
173 }; 174 };
174 175
175 struct ExpStatement : Statement 176 struct ExpStatement : Statement
176 { 177 {
177 Expression *exp; 178 Expression *exp;
240 241
241 virtual void toIR(IRState *irs); 242 virtual void toIR(IRState *irs);
242 243
243 // LDC 244 // LDC
244 virtual void toNakedIR(IRState *irs); 245 virtual void toNakedIR(IRState *irs);
246 virtual AsmBlockStatement* endsWithAsm();
245 247
246 virtual CompoundStatement *isCompoundStatement() { return this; } 248 virtual CompoundStatement *isCompoundStatement() { return this; }
247 }; 249 };
248 250
249 /* The purpose of this is so that continue will go to the next 251 /* The purpose of this is so that continue will go to the next
903 CompoundStatement *isCompoundStatement() { return NULL; } 905 CompoundStatement *isCompoundStatement() { return NULL; }
904 AsmBlockStatement *isAsmBlockStatement() { return this; } 906 AsmBlockStatement *isAsmBlockStatement() { return this; }
905 907
906 void toIR(IRState *irs); 908 void toIR(IRState *irs);
907 void toNakedIR(IRState *irs); 909 void toNakedIR(IRState *irs);
910 AsmBlockStatement* endsWithAsm();
911
912 llvm::Value* abiret;
908 }; 913 };
909 914
910 #endif /* DMD_STATEMENT_H */ 915 #endif /* DMD_STATEMENT_H */