@@ -45,7 +45,7 @@ namespace nix {
4545
4646static inline Value * mkString (EvalState & state, const std::csub_match & match)
4747{
48- Value * v = state.mem . allocValue ();
48+ Value * v = state.allocValue ();
4949 v->mkString ({match.first , match.second });
5050 return v;
5151}
@@ -227,15 +227,15 @@ void derivationToValue(
227227 auto list = state.buildList (drv.outputs .size ());
228228 for (const auto & [i, o] : enumerate(drv.outputs )) {
229229 mkOutputString (state, attrs, storePath, o);
230- (list[i] = state.mem . allocValue ())->mkString (o.first );
230+ (list[i] = state.allocValue ())->mkString (o.first );
231231 }
232232 attrs.alloc (state.s .outputs ).mkList (list);
233233
234- auto w = state.mem . allocValue ();
234+ auto w = state.allocValue ();
235235 w->mkAttrs (attrs);
236236
237237 if (!state.vImportedDrvToDerivation ) {
238- state.vImportedDrvToDerivation = allocRootValue (state.mem . allocValue ());
238+ state.vImportedDrvToDerivation = allocRootValue (state.allocValue ());
239239 state.eval (
240240 state.parseExprFromString (
241241#include " imported-drv-to-derivation.nix.gen.hh"
@@ -2317,7 +2317,7 @@ static void prim_readDir(EvalState & state, const PosIdx pos, Value ** args, Val
23172317 // Some filesystems or operating systems may not be able to return
23182318 // detailed node info quickly in this case we produce a thunk to
23192319 // query the file type lazily.
2320- auto epath = state.mem . allocValue ();
2320+ auto epath = state.allocValue ();
23212321 epath->mkPath (path / name);
23222322 if (!readFileType)
23232323 readFileType = &state.getBuiltin (" readFileType" );
@@ -3059,7 +3059,7 @@ static struct LazyPosAccessors
30593059
30603060 void operator ()(EvalState & state, const PosIdx pos, Value & line, Value & column)
30613061 {
3062- Value * posV = state.mem . allocValue ();
3062+ Value * posV = state.allocValue ();
30633063 posV->mkInt (pos.id );
30643064 line.mkApp (&lineOfPos, posV);
30653065 column.mkApp (&columnOfPos, posV);
@@ -3405,7 +3405,7 @@ static void prim_mapAttrs(EvalState & state, const PosIdx pos, Value ** args, Va
34053405
34063406 for (auto & i : *args[1 ]->attrs ()) {
34073407 Value * vName = Value::toPtr (state.symbols [i.name ]);
3408- Value * vFun2 = state.mem . allocValue ();
3408+ Value * vFun2 = state.allocValue ();
34093409 vFun2->mkApp (args[0 ], vName);
34103410 attrs.alloc (i.name ).mkApp (vFun2, i.value );
34113411 }
@@ -3471,10 +3471,10 @@ static void prim_zipAttrsWith(EvalState & state, const PosIdx pos, Value ** args
34713471
34723472 for (auto & [sym, elem] : attrsSeen) {
34733473 auto name = Value::toPtr (state.symbols [sym]);
3474- auto call1 = state.mem . allocValue ();
3474+ auto call1 = state.allocValue ();
34753475 call1->mkApp (args[0 ], name);
3476- auto call2 = state.mem . allocValue ();
3477- auto arg = state.mem . allocValue ();
3476+ auto call2 = state.allocValue ();
3477+ auto arg = state.allocValue ();
34783478 arg->mkList (*elem.list );
34793479 call2->mkApp (call1, arg);
34803480 attrs.insert (sym, call2);
@@ -3625,7 +3625,7 @@ static void prim_map(EvalState & state, const PosIdx pos, Value ** args, Value &
36253625
36263626 auto list = state.buildList (args[1 ]->listSize ());
36273627 for (const auto & [n, v] : enumerate(list))
3628- (v = state.mem . allocValue ())->mkApp (args[0 ], args[1 ]->listView ()[n]);
3628+ (v = state.allocValue ())->mkApp (args[0 ], args[1 ]->listView ()[n]);
36293629 v.mkList (list);
36303630}
36313631
@@ -3768,7 +3768,7 @@ static void prim_foldlStrict(EvalState & state, const PosIdx pos, Value ** args,
37683768 auto listView = args[2 ]->listView ();
37693769 for (auto [n, elem] : enumerate(listView)) {
37703770 Value * vs[]{vCur, elem};
3771- vCur = n == args[2 ]->listSize () - 1 ? &v : state.mem . allocValue ();
3771+ vCur = n == args[2 ]->listSize () - 1 ? &v : state.allocValue ();
37723772 state.callFunction (*args[0 ], vs, *vCur, pos);
37733773 }
37743774 state.forceValue (v, pos);
@@ -3866,9 +3866,9 @@ static void prim_genList(EvalState & state, const PosIdx pos, Value ** args, Val
38663866
38673867 auto list = state.buildList (len);
38683868 for (const auto & [n, v] : enumerate(list)) {
3869- auto arg = state.mem . allocValue ();
3869+ auto arg = state.allocValue ();
38703870 arg->mkInt (n);
3871- (v = state.mem . allocValue ())->mkApp (args[0 ], arg);
3871+ (v = state.allocValue ())->mkApp (args[0 ], arg);
38723872 }
38733873 v.mkList (list);
38743874}
@@ -4734,7 +4734,7 @@ void prim_split(EvalState & state, const PosIdx pos, Value ** args, Value & v)
47344734 v2 = mkString (state, match[si + 1 ]);
47354735 }
47364736
4737- (list[idx++] = state.mem . allocValue ())->mkList (list2);
4737+ (list[idx++] = state.allocValue ())->mkList (list2);
47384738
47394739 // Add a string for non-matched suffix characters.
47404740 if (idx == 2 * len)
@@ -4985,7 +4985,7 @@ static void prim_splitVersion(EvalState & state, const PosIdx pos, Value ** args
49854985 }
49864986 auto list = state.buildList (components.size ());
49874987 for (const auto & [n, component] : enumerate(components))
4988- (list[n] = state.mem . allocValue ())->mkString (std::move (component));
4988+ (list[n] = state.allocValue ())->mkString (std::move (component));
49894989 v.mkList (list);
49904990}
49914991
@@ -5253,7 +5253,7 @@ void EvalState::createBaseEnv(const EvalSettings & evalSettings)
52535253 auto attrs = buildBindings (2 );
52545254 attrs.alloc (" path" ).mkString (i.path .s );
52555255 attrs.alloc (" prefix" ).mkString (i.prefix .s );
5256- (list[n] = mem .allocValue ())->mkAttrs (attrs);
5256+ (list[n] =.allocValue ())->mkAttrs (attrs);
52575257 }
52585258 v.mkList (list);
52595259 addConstant (
@@ -5307,7 +5307,7 @@ void EvalState::createBaseEnv(const EvalSettings & evalSettings)
53075307
53085308 Null docs because it is documented separately.
53095309 */
5310- auto vDerivation = mem .allocValue ();
5310+ auto vDerivation =.allocValue ();
53115311 addConstant (
53125312 " derivation" ,
53135313 vDerivation,
0 commit comments