"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dmd/expressionsem.d" between
dmd-2.097.0.tar.gz and dmd-2.097.1.tar.gz

About: DMD (Digital Mars D) is the D reference compiler. D is an object-oriented, imperative, multi-paradigm system programming language.

expressionsem.d  (dmd-2.097.0):expressionsem.d  (dmd-2.097.1)
skipping to change at line 2342 skipping to change at line 2342
* excluding all lazy parameters. * excluding all lazy parameters.
*/ */
if (needsPrefix && (lastPrefix - i) * step >= 0) if (needsPrefix && (lastPrefix - i) * step >= 0)
{ {
const bool needsDtor = !isRef && arg.type.needsDestruction() && const bool needsDtor = !isRef && arg.type.needsDestruction() &&
// Problem 3: last throwing arg doesn't r equire dtor patching // Problem 3: last throwing arg doesn't r equire dtor patching
(callerDestroysArgs || i != lastPrefix); (callerDestroysArgs || i != lastPrefix);
/* Declare temporary 'auto __pfx = arg' (needsDtor) or 'auto __p fy = arg' (!needsDtor) /* Declare temporary 'auto __pfx = arg' (needsDtor) or 'auto __p fy = arg' (!needsDtor)
*/ */
auto tmp = copyToTemp(parameter.storageClass & (STC.scope_), auto tmp = copyToTemp(
(parameter ? parameter.storageClass : tf.parameterList.stc)
& (STC.scope_),
needsDtor ? "__pfx" : "__pfy", needsDtor ? "__pfx" : "__pfy",
!isRef ? arg : arg.addressOf()); !isRef ? arg : arg.addressOf());
tmp.dsymbolSemantic(sc); tmp.dsymbolSemantic(sc);
if (callerDestroysArgs) if (callerDestroysArgs)
{ {
/* Problem 4: Normal temporary, destructed after the call /* Problem 4: Normal temporary, destructed after the call
*/ */
if (needsDtor) if (needsDtor)
tmp.isArgDtorVar = true; // mark it so that the backen d passes it by ref to the function being called tmp.isArgDtorVar = true; // mark it so that the backen d passes it by ref to the function being called
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)