changeset 165:25ede4f66bda

Temporarily disabled GC (again) because phobos fails to compile with it (looks like some ObjSymbols are being falsely collected, see Library.d:666) Getting rid of global state (i.e global and static variables) to allow running concurrent compilation
author korDen
date Thu, 30 Sep 2010 10:04:32 +0400
parents 8bf07a566fdf
children d8565fbd755c
files dmd/AssertExp.d dmd/backend/glue.d main.d
diffstat 3 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/AssertExp.d	Thu Sep 30 07:53:23 2010 +0400
+++ b/dmd/AssertExp.d	Thu Sep 30 10:04:32 2010 +0400
@@ -37,9 +37,9 @@
 import core.stdc.string;
 import std.string : toStringz;
 
-static __gshared Symbol* assertexp_sfilename = null;
-static __gshared string assertexp_name = null;
-static __gshared Module assertexp_mn = null;
+//static __gshared Symbol* assertexp_sfilename = null;
+//static __gshared string assertexp_name = null;
+//static __gshared Module assertexp_mn = null;
 
 class AssertExp : UnaExp
 {
@@ -107,7 +107,7 @@
 		/* assert()s are non-recoverable errors, so functions that
 		 * use them can be considered "nothrow"
 		 */
-		return 0; //(global.params.useAssert != 0);
+		return false; //(global.params.useAssert != 0);
 	}
 }
 	override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
@@ -193,9 +193,9 @@
 
 					/* Cache values.
 					 */
-					//static Symbol *assertexp_sfilename = null;
-					//static char *assertexp_name = null;
-					//static Module *assertexp_mn = null;
+					Symbol* assertexp_sfilename = null;
+					string assertexp_name = null;
+					Module assertexp_mn = null;
 
 					if (!assertexp_sfilename || loc.filename != assertexp_name || assertexp_mn != m)
 					{
--- a/dmd/backend/glue.d	Thu Sep 30 07:53:23 2010 +0400
+++ b/dmd/backend/glue.d	Thu Sep 30 10:04:32 2010 +0400
@@ -318,9 +318,9 @@
     memset(stringTab.ptr, 0, stringTab.sizeof);
     stidx = 0;
 
-    assertexp_sfilename = null;
-    assertexp_name = null;
-    assertexp_mn = null;
+//    assertexp_sfilename = null;
+//    assertexp_name = null;
+//    assertexp_mn = null;
 }
 
 void obj_start(char *srcfile)
--- a/main.d	Thu Sep 30 07:53:23 2010 +0400
+++ b/main.d	Thu Sep 30 10:04:32 2010 +0400
@@ -174,7 +174,10 @@
 	void runMain()
     {
 		CrashHandlerInit();
-        result = main(_d_args);
+		//	while (true)
+		{
+			result = main(_d_args);
+		}
     }
 
     void runAll()
@@ -211,6 +214,8 @@
 
 int main(string[] args)
 {
+	GC.disable();
+	
     Array files = new Array();
     Array libmodules = new Array();
     Module m;