Mercurial > projects > ldc
comparison gen/toir.cpp @ 1272:dd4766851b37
Forgot the special case part in last !ThisExp change.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Mon, 27 Apr 2009 13:59:15 +0200 |
parents | 0686701178d3 |
children | ad41053c336e |
comparison
equal
deleted
inserted
replaced
1271:0686701178d3 | 1272:dd4766851b37 |
---|---|
1745 | 1745 |
1746 // condition | 1746 // condition |
1747 DValue* cond; | 1747 DValue* cond; |
1748 Type* condty; | 1748 Type* condty; |
1749 | 1749 |
1750 // special case assert(this); | 1750 // special case for dmd generated assert(this); when not in -release mode |
1751 if (e1->op == TOKthis) | 1751 if (e1->op == TOKthis && ((ThisExp*)e1)->var == NULL) |
1752 { | 1752 { |
1753 LLValue* thisarg = p->func()->thisArg; | 1753 LLValue* thisarg = p->func()->thisArg; |
1754 assert(thisarg && "null thisarg, but we're in assert(this) exp;"); | 1754 assert(thisarg && "null thisarg, but we're in assert(this) exp;"); |
1755 LLValue* thisptr = DtoLoad(p->func()->thisArg); | 1755 LLValue* thisptr = DtoLoad(p->func()->thisArg); |
1756 LLValue* thisnotnull = p->ir->CreateIsNotNull(thisptr); | 1756 LLValue* thisnotnull = p->ir->CreateIsNotNull(thisptr); |