diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-28T16·38+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-06T14·58+0000 |
commit | 24811d76558a73b3d6f615d458aded0b9c690840 (patch) | |
tree | d437881bbdb2ceb6cd50febf9164fa506852802a /tvix/eval/src/tests/tvix_tests/eval-okay-nested-deferred-upvalue.nix | |
parent | 68aad6d4cf5c653154396356366f09dacea73495 (diff) |
fix(tvix/eval): distinguish statically between StackIdx and LocalIdx r/4670
Previously the functions in the scope module returned usize values, which - sometimes from the same function - were either indexes into the runtime stack *or* indexes into the compiler's local stack. This is extremely confusing because it requires the caller to be aware of the difference, and it actually caused subtle bugs. To avoid this, there is now a new LocalIdx wrapper type which is used by the scope module to return indexes into the compiler's stack, as well as helpers for accounting for the differences between these indexes and the runtime indexes. Change-Id: I58f0b50ad94b28a304e3372fd9731b6590b3fdb8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6340 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-nested-deferred-upvalue.nix')
0 files changed, 0 insertions, 0 deletions