- Destructors not run when argument list evaluation throws
https://github.com/D-Programming-Language/dmd/commit/11276b83f93a301a7d258e72bf8cea6a504d28b7
Merge pull request #4078 from WalterBright/fix13586
--
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
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
https://issues.dlang.org/show_bug.cgi?id=13586
Sobirari Muhomori dfj1es...@sneakemail.com changed:
What|Removed |Added
See Also|
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.
--
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
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
- 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
--
https://issues.dlang.org/show_bug.cgi?id=13586
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
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
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,
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
--
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
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?
https://issues.dlang.org/show_bug.cgi?id=13586
--- Comment #9 from Andrei Alexandrescu and...@erdani.com ---
Thanks!
--
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
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.)
--
https://issues.dlang.org/show_bug.cgi?id=13586
monarchdo...@gmail.com changed:
What|Removed |Added
CC||monarchdo...@gmail.com
--- Comment
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
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
https://issues.dlang.org/show_bug.cgi?id=13586
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
CC||and...@erdani.com
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
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.
--
23 matches
Mail list logo