diff 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
line wrap: on
line diff
--- a/gen/toir.cpp	Sat May 09 20:13:05 2009 +0200
+++ b/gen/toir.cpp	Sun May 10 00:46:09 2009 +0200
@@ -1753,9 +1753,8 @@
         LLValue* thisarg = p->func()->thisArg;
         assert(thisarg && "null thisarg, but we're in assert(this) exp;");
         LLValue* thisptr = DtoLoad(p->func()->thisArg);
-        LLValue* thisnotnull = p->ir->CreateIsNotNull(thisptr);
-        cond = new DImValue(Type::tbool, thisnotnull);
-        condty = Type::tbool;
+        condty = e1->type->toBasetype();
+        cond = new DImValue(condty, thisptr);
     }
     else
     {