From ec7d3685465c0082f525afee8cb525edfbed07a1 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 8 Aug 2020 21:49:38 -0400 Subject: fix(tvix): Make nix value structs inherit from GC All of the miscellanious structs that make up a nix Value should inherit from gc, as they contain pointers to GC'ed things as members Fixes: #42 Change-Id: I057d8c9f7dafbee7de7644ff152c9cba1aa6bc03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1696 Tested-by: BuildkiteCI Reviewed-by: kanepyork --- third_party/nix/src/libexpr/value.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'third_party/nix/src/libexpr') diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh index 17bf213a317f..bb151b0f308b 100644 --- a/third_party/nix/src/libexpr/value.hh +++ b/third_party/nix/src/libexpr/value.hh @@ -66,26 +66,26 @@ struct Value; the inputSrcs of the derivations. For canonicity, the store paths should be in sorted order. */ -struct NixString { +struct NixString : public gc { const char* s; const char** context; // must be in sorted order }; -struct NixThunk { +struct NixThunk : public gc { Env* env; Expr* expr; }; -struct NixApp { +struct NixApp : public gc { Value *left, *right; }; -struct NixLambda { +struct NixLambda : public gc { Env* env; ExprLambda* fun; }; -struct NixPrimOpApp { +struct NixPrimOpApp : public gc { Value *left, *right; }; -- cgit 1.4.1