Mercurial > projects > ddmd
view dmd/SwitchErrorStatement.d @ 5:63623152e82a
Fixed memory corruption bug which was introduced when attempting to restore GC functionality
author | dkoroskin <> |
---|---|
date | Tue, 08 Dec 2009 21:39:17 +0300 |
parents | 10317f0c89a5 |
children | 2e2a5c3f943a |
line wrap: on
line source
module dmd.SwitchErrorStatement; import dmd.Statement; import dmd.OutBuffer; import dmd.Loc; import dmd.IRState; import dmd.HdrGenState; import dmd.BE; import dmd.backend.elem; import dmd.backend.Blockx; import dmd.backend.Util; import dmd.backend.TYM; import dmd.backend.OPER; import dmd.backend.RTLSYM; class SwitchErrorStatement : Statement { this(Loc loc) { super(loc); } BE blockExit() { return BE.BEthrow; } void toCBuffer(OutBuffer buf, HdrGenState* hgs) { buf.writestring("SwitchErrorStatement.toCBuffer()"); buf.writenl(); } void toIR(IRState* irs) { elem* e; elem* elinnum; elem* efilename; Blockx* blx = irs.blx; //printf("SwitchErrorStatement.toIR()\n"); efilename = blx.module_.toEmodulename(); elinnum = el_long(TYM.TYint, loc.linnum); e = el_bin(OPER.OPcall, TYM.TYvoid, el_var(rtlsym[RTLSYM_DSWITCHERR]), el_param(elinnum, efilename)); block_appendexp(blx.curblock, e); } }