Bug 19535 – Enable GC in compiler

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-01-01T02:55:12Z
Last change time
2019-04-21T12:32:27Z
Assigned to
Neia Neutuladh
Creator
Neia Neutuladh

Comments

Comment #0 by dhasenan — 2019-01-01T02:55:12Z
The compiler currently has a major memory strategy of allocate-and-never-free. Partly because of this, it often requires very large amounts of RAM to compile things. The compiler's not ready to just flip the switch and enable garbage collection, so this will take some doing. 1. Add a makefile flag to build with GC enabled. This will make testing easier. 2. Build a lot of code (eg every version of every dub project) with this compiler. 3. Track down related bugs. 4. Fix them.
Comment #1 by greeenify — 2019-01-01T15:17:48Z
See also: https://github.com/dlang/dmd/pull/9048 It's an upstream from LDC. It's likely that LDC 1.14 will have this feature.
Comment #2 by dhasenan — 2019-01-01T16:19:06Z
Thanks, Seb. It looks like the crashes I'm seeing so far deal with the backend, so LDC might have an easier time of it.
Comment #3 by r.sagitario — 2019-04-21T12:32:27Z