comparison dmd/codegen/Util.d @ 135:af1bebfd96a4 dmd2037

dmd 2.038
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 13 Sep 2010 22:19:42 +0100
parents 60bb0fe4563e
children 31c086f76669
comparison
equal deleted inserted replaced
134:4251f96733f4 135:af1bebfd96a4
295 } 295 }
296 else 296 else
297 e = el_una(op,tyret,ep); 297 e = el_una(op,tyret,ep);
298 } 298 }
299 else if (ep) 299 else if (ep)
300 e = el_bin((tf.ispure && tf.isnothrow) ? OPER.OPcallns : OPER.OPcall, tyret, ec, ep); 300 /* Do not do "no side effect" calls if a hidden parameter is passed,
301 * as the return value is stored through the hidden parameter, which
302 * is a side effect.
303 */
304 e = el_bin((tf.ispure && tf.isnothrow && (retmethod != RET.RETstack)) ?
305 OPcallns : OPcall, tyret, ec, ep);
301 else 306 else
302 e = el_una((tf.ispure && tf.isnothrow) ? OPER.OPucallns : OPER.OPucall, tyret, ec); 307 e = el_una((tf.ispure && tf.isnothrow && (retmethod != RET.RETstack)) ?
308 OPucallns : OPucall, tyret, ec);
303 309
304 if (retmethod == RET.RETstack) 310 if (retmethod == RET.RETstack)
305 { 311 {
306 e.Ety = TYM.TYnptr; 312 e.Ety = TYM.TYnptr;
307 e = el_una(OPER.OPind, tyret, e); 313 e = el_una(OPER.OPind, tyret, e);