[Issue 14451] static-foreach uses huge stack for no reason
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 16 09:01:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14451
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
Hardware|x86_64 |All
OS|Linux |All
--- Comment #1 from yebblies <yebblies at gmail.com> ---
Scoped properly or not, each variable is going to take up stack space. Space
for all variables is always allocated at the start of the function, inner
scopes just control when destructors are run. I can't really see this
changing.
This could be fixed by allowing the backend to re-use stack space for variables
whose lifetimes do not overlap.
--
More information about the Digitalmars-d-bugs
mailing list