diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-27T20·30+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-06T07·29+0000 |
commit | e46a2ce3efd085d6e4a899d9dbc225c09c3ffd16 (patch) | |
tree | 2faacf9bd060d7bf38f30d220c4f7d6b2b5c711e /tvix/eval/src/vm.rs | |
parent | ae531a2245e83d44ce58ba6c588713265984dbbf (diff) |
fix(tvix/eval): account for stack offset when pushing a `with` scope r/4654
Change-Id: I4b98eaea3ed5059c29938a117a9d59499a0bb95d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6318 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 5b6536e98664..23d9c3555153 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -323,7 +323,10 @@ impl VM { self.push(self.stack[idx].clone()); } - OpCode::OpPushWith(StackIdx(idx)) => self.with_stack.push(idx), + OpCode::OpPushWith(StackIdx(idx)) => { + self.with_stack.push(self.frame().stack_offset + idx) + } + OpCode::OpPopWith => { self.with_stack.pop(); } |