about summary refs log tree commit diff
path: root/.nixery
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-28T16·38+0300
committertazjin <tazjin@tvl.su>2022-09-06T14·58+0000
commit24811d76558a73b3d6f615d458aded0b9c690840 (patch)
treed437881bbdb2ceb6cd50febf9164fa506852802a /.nixery
parent68aad6d4cf5c653154396356366f09dacea73495 (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 '.nixery')
0 files changed, 0 insertions, 0 deletions