[Issue 14304] [REG2.067a] ICE with static immutable variable CTFE

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Mar 19 20:31:39 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14304

--- Comment #4 from github-bugzilla at puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9a6b349c3d9a1d991d429714c00fd103048ca792
fix Issue 14304 - ICE with static immutable variable CTFE

https://github.com/D-Programming-Language/dmd/commit/6d8634bf1421be51413e5ba87154f5adf4bc7e30
Reduce memory space for CTFE

The prior fix for issue 14304 is simple, but it will also increase the amount
of memory space for CTFE (and actually breaks Phobos unittest in Windows
platform).

To fix performance issue without breaking CTFE behavior:
- Mark the cached value of non-mutable static variable specially, to represent
"read-only constant".
- Prevent modifications of "read-only constant".
- Once a value is owned by CTFE (including cached ones), we can avoid redundant
copies for that, because the expression object can be used directly during
interpretation.

https://github.com/D-Programming-Language/dmd/commit/06537bcd9128b948a1feb35b4fd5e3cdd55c201c
Merge pull request #4503 from 9rnsr/fix14304

[REG2.067a] Issue 14304 - ICE with static immutable variable CTFE

--


More information about the Digitalmars-d-bugs mailing list