Mercurial > projects > ldc
comparison gen/toir.cpp @ 1326:a41a40deff73
Fixed dmdfe generated class invariant calls. Also insert proper "this !is null" check before it. Fixed invariant* dstress regressions and generally seems like a good idea. Hope I didn't break anything.. minitests run fine!
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Sun, 10 May 2009 00:46:09 +0200 |
parents | ad41053c336e |
children | 15e9762bb620 |
comparison
equal
deleted
inserted
replaced
1325:5a9dc345c70a | 1326:a41a40deff73 |
---|---|
1751 if (e1->op == TOKthis && ((ThisExp*)e1)->var == NULL) | 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 condty = e1->type->toBasetype(); |
1757 cond = new DImValue(Type::tbool, thisnotnull); | 1757 cond = new DImValue(condty, thisptr); |
1758 condty = Type::tbool; | |
1759 } | 1758 } |
1760 else | 1759 else |
1761 { | 1760 { |
1762 cond = e1->toElem(p); | 1761 cond = e1->toElem(p); |
1763 condty = e1->type->toBasetype(); | 1762 condty = e1->type->toBasetype(); |