diff dmd/Token.d @ 174:af724d3510d7

lot os toCBuffer methods implemented moved shared Type.* stuff into Global
author korDen
date Sun, 10 Oct 2010 03:47:23 +0400
parents e28b18c23469
children
line wrap: on
line diff
--- a/dmd/Token.d	Sun Oct 10 01:55:35 2010 +0400
+++ b/dmd/Token.d	Sun Oct 10 03:47:23 2010 +0400
@@ -46,7 +46,7 @@
     real float80value; // can't use this in a union!
 }
 
-    static string tochars[TOK.TOKMAX];
+    static __gshared string tochars[TOK.TOKMAX];
 ///    static void *operator new(size_t sz);
 
     int isKeyword()
@@ -61,10 +61,10 @@
 	
     string toChars()
 	{
-		static char buffer[3 + 3 * value.sizeof + 1];
-
 		string p;
-
+		
+		char buffer[3 + 3 * value.sizeof + 1];
+		
 		switch (value)
 		{
 		case TOK.TOKint32v:
@@ -202,7 +202,8 @@
     static string toChars(TOK value)
 	{
 		string p;
-		static char buffer[3 + 3 * value.sizeof + 1];
+		
+		char buffer[3 + 3 * value.sizeof + 1];
 
 		p = tochars[value];
 		if (!p)