# HG changeset patch # User korDen # Date 1285826672 -14400 # Node ID 25ede4f66bda2c3f5c760d08e2501af3637657bb # Parent 8bf07a566fdf0e6bcec558da08e52928ebb76884 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 diff -r 8bf07a566fdf -r 25ede4f66bda dmd/AssertExp.d --- 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) { diff -r 8bf07a566fdf -r 25ede4f66bda dmd/backend/glue.d --- 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) diff -r 8bf07a566fdf -r 25ede4f66bda main.d --- 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;