[PATCH] D141215: [clang-repl] Introduce Value to capture expression results
Lang Hames via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 16 16:21:52 PDT 2023
lhames added a comment.
> OTOH it's a challenge to review since the patch is really big. Is there no way to break it up and test in isolation? Or strip away details that could be added in iterations? I had a short look and some comments, but I won't find the time in the coming weeks to give it the attention it deserves.
>
> My biggest conceptual concern is that Value is part of the Interpreter library. This is going to be a showstopper for out-of-process execution. Conceptually, it should move into a runtime library (like the ORC runtime in compiler-rt) and this won't get easier the more it is entangled with the interpreter. I do see that this adds significant complexity and I guess it's ok to keep this for later, but I do wonder what would be the best way to prepare for it. Essentially, all communication with the interpreter will be asynchronous. Is this something we can do already?
Similar thoughts here. In particular, is there a way to break the `IsSemiMissing`/ `repl_input_end` parts out from the Value part?
It sounds like it would be helpful for `clang-repl` to land this as-is, but we should have a plan to replace this with something compatible with out-of-process execution in the longer term. At a guess I think that would mean using regular global variable instances to manage the storage on the executor side, an extended `MemoryAccess` interface to read/write the value from the REPL side when needed (e.g. for printing), and emitting glue functions to pass the variable's value in to callers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141215/new/
https://reviews.llvm.org/D141215
More information about the cfe-commits
mailing list