Compiler-assisted code reflection for IDEs

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jul 16 22:26:24 UTC 2021


On Fri, Jul 16, 2021 at 10:11:37PM +0000, SealabJaster via Digitalmars-d wrote:
[...]
> So an ETA of roughly 5 years minimum then. Doesn't dmd's frontend have
> the issue of poorly managing its memory (issue for longer running
> tools), or is that mostly fixed now?

There's an option to turn on the GC for DMDFE.  But the fact remains
that the code was written with single execution in mind, meaning that
once you call it to compile a code snippet, you cannot call it again
without running into problems. There's global state and stuff that
doesn't get cleaned up (this is part of why dmd is so fast: it doesn't
bother cleaning up anything, just does its job ASAP then lets the OS
clean up afterwards).

So you have to reboot the DMDFE component for each compilation request
anyway, meaning memory management is mostly moot (just load it up as a
subprocess, do its thing, then let the OS reclaim the subprocess
memory).  It was never meant to be a long-running process.

The code may have been updated more recently to make it more friendly
for reuse, but AFAIK the bulk of the code still assumes single
invocation only.


T

-- 
Today's society is one of specialization: as you grow, you learn more and more about less and less. Eventually, you know everything about nothing.


More information about the Digitalmars-d mailing list