diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-10-25T09·03-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-11-04T01·39+0000 |
commit | d8841376e733e53af234bd924d7841c34d9b0c61 (patch) | |
tree | 7ada7e2dc6d6314c0b5afaf2302353d5da0befd5 /tvix | |
parent | 1ad7e562b01d8999539ac9877325fe81a56a0eef (diff) |
fix(tvix_eval): {stack,local}_idx confusion r/5240
The variable name `local_idx` is used here for a StackIdx, which invites confusion. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I2e22db90acdc0d29586ee5b72ea18d42d93badcb Reviewed-on: https://cl.tvl.fyi/c/depot/+/7086 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/vm.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index d011f651b982..c9b96fa61c34 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -813,8 +813,8 @@ impl<'o> VM<'o> { ) -> EvalResult<()> { for _ in 0..count { match self.inc_ip() { - OpCode::DataLocalIdx(StackIdx(local_idx)) => { - let idx = self.frame().stack_offset + local_idx; + OpCode::DataLocalIdx(StackIdx(stack_idx)) => { + let idx = self.frame().stack_offset + stack_idx; let val = match self.stack.get(idx) { Some(val) => val.clone(), @@ -823,8 +823,8 @@ impl<'o> VM<'o> { msg: "upvalue to be captured was missing on stack", metadata: Some(Rc::new(json!({ "ip": format!("{:#x}", self.frame().ip.0 - 1), - "local_idx": local_idx, - "stack_idx": idx, + "stack_idx": stack_idx, + "absolute stack position": idx, }))), })) } |