fix(3p/nix): Use a proper pointer in Env to carry with-attrs

This eliminates the value-smuggling that would trip up the GC.

Change-Id: I8057df78cf0bf6bea9faf1b44233aa9820ae44f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1504
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Kane York 2020-07-31 15:12:11 -07:00 committed by kanepyork
parent dc4c0bad65
commit 770034042a
2 changed files with 9 additions and 5 deletions

View file

@ -42,6 +42,7 @@ struct Env : public gc {
unsigned short prevWith : 14; // nr of levels up to next `with' environment
enum { Plain = 0, HasWithExpr, HasWithAttrs } type : 2;
std::vector<Value*, traceable_allocator<Value*>> values;
Expr* withAttrsExpr = nullptr;
};
Value& mkString(Value& v, const std::string& s,