# HG changeset patch # User korDen # Date 1286692735 -14400 # Node ID 1475fd394c9e7926ca87d9c20879779b905a2803 # Parent fa9a71a9f5a87a2661d80d1b0eda51ac444be5ff bug fixes diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/CompoundStatement.d --- a/dmd/CompoundStatement.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/CompoundStatement.d Sun Oct 10 10:38:55 2010 +0400 @@ -66,10 +66,8 @@ { foreach (s; statements) { - if (s) { - s.toChars(); + if (s) s.toCBuffer(buf, hgs); - } } } diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/DsymbolTable.d --- a/dmd/DsymbolTable.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/DsymbolTable.d Sun Oct 10 10:38:55 2010 +0400 @@ -19,7 +19,6 @@ ~this() { - delete tab; } // Look up Identifier. Return Dsymbol if found, NULL if not. diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/FuncDeclaration.d --- a/dmd/FuncDeclaration.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/FuncDeclaration.d Sun Oct 10 10:38:55 2010 +0400 @@ -3293,6 +3293,8 @@ if (semanticRun >= 5) // if toObjFile() already run return; + + semanticRun = 5; if (!func.fbody) { diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/Global.d --- a/dmd/Global.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/Global.d Sun Oct 10 10:38:55 2010 +0400 @@ -201,15 +201,6 @@ sarray = new Array(); - scope Scope sc = new Scope(); - - tftohash = new TypeFunction(null, Type.thash_t, 0, LINK.LINKd); - tftohash.mod = MOD.MODconst; - tftohash = cast(TypeFunction)tftohash.semantic(Loc(0), sc); - - tftostring = new TypeFunction(null, Type.tchar.invariantOf().arrayOf(), 0, LINK.LINKd); - tftostring = cast(TypeFunction)tftostring.semantic(Loc(0), sc); - obj_symbols_towrite = new Array(); ectorgates = new Array(); @@ -220,6 +211,15 @@ void initClasssym() { scc = fake_classsym(Id.ClassInfo); + + scope Scope sc = new Scope(); + + tftohash = new TypeFunction(null, Type.thash_t, 0, LINK.LINKd); + tftohash.mod = MOD.MODconst; + tftohash = cast(TypeFunction)tftohash.semantic(Loc(0), sc); + + tftostring = new TypeFunction(null, Type.tchar.invariantOf().arrayOf(), 0, LINK.LINKd); + tftostring = cast(TypeFunction)tftostring.semantic(Loc(0), sc); } void init_time() diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/StringExp.d --- a/dmd/StringExp.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/StringExp.d Sun Oct 10 10:38:55 2010 +0400 @@ -856,7 +856,7 @@ e.Eoper = OPER.OPstring; static if (true) { // Match MEM_PH_FREE for OPstring in ztc\el.c - e.EV.ss.Vstring = cast(char*)GC.malloc((len + 1) * sz); /// ! + e.EV.ss.Vstring = cast(char*)malloc((len + 1) * sz); /// ! memcpy(e.EV.ss.Vstring, string_, (len + 1) * sz); } else { e.EV.ss.Vstring = cast(char*)string_; diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/Type.d --- a/dmd/Type.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/Type.d Sun Oct 10 10:38:55 2010 +0400 @@ -2851,7 +2851,7 @@ @property static ref Type[TY.TMAX] basic() { - return basic; + return global.basic; } static Type tvoid() diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/Util.d --- a/dmd/Util.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/Util.d Sun Oct 10 10:38:55 2010 +0400 @@ -1139,7 +1139,7 @@ } } } - +/* extern(C++) void util_assert(char* file,int line) { fflush(stdout); @@ -1177,4 +1177,4 @@ { return mem_calloc(size); } -} \ No newline at end of file +}*/ \ No newline at end of file diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/backend/glue.d --- a/dmd/backend/glue.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/backend/glue.d Sun Oct 10 10:38:55 2010 +0400 @@ -60,7 +60,6 @@ ~this() { - assert(false); } void reset() diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/backend/iasm.d --- a/dmd/backend/iasm.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/backend/iasm.d Sun Oct 10 10:38:55 2010 +0400 @@ -4396,7 +4396,7 @@ o1.ptype = d.type.toBasetype(); } -enum REG[63] regtab = +__gshared REG[63] regtab = [ {"AL", _AL, _r8 | _al,}, {"AH", _AH, _r8,}, diff -r fa9a71a9f5a8 -r 1475fd394c9e dmd/codegen/Util.d --- a/dmd/codegen/Util.d Sun Oct 10 05:22:45 2010 +0400 +++ b/dmd/codegen/Util.d Sun Oct 10 10:38:55 2010 +0400 @@ -1132,7 +1132,7 @@ es.Eoper = OPER.OPstring; // Match MEM_PH_FREE for OPstring in ztc\el.c - es.EV.ss.Vstring = cast(char*)GC.malloc(len); /// ! + es.EV.ss.Vstring = cast(char*)malloc(len); /// ! memcpy(es.EV.ss.Vstring, &e.EV, len); es.EV.ss.Vstrlen = len;