comparison dmd2/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 0749c0757a43
children 638d16625da2
comparison
equal deleted inserted replaced
944:eb310635d80e 945:03d7c4aac654
160 virtual Statement *inlineScan(InlineScanState *iss); 160 virtual Statement *inlineScan(InlineScanState *iss);
161 161
162 // Back end 162 // Back end
163 virtual void toIR(IRState *irs); 163 virtual void toIR(IRState *irs);
164 164
165 // LDC
166 virtual void toNakedIR(IRState *irs);
167
168 // Avoid dynamic_cast 165 // Avoid dynamic_cast
169 virtual DeclarationStatement *isDeclarationStatement() { return NULL; } 166 virtual DeclarationStatement *isDeclarationStatement() { return NULL; }
170 virtual CompoundStatement *isCompoundStatement() { return NULL; } 167 virtual CompoundStatement *isCompoundStatement() { return NULL; }
171 virtual ReturnStatement *isReturnStatement() { return NULL; } 168 virtual ReturnStatement *isReturnStatement() { return NULL; }
172 virtual IfStatement *isIfStatement() { return NULL; } 169 virtual IfStatement *isIfStatement() { return NULL; }
173 virtual CaseStatement* isCaseStatement() { return NULL; } 170 virtual CaseStatement* isCaseStatement() { return NULL; }
171
172 // LDC
173 virtual void toNakedIR(IRState *irs);
174 virtual AsmBlockStatement* endsWithAsm();
174 }; 175 };
175 176
176 struct ExpStatement : Statement 177 struct ExpStatement : Statement
177 { 178 {
178 Expression *exp; 179 Expression *exp;
243 244
244 virtual void toIR(IRState *irs); 245 virtual void toIR(IRState *irs);
245 246
246 // LDC 247 // LDC
247 virtual void toNakedIR(IRState *irs); 248 virtual void toNakedIR(IRState *irs);
249 virtual AsmBlockStatement* endsWithAsm();
248 250
249 virtual CompoundStatement *isCompoundStatement() { return this; } 251 virtual CompoundStatement *isCompoundStatement() { return this; }
250 }; 252 };
251 253
252 /* The purpose of this is so that continue will go to the next 254 /* The purpose of this is so that continue will go to the next
939 CompoundStatement *isCompoundStatement() { return NULL; } 941 CompoundStatement *isCompoundStatement() { return NULL; }
940 AsmBlockStatement *isAsmBlockStatement() { return this; } 942 AsmBlockStatement *isAsmBlockStatement() { return this; }
941 943
942 void toIR(IRState *irs); 944 void toIR(IRState *irs);
943 virtual void toNakedIR(IRState *irs); 945 virtual void toNakedIR(IRState *irs);
946 AsmBlockStatement* endsWithAsm();
947
948 llvm::Value* abiret;
944 }; 949 };
945 950
946 #endif /* DMD_STATEMENT_H */ 951 #endif /* DMD_STATEMENT_H */