libexpr: add expr memory management

with the prepatory work done this mostly means turning plain pointers
into unique_ptrs, with all the associated churn that necessitates. we
might want to change some of these to box_ptrs at some point as well,
but that would be a semantic change that isn't fully appropriate yet.

Change-Id: I0c238c118617420650432f4ed45569baa3e3f413
This commit is contained in:
eldritch horrors
2024-06-17 19:46:44 +00:00
parent ad5366c2ad
commit bcb774688f
9 changed files with 175 additions and 159 deletions
+1 -1
View File
@@ -1247,7 +1247,7 @@ Env * ExprAttrs::buildInheritFromEnv(EvalState & state, Env & up)
inheritEnv.up = &up;
Displacement displ = 0;
for (auto from : *inheritFromExprs)
for (auto & from : *inheritFromExprs)
inheritEnv.values[displ++] = from->maybeThunk(state, up);
return &inheritEnv;