tvl-depot/tvix/eval/src
Vincent Ambo 0af1df4be2 refactor(tvix/eval): clean up logic in Compiler::end_scope
The condition here was extremely hard to read prior to this change.

As the locals vector is now guaranteed to never be empty (there is
always at least a phantom for the current chunk's root expression),
the logic here can be simplified to just dropping tailing locals
entries while their depth matches that of the scope being closed.

Change-Id: I24973e23bc2ad25e62ece64ab4d8624e6e274c16
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6427
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-09-08 19:54:02 +00:00
..
builtins fix(tvix/eval): force argument of builtins.length 2022-09-08 12:53:20 +00:00
compiler refactor(tvix/eval): clean up logic in Compiler::end_scope 2022-09-08 19:54:02 +00:00
tests fix(tvix/eval): inherit scope poisoning data in nested contexts 2022-09-08 07:59:15 +00:00
value fix(tvix/eval): don't panic when printing a black hole 2022-09-08 12:53:20 +00:00
chunk.rs feat(tvix/eval): thread codemap through to disassembler 2022-09-08 12:53:08 +00:00
disassembler.rs refactor(tvix/eval): implement much clearer disassembler output 2022-09-08 13:36:26 +00:00
errors.rs fix(tvix/eval): thread thunk forcing errors through correctly 2022-09-08 07:59:15 +00:00
eval.rs feat(tvix/eval): thread codemap through to disassembler 2022-09-08 12:53:08 +00:00
lib.rs refactor(tvix/eval): introduce UpvalueCarrier trait 2022-09-06 14:58:52 +00:00
main.rs refactor(tvix/eval): explicitly discard uninteresting results 2022-09-03 13:19:48 +00:00
opcode.rs fix(tvix/eval): compare *stack* slots when deciding whether to defer 2022-09-08 19:54:02 +00:00
upvalues.rs refactor(tvix/eval): introduce UpvalueCarrier trait 2022-09-06 14:58:52 +00:00
vm.rs refactor(tvix/eval): implement much clearer disassembler output 2022-09-08 13:36:26 +00:00
warnings.rs refactor(tvix/eval): store spans instead of nodes in Warning/Error 2022-09-07 20:04:26 +00:00