comparison dmd/statement.h @ 108:288fe1029e1f trunk

[svn r112] Fixed 'case 1,2,3:' style case statements. Fixed a bunch of bugs with return/break/continue in loops. Fixed support for the DMDFE hidden implicit return value variable. This can be needed for some foreach statements where the loop body is converted to a nested delegate, but also possibly returns from the function. Added std.math to phobos. Added AA runtime support code, done ground work for implementing AAs. Several other bugfixes.
author lindquist
date Tue, 20 Nov 2007 05:29:20 +0100
parents fd32135dca3e
children a27941d00351
comparison
equal deleted inserted replaced
107:3efbcc81ba45 108:288fe1029e1f
44 struct GotoStatement; 44 struct GotoStatement;
45 struct ScopeStatement; 45 struct ScopeStatement;
46 struct TryCatchStatement; 46 struct TryCatchStatement;
47 struct HdrGenState; 47 struct HdrGenState;
48 struct InterState; 48 struct InterState;
49 struct CaseStatement;
49 50
50 enum TOK; 51 enum TOK;
51 52
52 namespace llvm 53 namespace llvm
53 { 54 {
112 // Avoid dynamic_cast 113 // Avoid dynamic_cast
113 virtual DeclarationStatement *isDeclarationStatement() { return NULL; } 114 virtual DeclarationStatement *isDeclarationStatement() { return NULL; }
114 virtual CompoundStatement *isCompoundStatement() { return NULL; } 115 virtual CompoundStatement *isCompoundStatement() { return NULL; }
115 virtual ReturnStatement *isReturnStatement() { return NULL; } 116 virtual ReturnStatement *isReturnStatement() { return NULL; }
116 virtual IfStatement *isIfStatement() { return NULL; } 117 virtual IfStatement *isIfStatement() { return NULL; }
118 virtual CaseStatement* isCaseStatement() { return NULL; }
117 }; 119 };
118 120
119 struct ExpStatement : Statement 121 struct ExpStatement : Statement
120 { 122 {
121 Expression *exp; 123 Expression *exp;
434 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 436 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
435 437
436 Statement *inlineScan(InlineScanState *iss); 438 Statement *inlineScan(InlineScanState *iss);
437 439
438 void toIR(IRState *irs); 440 void toIR(IRState *irs);
441
442 CaseStatement* isCaseStatement() { return this; }
439 }; 443 };
440 444
441 struct DefaultStatement : Statement 445 struct DefaultStatement : Statement
442 { 446 {
443 Statement *statement; 447 Statement *statement;