changeset 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 630fc54f7c1e
children 7b6f066ba869
files dmd2/func.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dmd2/func.c	Wed Jun 03 12:32:35 2009 +0200
+++ b/dmd2/func.c	Wed Jun 03 13:11:01 2009 +0200
@@ -1052,8 +1052,11 @@
 		}
 		else
 		{   // Call invariant virtually
-		    Expression *v = new ThisExp(0);
-		    v->type = vthis->type;
+                    ThisExp *tv = new ThisExp(0);
+		    tv->type = vthis->type;
+                    tv->var = vthis;
+                    Expression* v = tv;
+
 #if STRUCTTHISREF
 		    if (ad->isStructDeclaration())
 			v = v->addressOf(sc);
@@ -1321,8 +1324,11 @@
 		}
 		else
 		{   // Call invariant virtually
-		    Expression *v = new ThisExp(0);
-		    v->type = vthis->type;
+		    ThisExp* tv = new ThisExp(0);
+		    tv->type = vthis->type;
+                    tv->var = vthis;
+                    Expression *v = tv;
+
 #if STRUCTTHISREF
 		    if (ad->isStructDeclaration())
 			v = v->addressOf(sc);