Mercurial > projects > ddmd
diff dmd/FuncDeclaration.d @ 176:fa9a71a9f5a8
Moved all the mutable globals to Global
author | korDen |
---|---|
date | Sun, 10 Oct 2010 05:22:45 +0400 |
parents | 94b6033c07f3 |
children | 1475fd394c9e |
line wrap: on
line diff
--- a/dmd/FuncDeclaration.d Sun Oct 10 03:48:06 2010 +0400 +++ b/dmd/FuncDeclaration.d Sun Oct 10 05:22:45 2010 +0400 @@ -125,8 +125,6 @@ import std.string; -__gshared static int hiddenparami; // how many we've generated so far - class FuncDeclaration : Declaration { Array fthrows; // Array of Type's of exceptions (not used) @@ -3411,7 +3409,7 @@ // as the first argument .type* thidden = tf.next.pointerTo().toCtype(); char hiddenparam[5+4+1]; - sprintf(hiddenparam.ptr, "__HID%d".ptr, ++hiddenparami); + sprintf(hiddenparam.ptr, "__HID%d".ptr, ++global.hiddenparami); shidden = symbol_name(hiddenparam.ptr, SC.SCparameter, thidden); shidden.Sflags |= SFL.SFLtrue | SFL.SFLfree; @@ -3551,7 +3549,7 @@ Blockx bx; Statement sbody; - localgot = null; + global.localgot = null; sbody = func.fbody; ///memset(&bx, 0, (bx).sizeof); @@ -3642,7 +3640,7 @@ if (isStaticConstructor()) { elem* e = el_una(OPER.OPucall, TYM.TYvoid, el_var(s)); - ector = el_combine(ector, e); + global.ector = el_combine(global.ector, e); } // If static destructor @@ -3661,11 +3659,11 @@ { /* Increment destructor's vgate at construction time */ - ectorgates.push(cast(void*)f2); + global.ectorgates.push(cast(void*)f2); } e = el_una(OPER.OPucall, TYM.TYvoid, el_var(s)); - edtor = el_combine(e, edtor); + global.edtor = el_combine(e, global.edtor); } } @@ -3673,7 +3671,7 @@ if (isUnitTestDeclaration()) { elem* e = el_una(OPER.OPucall, TYM.TYvoid, el_var(s)); - etest = el_combine(etest, e); + global.etest = el_combine(global.etest, e); } if (global.errors) @@ -3753,7 +3751,7 @@ } //printf("FuncDeclaration.buildClosure()\n"); Symbol* sclosure; - sclosure = symbol_name("__closptr".ptr, SC.SCauto, Type.tvoidptr.toCtype()); + sclosure = symbol_name("__closptr".ptr, SC.SCauto, global.tvoidptr.toCtype()); sclosure.Sflags |= SFL.SFLtrue | SFL.SFLfree; symbol_add(sclosure); irs.sclosure = sclosure;