Mercurial > projects > ddmd
diff dmd/StructDeclaration.d @ 131:206db751bd4c
dmdfe 2.037 compiles now
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Fri, 10 Sep 2010 00:27:37 +0100 |
parents | 60bb0fe4563e |
children | af1bebfd96a4 |
line wrap: on
line diff
--- a/dmd/StructDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/StructDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -53,6 +53,10 @@ import dmd.NewDeclaration; import dmd.DeleteDeclaration; import dmd.Global; +import dmd.MOD; +import dmd.IntegerExp; +import dmd.EqualExp; +import dmd.AndAndExp; import dmd.backend.dt_t; import dmd.backend.Util; @@ -300,7 +304,7 @@ version (DMDV2) { /* Try to find the opEquals function. Build it if necessary. */ - TypeFunction *tfeqptr; + TypeFunction tfeqptr; { // bool opEquals(const T*) const; auto parameters = new Parameters; version(STRUCTTHISREF) { @@ -314,7 +318,7 @@ parameters.push(param); tfeqptr = new TypeFunction(parameters, Type.tbool, 0, LINK.LINKd); tfeqptr.mod = MOD.MODconst; - tfeqptr = cast(TypeFunction)(tfeqptr.semantic(0, sc2)); + tfeqptr = cast(TypeFunction)(tfeqptr.semantic(Loc(0), sc2)); Dsymbol s = search_function(this, Id.eq); FuncDeclaration fdx = s ? s.isFuncDeclaration() : null; @@ -644,10 +648,10 @@ auto parameters = new Parameters; version (STRUCTTHISREF) { // bool opEquals(ref const T) const; - auto param = new Parameter(STC.STCref, type.constOf(), Id.p, NULL); + auto param = new Parameter(STC.STCref, type.constOf(), Id.p, null); } else { // bool opEquals(const T*) const; - auto param = new Parameter(STC.STCin, type.pointerTo(), Id.p, NULL); + auto param = new Parameter(STC.STCin, type.pointerTo(), Id.p, null); } parameters.push(param); @@ -655,16 +659,16 @@ ftype.mod = MOD.MODconst; ftype = cast(TypeFunction)ftype.semantic(loc, sc); - auto fop = new FuncDeclaration(loc, 0, Id.eq, STD.STCundefined, ftype); + auto fop = new FuncDeclaration(loc, Loc(0), Id.eq, STC.STCundefined, ftype); - Expression *e = NULL; + Expression e = null; /* Do memberwise compare */ //printf("\tmemberwise compare\n"); foreach (s; fields) { VarDeclaration v = s.isVarDeclaration(); - assert(v && v.storage_class & STD.STCfield); + assert(v && v.storage_class & STC.STCfield); if (v.storage_class & STC.STCref) assert(0); // what should we do with this? // this.v == s.v;