diff dmd/BinExp.d @ 176:fa9a71a9f5a8

Moved all the mutable globals to Global
author korDen
date Sun, 10 Oct 2010 05:22:45 +0400
parents 94b6033c07f3
children e3afd1303184
line wrap: on
line diff
--- a/dmd/BinExp.d	Sun Oct 10 03:48:06 2010 +0400
+++ b/dmd/BinExp.d	Sun Oct 10 05:22:45 2010 +0400
@@ -18,6 +18,7 @@
 import dmd.Expression;
 import dmd.interpret.Util;
 import dmd.GlobalExpressions;
+import dmd.Global;
 import dmd.Cast;
 import dmd.CastExp;
 import dmd.VarDeclaration;
@@ -97,8 +98,6 @@
  * Hash table of array op functions already generated or known about.
  */
 
-__gshared StringTable arrayfuncs;
-
 int typeMerge(Scope sc, Expression e, Type* pt, Expression* pe1, Expression* pe2)
 {
     //printf("typeMerge() %.*s op %.*s\n", (*pe1).toChars(), (*pe2).toChars());
@@ -1486,9 +1485,7 @@
 
 		/* Look up name in hash table
 		 */
-		if (arrayfuncs is null) arrayfuncs = new StringTable(); /// HACK!
-
-		StringValue* sv = arrayfuncs.update(name[0..namelen]);
+		StringValue* sv = global.arrayfuncs.update(name[0..namelen]);
 		FuncDeclaration fd = cast(FuncDeclaration)sv.ptrvalue;
 		if (!fd)
 		{