1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 07:31:15 +02:00

use an expr->StaticEnv table in evalState

This commit is contained in:
Ben Burdette 2022-05-19 10:48:10 -06:00
parent 86ba0a702c
commit 357fb84dba
6 changed files with 68 additions and 56 deletions

View file

@ -772,12 +772,12 @@ void printEnvBindings(const SymbolTable & st, const StaticEnv & se, const Env &
}
}
// TODO: add accompanying env for With stuff.
void printEnvBindings(const SymbolTable & st, const Expr & expr, const Env & env)
void printEnvBindings(const EvalState &es, const Expr & expr, const Env & env)
{
// just print the names for now
if (expr.staticEnv)
printEnvBindings(st, *expr.staticEnv.get(), env, 0);
auto se = es.getStaticEnv(expr);
if (se)
printEnvBindings(es.symbols, *se, env, 0);
}
void mapStaticEnvBindings(const SymbolTable & st, const StaticEnv & se, const Env & env, ValMap & vm)