[Issue 13586] Destructors not run when argument list evaluation throws

2015-02-18 Thread via Digitalmars-d-bugs
- Destructors not run when argument list evaluation throws https://github.com/D-Programming-Language/dmd/commit/11276b83f93a301a7d258e72bf8cea6a504d28b7 Merge pull request #4078 from WalterBright/fix13586 --

[Issue 13586] Destructors not run when argument list evaluation throws

2014-11-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #21 from Sobirari Muhomori dfj1es...@sneakemail.com --- (In reply to Andrei Alexandrescu from comment #20) C++'s issue with unnecessary copying I see it as a choice between two suboptimal implementations. The copying happens because the

[Issue 13586] Destructors not run when argument list evaluation throws

2014-11-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #20 from Andrei Alexandrescu and...@erdani.com --- (In reply to Sobirari Muhomori from comment #19) If the caller owns the arguments, it can also help with issue 12684 and similar. Once the callee gets called, it must own its by-value

[Issue 13586] Destructors not run when argument list evaluation throws

2014-11-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 Sobirari Muhomori dfj1es...@sneakemail.com changed: What|Removed |Added See Also|

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #18 from Sobirari Muhomori dfj1es...@sneakemail.com --- What optimization does it provide? Most parameters are scoped, i.e. not owned by the callee, so since they are owned by the caller, they are destroyed by the caller. --

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #16 from Sobirari Muhomori dfj1es...@sneakemail.com --- (In reply to monarchdodra from comment #15) I could be talking out of my ass, but I'd *assume* ownership transfer is required for proper move semantics. AFAIK, move semantics is

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #17 from Andrei Alexandrescu and...@erdani.com --- (In reply to Sobirari Muhomori from comment #16) (In reply to monarchdodra from comment #15) I could be talking out of my ass, but I'd *assume* ownership transfer is required for

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-26 Thread via Digitalmars-d-bugs
- Destructors not run when argument list evaluation throws https://github.com/D-Programming-Language/dmd/commit/11276b83f93a301a7d258e72bf8cea6a504d28b7 Merge pull request #4078 from WalterBright/fix13586 fix Issue 13586 - Destructors not run when argument list evaluation throws --

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #14 from Sobirari Muhomori dfj1es...@sneakemail.com --- (In reply to Walter Bright from comment #11) Because the caller can transfer ownership to the callee. If the callee never destructed its parameters, this could not be done. If

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #15 from monarchdo...@gmail.com --- (In reply to Sobirari Muhomori from comment #14) (In reply to Walter Bright from comment #11) Because the caller can transfer ownership to the callee. If the callee never destructed its parameters,

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #12 from Walter Bright bugzi...@digitalmars.com --- https://github.com/D-Programming-Language/dmd/pull/4078 --

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #11 from Walter Bright bugzi...@digitalmars.com --- (In reply to Sobirari Muhomori from comment #10) (In reply to Andrei Alexandrescu from comment #5) Wait, I'm confused. On the normal path (no exceptions) isn't the callee destroying

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #10 from Sobirari Muhomori dfj1es...@sneakemail.com --- (In reply to Andrei Alexandrescu from comment #5) Wait, I'm confused. On the normal path (no exceptions) isn't the callee destroying its by-value arguments? Huh? Why not caller?

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #9 from Andrei Alexandrescu and...@erdani.com --- Thanks! --

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #7 from Walter Bright bugzi...@digitalmars.com --- (In reply to Andrei Alexandrescu from comment #5) (In reply to Walter Bright from comment #3) (In reply to Sobirari Muhomori from comment #1) Shouldn't the argument be destructed by

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #8 from Walter Bright bugzi...@digitalmars.com --- (This is one of the complications that make ref counting not so performant.) --

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 monarchdo...@gmail.com changed: What|Removed |Added CC||monarchdo...@gmail.com --- Comment

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #3 from Walter Bright bugzi...@digitalmars.com --- (In reply to Sobirari Muhomori from comment #1) Shouldn't the argument be destructed by the caller when the callee returns? Yes. Once the function gets called, it gets marked by the

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #4 from Walter Bright bugzi...@digitalmars.com --- (In reply to monarchdodra from comment #2) Aren't you worried that we'll take a general performance hit building the arguments and then moving them every time we make a call? 1. first

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added CC||and...@erdani.com

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #6 from monarchdo...@gmail.com --- (In reply to Andrei Alexandrescu from comment #5) (In reply to Walter Bright from comment #3) (In reply to Sobirari Muhomori from comment #1) Shouldn't the argument be destructed by the caller when

[Issue 13586] Destructors not run when argument list evaluation throws

2014-10-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13586 --- Comment #1 from Sobirari Muhomori dfj1es...@sneakemail.com --- Shouldn't the argument be destructed by the caller when the callee returns? So it couldn't be constructed in place anyway. --