Mercurial > projects > ldc
comparison gen/statements.cpp @ 831:7e59caf41433
Fix with(symbol) statement.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 07 Dec 2008 16:02:43 +0100 |
parents | 340acf1535d0 |
children | 330f999ade44 |
comparison
equal
deleted
inserted
replaced
830:504a21e81a46 | 831:7e59caf41433 |
---|---|
1298 DtoDwarfStopPoint(loc.linnum); | 1298 DtoDwarfStopPoint(loc.linnum); |
1299 | 1299 |
1300 assert(exp); | 1300 assert(exp); |
1301 assert(body); | 1301 assert(body); |
1302 | 1302 |
1303 DValue* e = exp->toElem(p); | 1303 // with(..) can either be used with expressions or with symbols |
1304 LLValue* mem = DtoRawVarDeclaration(wthis); | 1304 // wthis == null indicates the symbol form |
1305 DtoStore(e->getRVal(), mem); | 1305 if (wthis) { |
1306 DValue* e = exp->toElem(p); | |
1307 LLValue* mem = DtoRawVarDeclaration(wthis); | |
1308 DtoStore(e->getRVal(), mem); | |
1309 } | |
1306 | 1310 |
1307 body->toIR(p); | 1311 body->toIR(p); |
1308 } | 1312 } |
1309 | 1313 |
1310 ////////////////////////////////////////////////////////////////////////////// | 1314 ////////////////////////////////////////////////////////////////////////////// |