[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 16 19:05:32 PDT 2021


rjmccall added a comment.

In D96033#2630585 <https://reviews.llvm.org/D96033#2630585>, @rsmith wrote:

> @rjmccall I'd like your input on this patch in particular, if you have time.

I've been specifically avoiding paying any attention to this patch because it sounds like an enormous time-sink to review. :)  That's not to say it'd be time poorly spent, because it's an intriguing feature, but I just don't have the time to engage with it fully.  I can try to give snippets of time if you can pose specific questions.  I did at least go back and read the RFC from the summer.  I'm not sure I have time to read the review thread up until now; it's quite daunting.

> I'm nervous in general about the looming idea of declaration unloading, but the fact that it's been working in Cling for a long time gives me some confidence that we can do that in a way that's not prohibitively expensive and invasive.

I don't really know the jargon here.  The biggest problem that I foresee around having a full-featured C REPL is the impossibility of replacing existing types — you might be able to introduce a *new* struct with a particular name, break the redeclaration chain, and have it shadow the old one, and we could probably chase down all the engineering problems that that causes in the compiler, but it's never going to be a particularly satisfying model.  If we don't have to worry about that, then I feel like the largest problem is probably the IRGen interaction — in particular, whether we're going to have to start serializing IRGen state the same way that Sema state has to be serialized across PCH boundaries.  But I'm sure the people who are working on this have more knowledge of what issues they're seeing than I can just abstractly anticipate.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96033/new/

https://reviews.llvm.org/D96033



More information about the cfe-commits mailing list