tvl-depot/tvix/eval/src
Adam Joseph 22b9e6ff09 refactor(tvix/eval): administer antidote for poison
The codebase contains a lot of complexity and odd roundabout
handling for shadowing globals.  I'm pretty sure none of this is
necessary, and all of it disappears if you simply make the globals
part of the ordinary identifier resolution chain, with their own
scope up above the root scope.  Then the ordinary shadowing routines
do the right thing, and no special cases or new terminology are
required.

This commit does that.

Note by tazjin: This commit was originally abandoned when Adam decided
not to take away reviewer bandwidth for this at the time (eval was
still in a much earlier stage). As we've recently done some
significant refactoring of globals initialisation this came up again,
and it seems we can easily cover the use-cases of the poison tracking
in other ways now, so I've rebased, updated and resurrected the CL.

Co-Authored-By: Vincent Ambo <tazjin@tvl.su>
Signed-off-by: Adam Joseph <adam@westernsemico.com>
Change-Id: Ib3309a47a7b31fa5bf10466bade0d876b76ae462
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7089
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2023-01-21 10:19:15 +00:00
..
builtins refactor(tvix/eval): directly return builtin tuples from macro 2023-01-20 15:39:51 +00:00
compiler refactor(tvix/eval): administer antidote for poison 2023-01-21 10:19:15 +00:00
tests refactor(tvix/eval): directly return builtin tuples from macro 2023-01-20 15:39:51 +00:00
value refactor(tvix/eval): keep globals alive through VM struct 2023-01-20 22:48:13 +00:00
chunk.rs refactor(tvix/eval): administer antidote for poison 2023-01-21 10:19:15 +00:00
errors.rs feat(tvix/eval): add error contexts to annotate error kinds 2023-01-20 15:39:51 +00:00
io.rs feat(tvix/eval): use EvalIO::import_path when coercing paths 2022-12-21 22:59:18 +00:00
lib.rs refactor(tvix/eval): keep globals alive through VM struct 2023-01-20 22:48:13 +00:00
nix_search_path.rs fix(tvix/eval): fix current clippy warnings 2022-12-25 18:25:06 +00:00
observer.rs feat(tvix/eval): initial attempt at setting lambda names 2022-10-23 15:58:53 +00:00
opcode.rs refactor(tvix/eval): administer antidote for poison 2023-01-21 10:19:15 +00:00
pretty_ast.rs fix(tvix/eval): fix current clippy warnings 2022-12-25 18:25:06 +00:00
properties.rs refactor(tvix/eval): Don't (ab)use PartialEq for Nix equality 2022-09-18 22:03:41 +00:00
source.rs chore(tvix/eval): implement std::error::Error for tvix_eval::Error 2023-01-02 22:24:43 +00:00
spans.rs refactor(tvix/eval): add a LightSpan type for lighter span tracking 2022-12-21 22:21:25 +00:00
systems.rs fix(tvix/eval): fix current clippy warnings 2022-12-25 18:25:06 +00:00
test_utils.rs test(tvix/eval): Add proof-of-concept test for Chunk 2022-09-18 17:55:06 +00:00
upvalues.rs fix(tvix/eval): remove impl PartialEq for Value 2022-11-04 00:30:13 +00:00
vm.rs refactor(tvix/eval): administer antidote for poison 2023-01-21 10:19:15 +00:00
warnings.rs fix(tvix/eval): address useless_format clippy warn 2023-01-10 19:13:45 +00:00