Mercurial > projects > ddmd
diff dmd/AssertExp.d @ 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 | e28b18c23469 |
children | af724d3510d7 |
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) {