[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

Stefan Gränitz via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 11:19:45 PST 2024


================
@@ -137,9 +136,10 @@ class Interpreter {
 
   Expr *SynthesizeExpr(Expr *E);
 
-private:
   size_t getEffectivePTUSize() const;
+  void finalizeInitPTUStack();
----------------
weliveindetail wrote:

Hm, why restore point? Do you mean sth like `markMaxRestorePoint` as in "the last point we can revert to"? And would you keep `getEffectivePTUSize` for the getter then? It seemed reasonable to me to make a relation between the two. I still think restoration is a misleading term, because we can only recover the compiler state precisely. Execution state is not restorable in the same way.

What else does it affect apart from Undo? If it's only Undo, then I'd be inclined to have it in the name. If we explicitly don't want a relation between then two, it could also just be `finalize`.

https://github.com/llvm/llvm-project/pull/84176


More information about the cfe-commits mailing list