fix(tvix_eval): {stack,local}_idx confusion
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
This commit is contained in:
parent
1ad7e562b0
commit
d8841376e7
1 changed files with 4 additions and 4 deletions
|
|
@ -813,8 +813,8 @@ impl<'o> VM<'o> {
|
||||||
) -> EvalResult<()> {
|
) -> EvalResult<()> {
|
||||||
for _ in 0..count {
|
for _ in 0..count {
|
||||||
match self.inc_ip() {
|
match self.inc_ip() {
|
||||||
OpCode::DataLocalIdx(StackIdx(local_idx)) => {
|
OpCode::DataLocalIdx(StackIdx(stack_idx)) => {
|
||||||
let idx = self.frame().stack_offset + local_idx;
|
let idx = self.frame().stack_offset + stack_idx;
|
||||||
|
|
||||||
let val = match self.stack.get(idx) {
|
let val = match self.stack.get(idx) {
|
||||||
Some(val) => val.clone(),
|
Some(val) => val.clone(),
|
||||||
|
|
@ -823,8 +823,8 @@ impl<'o> VM<'o> {
|
||||||
msg: "upvalue to be captured was missing on stack",
|
msg: "upvalue to be captured was missing on stack",
|
||||||
metadata: Some(Rc::new(json!({
|
metadata: Some(Rc::new(json!({
|
||||||
"ip": format!("{:#x}", self.frame().ip.0 - 1),
|
"ip": format!("{:#x}", self.frame().ip.0 - 1),
|
||||||
"local_idx": local_idx,
|
"stack_idx": stack_idx,
|
||||||
"stack_idx": idx,
|
"absolute stack position": idx,
|
||||||
}))),
|
}))),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue