Mercurial > projects > ldc
comparison dmd/expression.h @ 599:4435f57956e7
Fixed .funcptr property of delegates, no longer uses the infamous DMD rewrites to pointer arithmetic, instead a GEPExp has been introduced.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 15 Sep 2008 02:04:26 +0200 |
parents | 870652a9af23 |
children | 722630261d62 |
comparison
equal
deleted
inserted
replaced
598:13ff06605226 | 599:4435f57956e7 |
---|---|
1494 }; | 1494 }; |
1495 #endif | 1495 #endif |
1496 | 1496 |
1497 /****************************************************************/ | 1497 /****************************************************************/ |
1498 | 1498 |
1499 #if IN_LLVM | |
1500 | |
1501 // this stuff is strictly LLVMDC | |
1502 | |
1503 struct GEPExp : UnaExp | |
1504 { | |
1505 unsigned index; | |
1506 Identifier* ident; | |
1507 | |
1508 GEPExp(Loc loc, Expression* e, Identifier* id, unsigned idx); | |
1509 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | |
1510 Expression *toLvalue(Scope *sc, Expression *e); | |
1511 | |
1512 elem *toElem(IRState *irs); | |
1513 }; | |
1514 | |
1515 #endif | |
1516 | |
1517 /****************************************************************/ | |
1518 | |
1499 /* Special values used by the interpreter | 1519 /* Special values used by the interpreter |
1500 */ | 1520 */ |
1501 #define EXP_CANT_INTERPRET ((Expression *)1) | 1521 #define EXP_CANT_INTERPRET ((Expression *)1) |
1502 #define EXP_CONTINUE_INTERPRET ((Expression *)2) | 1522 #define EXP_CONTINUE_INTERPRET ((Expression *)2) |
1503 #define EXP_BREAK_INTERPRET ((Expression *)3) | 1523 #define EXP_BREAK_INTERPRET ((Expression *)3) |