libexpr: make thunk state shareable

this is a strong prerequisite for making values themselves copyable
without duplicating evaluation side effects. with this we can treat
`Value` the way we treated `Value *` to date and drop indirections.

Change-Id: I08f30d12697614a3ae7149615f6f1da83b13f52b
This commit is contained in:
eldritch horrors
2025-10-05 14:56:56 +02:00
parent 57333a0e60
commit b19bbdfee1
4 changed files with 146 additions and 73 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ namespace nix {
ExprBlackHole eBlackHole;
static Env nullEnv;
Value::Thunk Value::blackHole{&nullEnv, &eBlackHole};
Value::Thunk Value::blackHole{{&nullEnv}, &eBlackHole};
// FIXME: remove, because *symbols* are abstract and do not have a single
// textual representation; see printIdentifier()