Mercurial > projects > ddmd
diff dmd/InExp.d @ 72:2e2a5c3f943a
reduced warnings by adding override to the methods
think this also normalizes different line endings used all over the place
author | Trass3r |
---|---|
date | Sat, 28 Aug 2010 16:19:48 +0200 |
parents | f708f0452e81 |
children | 43073c7c7769 |
line wrap: on
line diff
--- a/dmd/InExp.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/InExp.d Sat Aug 28 16:19:48 2010 +0200 @@ -1,26 +1,26 @@ -module dmd.InExp; - -import dmd.Expression; -import dmd.Identifier; -import dmd.Loc; -import dmd.Scope; -import dmd.IRState; -import dmd.BinExp; +module dmd.InExp; + +import dmd.Expression; +import dmd.Identifier; +import dmd.Loc; +import dmd.Scope; +import dmd.IRState; +import dmd.BinExp; import dmd.TOK; import dmd.Type; -import dmd.Id; +import dmd.Id; import dmd.TY; import dmd.TypeAArray; import dmd.expression.util.arrayTypeCompatible; - -import dmd.backend.elem; -import dmd.backend.TYM; -import dmd.backend.mTY; -import dmd.backend.OPER; -import dmd.backend.Symbol; -import dmd.backend.Util; - + +import dmd.backend.elem; +import dmd.backend.TYM; +import dmd.backend.mTY; +import dmd.backend.OPER; +import dmd.backend.Symbol; +import dmd.backend.Util; + class InExp : BinExp { this(Loc loc, Expression e1, Expression e2) @@ -28,7 +28,7 @@ super(loc, TOKin, InExp.sizeof, e1, e2); } - Expression semantic(Scope sc) + override Expression semantic(Scope sc) { if (type) return this; @@ -63,47 +63,47 @@ return this; } - int isBit() + override int isBit() { return 0; } - Identifier opId() + override Identifier opId() { return Id.opIn; } - Identifier opId_r() + override Identifier opId_r() { return Id.opIn_r; } - elem* toElem(IRState* irs) + override elem* toElem(IRState* irs) { - elem* e; - elem* key = e1.toElem(irs); - elem* aa = e2.toElem(irs); - elem* ep; - elem* keyti; - TypeAArray taa = cast(TypeAArray)e2.type.toBasetype(); - - - // set to: - // aaIn(aa, keyti, key); - - if (tybasic(key.Ety) == TYstruct) - { - key = el_una(OPstrpar, TYstruct, key); - key.Enumbytes = key.E1.Enumbytes; - assert(key.Enumbytes); - } - - Symbol* s = taa.aaGetSymbol("In", 0); - keyti = taa.index.getInternalTypeInfo(null).toElem(irs); - ep = el_params(key, keyti, aa, null); - e = el_bin(OPcall, type.totym(), el_var(s), ep); - - el_setLoc(e,loc); + elem* e; + elem* key = e1.toElem(irs); + elem* aa = e2.toElem(irs); + elem* ep; + elem* keyti; + TypeAArray taa = cast(TypeAArray)e2.type.toBasetype(); + + + // set to: + // aaIn(aa, keyti, key); + + if (tybasic(key.Ety) == TYstruct) + { + key = el_una(OPstrpar, TYstruct, key); + key.Enumbytes = key.E1.Enumbytes; + assert(key.Enumbytes); + } + + Symbol* s = taa.aaGetSymbol("In", 0); + keyti = taa.index.getInternalTypeInfo(null).toElem(irs); + ep = el_params(key, keyti, aa, null); + e = el_bin(OPcall, type.totym(), el_var(s), ep); + + el_setLoc(e,loc); return e; } }