comparison dmd2/func.c @ 1468:7d1e815b4f76

Change the frontend generated assert(this) or assert(&this) in D2 to set the ThisExp::var field.
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Wed, 03 Jun 2009 13:11:01 +0200
parents 638d16625da2
children f62347c22d81
comparison
equal deleted inserted replaced
1467:630fc54f7c1e 1468:7d1e815b4f76
1050 e = e->semantic(sc2); 1050 e = e->semantic(sc2);
1051 } 1051 }
1052 } 1052 }
1053 else 1053 else
1054 { // Call invariant virtually 1054 { // Call invariant virtually
1055 Expression *v = new ThisExp(0); 1055 ThisExp *tv = new ThisExp(0);
1056 v->type = vthis->type; 1056 tv->type = vthis->type;
1057 tv->var = vthis;
1058 Expression* v = tv;
1059
1057 #if STRUCTTHISREF 1060 #if STRUCTTHISREF
1058 if (ad->isStructDeclaration()) 1061 if (ad->isStructDeclaration())
1059 v = v->addressOf(sc); 1062 v = v->addressOf(sc);
1060 #endif 1063 #endif
1061 e = new AssertExp(0, v); 1064 e = new AssertExp(0, v);
1319 e = e->semantic(sc2); 1322 e = e->semantic(sc2);
1320 } 1323 }
1321 } 1324 }
1322 else 1325 else
1323 { // Call invariant virtually 1326 { // Call invariant virtually
1324 Expression *v = new ThisExp(0); 1327 ThisExp* tv = new ThisExp(0);
1325 v->type = vthis->type; 1328 tv->type = vthis->type;
1329 tv->var = vthis;
1330 Expression *v = tv;
1331
1326 #if STRUCTTHISREF 1332 #if STRUCTTHISREF
1327 if (ad->isStructDeclaration()) 1333 if (ad->isStructDeclaration())
1328 v = v->addressOf(sc); 1334 v = v->addressOf(sc);
1329 #endif 1335 #endif
1330 #if IN_LLVM 1336 #if IN_LLVM