From 357fb84dbaad0b056704915c6a43764cda63ee7f Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Thu, 19 May 2022 10:48:10 -0600 Subject: use an expr->StaticEnv table in evalState --- src/libexpr/nixexpr.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libexpr/nixexpr.hh') diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index c4a509f31..e923f36a4 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -144,18 +144,17 @@ struct Expr { virtual ~Expr() { }; virtual void show(const SymbolTable & symbols, std::ostream & str) const; - virtual void bindVars(const EvalState & es, const std::shared_ptr & env); + virtual void bindVars(EvalState & es, const std::shared_ptr & env); virtual void eval(EvalState & state, Env & env, Value & v); virtual Value * maybeThunk(EvalState & state, Env & env); virtual void setName(Symbol name); - std::shared_ptr staticEnv; virtual PosIdx getPos() const { return noPos; } }; #define COMMON_METHODS \ void show(const SymbolTable & symbols, std::ostream & str) const; \ void eval(EvalState & state, Env & env, Value & v); \ - void bindVars(const EvalState & es, const std::shared_ptr & env); + void bindVars(EvalState & es, const std::shared_ptr & env); struct ExprInt : Expr { @@ -402,7 +401,7 @@ struct ExprOpNot : Expr { \ str << "("; e1->show(symbols, str); str << " " s " "; e2->show(symbols, str); str << ")"; \ } \ - void bindVars(const EvalState & es, const std::shared_ptr & env) \ + void bindVars(EvalState & es, const std::shared_ptr & env) \ { \ e1->bindVars(es, env); e2->bindVars(es, env); \ } \ -- cgit v1.2.3