diff dmd/ClassDeclaration.d @ 179:cd48cb899aee

Updated to dmd2.040
author korDen
date Sun, 17 Oct 2010 20:56:07 +0400
parents e3afd1303184
children b0d41ff5e0df
line wrap: on
line diff
--- a/dmd/ClassDeclaration.d	Sun Oct 17 07:42:00 2010 +0400
+++ b/dmd/ClassDeclaration.d	Sun Oct 17 20:56:07 2010 +0400
@@ -363,10 +363,12 @@
 
 		Scope scx = null;
 		if (scope_)
-		{	sc = scope_;
+		{	
+			sc = scope_;
 			scx = scope_;		// save so we don't make redundant copies
-		scope_ = null;
+			scope_ = null;
 		}
+	    uint dprogress_save = global.dprogress;
 version (IN_GCC) {
 		methods.setDim(0);
 }
@@ -728,21 +730,24 @@
 		}
 
 		if (sizeok == 2)
-		{	// semantic() failed because of forward references.
-		// Unwind what we did, and defer it for later
-		fields.setDim(0);
-		structsize = 0;
-		alignsize = 0;
-		structalign = 0;
+		{	
+			// semantic() failed because of forward references.
+			// Unwind what we did, and defer it for later
+			fields.setDim(0);
+			structsize = 0;
+			alignsize = 0;
+			structalign = 0;
 
-		sc = sc.pop();
+			sc = sc.pop();
 
-		scope_ = scx ? scx : sc.clone();
-		scope_.setNoFree();
-		scope_.module_.addDeferredSemantic(this);
+			scope_ = scx ? scx : sc.clone();
+			scope_.setNoFree();
+			scope_.module_.addDeferredSemantic(this);
+			
+			global.dprogress = dprogress_save;
 
-		//printf("\tsemantic('%s') failed due to forward references\n", toChars());
-		return;
+			//printf("\tsemantic('%s') failed due to forward references\n", toChars());
+			return;
 		}
 
 		//printf("\tsemantic('%s') successful\n", toChars());
@@ -755,7 +760,7 @@
 		 */
 		ctor = cast(CtorDeclaration)search(Loc(0), Id.ctor, 0);
 		if (ctor && (ctor.toParent() != this || !ctor.isCtorDeclaration()))
-		ctor = null;
+			ctor = null;
 
 	//    dtor = (DtorDeclaration *)search(Id.dtor, 0);
 	//    if (dtor && dtor.toParent() != this)
@@ -774,24 +779,25 @@
 		//    this() { }
 		if (!ctor && baseClass && baseClass.ctor)
 		{
-		//printf("Creating default this(){} for class %s\n", toChars());
-		CtorDeclaration ctor = new CtorDeclaration(loc, Loc(0), null, 0);
-		ctor.fbody = new CompoundStatement(Loc(0), new Statements());
-		members.push(ctor);
-		ctor.addMember(sc, this, true);
-		sc = scsave;	// why? What about sc.nofree?	///
-		sc.offset = structsize;
-		ctor.semantic(sc);
-		this.ctor = ctor;
-		defaultCtor = ctor;
+			//printf("Creating default this(){} for class %s\n", toChars());
+			CtorDeclaration ctor = new CtorDeclaration(loc, Loc(0), null, 0);
+			ctor.fbody = new CompoundStatement(Loc(0), new Statements());
+			members.push(ctor);
+			ctor.addMember(sc, this, true);
+			sc = scsave;	// why? What about sc.nofree?	///
+			sc.offset = structsize;
+			ctor.semantic(sc);
+			this.ctor = ctor;
+			defaultCtor = ctor;
 		}
 
 static if (false) {
 		if (baseClass)
-		{	if (!aggDelete)
-			aggDelete = baseClass.aggDelete;
-		if (!aggNew)
-			aggNew = baseClass.aggNew;
+		{	
+			if (!aggDelete)
+				aggDelete = baseClass.aggDelete;
+			if (!aggNew)
+				aggNew = baseClass.aggNew;
 		}
 }