# HG changeset patch # User Eldar Insafutdinov # Date 1284074857 -3600 # Node ID 206db751bd4cf57b1de8f258ef61e0ab0dabbc95 # Parent 60bb0fe4563e7eca081bf739df294afa3d636c07 dmdfe 2.037 compiles now diff -r 60bb0fe4563e -r 206db751bd4c dmd/AggregateDeclaration.d --- a/dmd/AggregateDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/AggregateDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -141,7 +141,7 @@ class AggregateDeclaration : ScopeDsymbol { Type type; - STC storage_class; + StorageClass storage_class; PROT protection = PROT.PROTpublic; Type handle; // 'this' type uint structsize; // size of struct diff -r 60bb0fe4563e -r 206db751bd4c dmd/AttribDeclaration.d --- a/dmd/AttribDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/AttribDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -40,7 +40,7 @@ return m; } - void setScopeNewSc(Scope sc, STC stc, LINK linkage, PROT protection, int explicitProtection, uint structalign) + void setScopeNewSc(Scope sc, StorageClass stc, LINK linkage, PROT protection, int explicitProtection, uint structalign) { if (decl) { @@ -66,7 +66,7 @@ } } - void semanticNewSc(Scope sc, STC stc, LINK linkage, PROT protection, int explicitProtection, uint structalign) + void semanticNewSc(Scope sc, StorageClass stc, LINK linkage, PROT protection, int explicitProtection, uint structalign) { if (decl) { diff -r 60bb0fe4563e -r 206db751bd4c dmd/Declaration.d --- a/dmd/Declaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/Declaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -82,7 +82,7 @@ { Type type; Type originalType; // before semantic analysis - STC storage_class = STC.STCundefined; + StorageClass storage_class = STC.STCundefined; PROT protection = PROT.PROTundefined; LINK linkage = LINK.LINKdefault; int inuse; // used to detect cycles diff -r 60bb0fe4563e -r 206db751bd4c dmd/FuncDeclaration.d --- a/dmd/FuncDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/FuncDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -195,7 +195,7 @@ int nestedFrameRef; // !=0 if nested variables referenced } - this(Loc loc, Loc endloc, Identifier id, STC storage_class, Type type) + this(Loc loc, Loc endloc, Identifier id, StorageClass storage_class, Type type) { super(id); @@ -313,7 +313,7 @@ * to the function type */ type = type.semantic(loc, sc); - STC stc = storage_class; + StorageClass stc = storage_class; if (type.isInvariant()) stc |= STC.STCimmutable; if (type.isConst()) diff -r 60bb0fe4563e -r 206db751bd4c dmd/Parameter.d --- a/dmd/Parameter.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/Parameter.d Fri Sep 10 00:27:37 2010 +0100 @@ -21,12 +21,12 @@ class Parameter { //enum InOut inout; - STC storageClass; + StorageClass storageClass; Type type; Identifier ident; Expression defaultArg; - this(STC storageClass, Type type, Identifier ident, Expression defaultArg) + this(StorageClass storageClass, Type type, Identifier ident, Expression defaultArg) { this.type = type; this.ident = ident; @@ -190,7 +190,7 @@ else if (arg.storageClass & STCauto) buf.writestring("auto "); - uint stc = arg.storageClass; + StorageClass stc = arg.storageClass; if (arg.type && arg.type.mod & MODshared) stc &= ~STCshared; diff -r 60bb0fe4563e -r 206db751bd4c dmd/Parser.d --- a/dmd/Parser.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/Parser.d Fri Sep 10 00:27:37 2010 +0100 @@ -203,6 +203,8 @@ import dmd.VersionSymbol; import dmd.AliasThis; import dmd.Global; +import dmd.TRUST; +import dmd.PowExp; import core.stdc.string : memcpy; @@ -313,8 +315,8 @@ Dsymbols a; Dsymbols aelse; PROT prot; - STC stc; - STC storageClass; + StorageClass stc; + StorageClass storageClass; Condition condition; string comment; @@ -755,7 +757,7 @@ */ version (DMDV2) { - Dsymbols parseAutoDeclarations(STC storageClass, const(char)[] comment) + Dsymbols parseAutoDeclarations(StorageClass storageClass, const(char)[] comment) { auto a = new Dsymbols; @@ -840,9 +842,9 @@ return a; } version(DMDV2) { - void composeStorageClass(STC stc) + void composeStorageClass(StorageClass stc) { - STC u = stc; + StorageClass u = stc; u &= STC.STCconst | STC.STCimmutable | STC.STCmanifest; if (u & (u - 1)) error("conflicting storage class %s", Token.toChars(token.value)); @@ -863,10 +865,10 @@ */ version(DMDV2) { - STC parseAttribute() + StorageClass parseAttribute() { nextToken(); - STC stc = STCundefined; + StorageClass stc = STCundefined; if (token.value != TOKidentifier) { error("identifier expected after @, not %s", token.toChars()); @@ -1804,8 +1806,8 @@ Identifier ai = null; Type at; Parameter a; - STC storageClass = STC.STCundefined; - STC stc; + StorageClass storageClass = STC.STCundefined; + StorageClass stc; Expression ae; for ( ;1; nextToken()) @@ -2557,7 +2559,7 @@ else if (token.value == TOK.TOKnothrow) isnothrow = true; else if (token.value == TOKat) - { STC stc = parseAttribute(); + { StorageClass stc = parseAttribute(); switch (cast(uint)(stc >> 32)) { case STCproperty >> 32: isproperty = true; @@ -2752,7 +2754,7 @@ case TOK.TOKat: { - STC stc = parseAttribute(); + StorageClass stc = parseAttribute(); auto tfunc = cast(TypeFunction)tf; switch (cast(uint)(stc >> 32)) { @@ -2804,9 +2806,9 @@ return ts; } - Dsymbols parseDeclarations(STC storage_class) + Dsymbols parseDeclarations(StorageClass storage_class) { - STC stc; + StorageClass stc; Type ts; Type t; Type tfirst; @@ -3297,7 +3299,7 @@ auto a = parseBlock(); Dsymbol d = new StorageClassDeclaration(STCstatic, a); s = new DeclarationStatement(loc, d); - if (flags & PSscope) + if (flags & ParseStatementFlags.PSscope) s = new ScopeStatement(loc, s); break; } @@ -3522,7 +3524,7 @@ { Identifier ai = null; Type at; - STC storageClass = STC.STCundefined; + StorageClass storageClass = STC.STCundefined; if (token.value == TOK.TOKinout || token.value == TOK.TOKref) { storageClass = STC.STCref; @@ -5216,7 +5218,7 @@ nextToken(); check(TOK.TOKlparen, "typeid"); Object o; - if (isDeclaration(&token, 0, TOKreserved, NULL)) + if (isDeclaration(&token, 0, TOKreserved, null)) { // argument is a type o = parseType(); } @@ -5460,7 +5462,7 @@ isnothrow = true; else if (token.value == TOKat) { - STC stc = parseAttribute(); + StorageClass stc = parseAttribute(); switch (cast(uint)(stc >> 32)) { case STCproperty >> 32: @@ -5761,7 +5763,7 @@ else // ident!template_argument tiargs = parseTemplateArgument(); - e = new DotTemplateInstanceExp(loc, e, tiargs); + e = new DotTemplateInstanceExp(loc, e, id, tiargs); } else e = new DotIdExp(loc, e, id); diff -r 60bb0fe4563e -r 206db751bd4c dmd/PowExp.d --- a/dmd/PowExp.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/PowExp.d Fri Sep 10 00:27:37 2010 +0100 @@ -5,6 +5,13 @@ import dmd.Loc; import dmd.Identifier; import dmd.Expression; +import dmd.TOK; +import dmd.Module; +import dmd.Id; +import dmd.IdentifierExp; +import dmd.DotIdExp; +import dmd.CallExp; +import dmd.ErrorExp; version(DMDV2) { diff -r 60bb0fe4563e -r 206db751bd4c dmd/STC.d --- a/dmd/STC.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/STC.d Fri Sep 10 00:27:37 2010 +0100 @@ -1,6 +1,6 @@ module dmd.STC; -enum STC : long +enum STC { STCundefined = 0, STCstatic = 1, @@ -37,11 +37,14 @@ STCgshared = 0x40000000, // accessible from multiple threads // but not typed as "shared" STC_TYPECTOR = (STCconst | STCimmutable | STCshared), - STCproperty = 0x100000000, - STCsafe = 0x200000000, - STCtrusted = 0x400000000, - STCsystem = 0x800000000, } import dmd.EnumUtils; -mixin(BringToCurrentScope!(STC)); \ No newline at end of file +mixin(BringToCurrentScope!(STC)); + +enum STCproperty = 0x100000000; +enum STCsafe = 0x200000000; +enum STCtrusted = 0x400000000; +enum STCsystem = 0x800000000; + +alias ulong StorageClass; \ No newline at end of file diff -r 60bb0fe4563e -r 206db751bd4c dmd/Scope.d --- a/dmd/Scope.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/Scope.d Fri Sep 10 00:27:37 2010 +0100 @@ -78,7 +78,7 @@ PROT protection = PROT.PROTpublic; // protection for class members int explicitProtection; // set if in an explicit protection attribute - STC stc; // storage class + StorageClass stc; // storage class SCOPE flags; diff -r 60bb0fe4563e -r 206db751bd4c dmd/ShlAssignExp.d --- a/dmd/ShlAssignExp.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/ShlAssignExp.d Fri Sep 10 00:27:37 2010 +0100 @@ -11,6 +11,7 @@ import dmd.TOK; import dmd.Id; import dmd.Type; +import dmd.ArrayLengthExp; import dmd.backend.elem; import dmd.backend.OPER; import dmd.expression.Shl; diff -r 60bb0fe4563e -r 206db751bd4c dmd/ShrAssignExp.d --- a/dmd/ShrAssignExp.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/ShrAssignExp.d Fri Sep 10 00:27:37 2010 +0100 @@ -11,6 +11,8 @@ import dmd.Id; import dmd.TOK; import dmd.Type; +import dmd.ArrayLengthExp; +import dmd.CastExp; import dmd.backend.elem; import dmd.backend.OPER; diff -r 60bb0fe4563e -r 206db751bd4c dmd/StorageClassDeclaration.d --- a/dmd/StorageClassDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/StorageClassDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -10,12 +10,14 @@ import dmd.OutBuffer; import dmd.HdrGenState; import dmd.STC; +import dmd.Id; +import dmd.Identifier; class StorageClassDeclaration: AttribDeclaration { - STC stc; + StorageClass stc; - this(STC stc, Dsymbols decl) + this(StorageClass stc, Dsymbols decl) { super(decl); @@ -35,7 +37,7 @@ { if (decl) { - STC scstc = sc.stc; + StorageClass scstc = sc.stc; /* These sets of storage classes are mutually exclusive, * so choose the innermost or most recent one. @@ -48,8 +50,8 @@ scstc &= ~(STC.STCconst | STC.STCimmutable | STC.STCmanifest); if (stc & (STC.STCgshared | STC.STCshared | STC.STCtls)) scstc &= ~(STC.STCgshared | STC.STCshared | STC.STCtls); - if (stc & (STC.STCsafe | STC.STCtrusted | STC.STCsystem)) - scstc &= ~(STC.STCsafe | STC.STCtrusted | STC.STCsystem); + if (stc & (STCsafe | STCtrusted | STCsystem)) + scstc &= ~(STCsafe | STCtrusted | STCsystem); scstc |= stc; setScopeNewSc(sc, scstc, sc.linkage, sc.protection, sc.explicitProtection, sc.structalign); @@ -60,7 +62,7 @@ { if (decl) { - STC scstc = sc.stc; + StorageClass scstc = sc.stc; /* These sets of storage classes are mutually exclusive, * so choose the innermost or most recent one. @@ -73,8 +75,8 @@ scstc &= ~(STC.STCconst | STC.STCimmutable | STC.STCmanifest); if (stc & (STC.STCgshared | STC.STCshared | STC.STCtls)) scstc &= ~(STC.STCgshared | STC.STCshared | STC.STCtls); - if (stc & (STC.STCsafe | STC.STCtrusted | STC.STCsystem)) - scstc &= ~(STC.STCsafe | STC.STCtrusted | STC.STCsystem); + if (stc & (STCsafe | STCtrusted | STCsystem)) + scstc &= ~(STCsafe | STCtrusted | STCsystem); scstc |= stc; semanticNewSc(sc, scstc, sc.linkage, sc.protection, sc.explicitProtection, sc.structalign); @@ -86,11 +88,11 @@ assert(false); } - static void stcToCBuffer(OutBuffer buf, int stc) + static void stcToCBuffer(OutBuffer buf, StorageClass stc) { struct SCstring { - int stc; + StorageClass stc; TOK tok; }; @@ -132,7 +134,7 @@ if (tok == TOKat) { Identifier id; - if (stc & STC.STCproperty) + if (stc & STCproperty) id = Id.property; else if (stc & STCsafe) id = Id.safe; diff -r 60bb0fe4563e -r 206db751bd4c dmd/StructDeclaration.d --- 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; diff -r 60bb0fe4563e -r 206db751bd4c dmd/TemplateDeclaration.d --- a/dmd/TemplateDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/TemplateDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -42,6 +42,7 @@ import dmd.VarDeclaration; import dmd.TemplateParameter; import dmd.TemplateTypeParameter; +import dmd.MOD; import dmd.expression.Util; @@ -1385,7 +1386,7 @@ /* We do this ONLY if there is only one function in the template. */ FuncDeclaration fd = onemember && onemember.toAlias() ? - onemember.toAlias().isFuncDeclaration() : NULL; + onemember.toAlias().isFuncDeclaration() : null; if (fd) { paramscope.parent = fd; diff -r 60bb0fe4563e -r 206db751bd4c dmd/TemplateInstance.d --- a/dmd/TemplateInstance.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/TemplateInstance.d Fri Sep 10 00:27:37 2010 +0100 @@ -37,6 +37,9 @@ import dmd.FuncExp; import dmd.Declaration; import dmd.MATCH; +import dmd.TypeFunction; +import dmd.TemplateTupleParameter; +import dmd.FuncDeclaration; import dmd.templates.Util; import dmd.backend.glue; @@ -769,7 +772,7 @@ */ FuncDeclaration fd; if (!td.onemember || - (fd = td.onemember.toAlias().isFuncDeclaration()) == null || + (fd = td.onemember.toAlias().isFuncDeclaration()) is null || fd.type.ty != TY.Tfunction) { /* Not a template function, therefore type inference is not possible. diff -r 60bb0fe4563e -r 206db751bd4c dmd/Type.d --- a/dmd/Type.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/Type.d Fri Sep 10 00:27:37 2010 +0100 @@ -54,6 +54,13 @@ import dmd.TypeSlice; import dmd.Global; import dmd.StringValue; +import dmd.TRUST; +import dmd.TemplateDeclaration; +import dmd.DotIdExp; +import dmd.AggregateDeclaration; +import dmd.DotTemplateInstanceExp; + +import dmd.expression.Util; import dmd.backend.Symbol; import dmd.backend.TYPE; @@ -452,7 +459,7 @@ ///} goto Ldistinct; } - const STC sc = STC.STCref | STC.STCin | STC.STCout | STC.STClazy; + const StorageClass sc = STC.STCref | STC.STCin | STC.STCout | STC.STClazy; if ((arg1.storageClass & sc) != (arg2.storageClass & sc)) inoutmismatch = 1; // We can add scope, but not subtract it @@ -526,7 +533,7 @@ /* Can convert safe/trusted to system */ - if (t1.trust <= TRUST.TRUSTsystem && t2.trust >= TRUSTtrusted) + if (t1.trust <= TRUST.TRUSTsystem && t2.trust >= TRUST.TRUSTtrusted) goto Lnotcovariant; //printf("\tcovaraint: 1\n"); @@ -1422,7 +1429,7 @@ return t; } - Type addStorageClass(STC stc) + Type addStorageClass(StorageClass stc) { /* Just translate to MOD bits and let addMod() do the work */ @@ -1806,12 +1813,12 @@ AggregateDeclaration sym = toDsymbol(sc).isAggregateDeclaration(); assert(sym); - if (ident != Id.__sizeof && - ident != Id.alignof && - ident != Id.init && - ident != Id.mangleof && - ident != Id.stringof && - ident != Idoffsetof) + if (ident !is Id.__sizeof && + ident !is Id.alignof_ && + ident !is Id.init_ && + ident !is Id.mangleof_ && + ident !is Id.stringof_ && + ident !is Id.offsetof) { /* See if we should forward to the alias this. */ @@ -1832,7 +1839,7 @@ { /* Rewrite e.ident as: * e.opDot().ident */ - e = build_overload(e.loc, sc, e, NULL, fd.ident); + e = build_overload(e.loc, sc, e, null, fd.ident); e = new DotIdExp(e.loc, e, ident); return e.semantic(sc); } diff -r 60bb0fe4563e -r 206db751bd4c dmd/TypeFunction.d --- a/dmd/TypeFunction.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/TypeFunction.d Fri Sep 10 00:27:37 2010 +0100 @@ -32,6 +32,8 @@ import dmd.TY; import dmd.TRUST; import dmd.Util; +import dmd.FuncDeclaration; +import dmd.Dsymbol; import dmd.TemplateInstance : isTuple; import dmd.backend.TYPE; @@ -205,7 +207,7 @@ argsc.stc = STCundefined; // don't inherit storage class argsc.protection = PROT.PROTpublic; - size_t dim = Argument.dim(tf.parameters); + size_t dim = Parameter.dim(tf.parameters); for (size_t i = 0; i < dim; i++) { auto arg = Parameter.getNth(tf.parameters, i); diff -r 60bb0fe4563e -r 206db751bd4c dmd/TypeInfoInterfaceDeclaration.d --- a/dmd/TypeInfoInterfaceDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/TypeInfoInterfaceDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -6,6 +6,7 @@ import dmd.ClassInfoDeclaration; import dmd.TypeClass; import dmd.TY; +import dmd.TypeInfoClassDeclaration; import dmd.backend.dt_t; import dmd.backend.Symbol; @@ -32,7 +33,7 @@ Symbol *s; if (!tc.sym.vclassinfo) - tc.sym.vclassinfo = new TypeInfoClassDeclaration(tc.sym); + tc.sym.vclassinfo = new TypeInfoClassDeclaration(tc); s = tc.sym.vclassinfo.toSymbol(); dtxoff(pdt, s, 0, TYnptr); // ClassInfo for tinfo } diff -r 60bb0fe4563e -r 206db751bd4c dmd/TypeInfoStructDeclaration.d --- a/dmd/TypeInfoStructDeclaration.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/TypeInfoStructDeclaration.d Fri Sep 10 00:27:37 2010 +0100 @@ -100,31 +100,30 @@ { // bool opEqual(const T*) const; scope Scope sc = new Scope(); - auto arguments = new Arguments; + auto arguments = new Parameters; version (STRUCTTHISREF) { // arg type is ref const T - auto arg = new Argument(STC.STCref, tc.constOf(), null, null); + auto arg = new Parameter(STC.STCref, tc.constOf(), null, null); } else { // arg type is const T* - auto arg = new Argument(STC.STCin, tc.pointerTo(), null, null); + auto arg = new Parameter(STC.STCin, tc.pointerTo(), null, null); } arguments.push(arg); tfeqptr = new TypeFunction(arguments, Type.tbool, 0, LINK.LINKd); tfeqptr.mod = MODconst; - tfeqptr = cast(TypeFunction)tfeqptr.semantic(0, &sc); + tfeqptr = cast(TypeFunction)tfeqptr.semantic(Loc(0), sc); } - TypeFunction *tfcmpptr; { Scope sc; - auto arguments = new Arguments; + auto arguments = new Parameters; version(STRUCTTHISREF) { // arg type is ref const T - auto arg = new Argument(STC.STCref, tc.constOf(), null, null); + auto arg = new Parameter(STC.STCref, tc.constOf(), null, null); } else { // arg type is const T* - auto arg = new Argument(STC.STCin, tc.pointerTo(), null, null); + auto arg = new Parameter(STC.STCin, tc.pointerTo(), null, null); } arguments.push(arg); @@ -133,7 +132,7 @@ tfeqptr = cast(TypeFunction)tfeqptr.semantic(Loc(0), sc); } - TypeFunction tfcmpptr; + TypeFunction tfcmpptr; { scope Scope sc = new Scope(); auto arguments = new Parameters; diff -r 60bb0fe4563e -r 206db751bd4c dmd/TypeidExp.d --- a/dmd/TypeidExp.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/TypeidExp.d Fri Sep 10 00:27:37 2010 +0100 @@ -8,10 +8,17 @@ import dmd.Scope; import dmd.HdrGenState; import dmd.TOK; +import dmd.Dsymbol; +import dmd.TY; +import dmd.Id; +import dmd.ErrorExp; +import dmd.DotIdExp; +import dmd.CommaExp; +import dmd.templates.Util; class TypeidExp : Expression { - Object *obj; + Object obj; this(Loc loc, Object o) { @@ -60,10 +67,10 @@ return new ErrorExp(); } - if (ea && ta.toBasetype().ty == Tclass) + if (ea && ta.toBasetype().ty == TY.Tclass) { /* Get the dynamic type, which is .classinfo */ - e = new DotIdExp(ea.loc, ea, Id.classinfo); + e = new DotIdExp(ea.loc, ea, Id.classinfo_); e = e.semantic(sc); } else diff -r 60bb0fe4563e -r 206db751bd4c dmd/UshrAssignExp.d --- a/dmd/UshrAssignExp.d Thu Sep 09 22:51:44 2010 +0100 +++ b/dmd/UshrAssignExp.d Fri Sep 10 00:27:37 2010 +0100 @@ -11,10 +11,13 @@ import dmd.Id; import dmd.TOK; import dmd.Type; +import dmd.ArrayLengthExp; import dmd.backend.elem; import dmd.expression.Ushr; import dmd.expression.Util; +import dmd.backend.OPER; + class UshrAssignExp : BinExp { this(Loc loc, Expression e1, Expression e2)