Mercurial > projects > ddmd
view dmd/ModAssignExp.d @ 178:e3afd1303184
Many small bugs fixed
Made all classes derive from TObject to detect memory leaks (functionality is disabled for now)
Began work on overriding backend memory allocations (to avoid memory leaks)
author | korDen |
---|---|
date | Sun, 17 Oct 2010 07:42:00 +0400 |
parents | 60bb0fe4563e |
children | b0d41ff5e0df |
line wrap: on
line source
module dmd.ModAssignExp; import dmd.common; import dmd.expression.Mod; import dmd.BinExp; import dmd.Loc; import dmd.Expression; import dmd.Scope; import dmd.InterState; import dmd.OutBuffer; import dmd.ArrayTypes; import dmd.Identifier; import dmd.IRState; import dmd.TOK; import dmd.backend.OPER; import dmd.Id; import dmd.backend.elem; class ModAssignExp : BinExp { this(Loc loc, Expression e1, Expression e2) { register(); super(loc, TOK.TOKmodass, this.sizeof, e1, e2); } override Expression semantic(Scope sc) { BinExp.semantic(sc); checkComplexMulAssign(); return commonSemanticAssign(sc); } override Expression interpret(InterState istate) { return interpretAssignCommon(istate, &Mod); } override void buildArrayIdent(OutBuffer buf, Expressions arguments) { AssignExp_buildArrayIdent(buf, arguments, "Mod"); } override Expression buildArrayLoop(Parameters fparams) { return AssignExp_buildArrayLoop!(typeof(this))(fparams); } override Identifier opId() /* For operator overloading */ { return Id.modass; } override elem* toElem(IRState* irs) { return toElemBin(irs,OPmodass); } }