fix(tvix/eval): account for stack offset when pushing a with scope

Change-Id: I4b98eaea3ed5059c29938a117a9d59499a0bb95d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6318
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-08-27 23:30:26 +03:00 committed by tazjin
parent ae531a2245
commit e46a2ce3ef

View file

@ -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();
}