about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/compiler/mod.rs2
-rw-r--r--tvix/eval/src/opcode.rs2
-rw-r--r--tvix/eval/src/value/function.rs2
-rw-r--r--tvix/eval/src/vm.rs8
4 files changed, 7 insertions, 7 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index db6031e0a4f8..5be582fb281e 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -1031,7 +1031,7 @@ impl Compiler<'_> {
                         if slot == idx {
                             self.scope_mut().mark_must_thunk(slot);
                         }
-                        self.push_op(OpCode::DataLocalIdx(stack_idx), &upvalue.span);
+                        self.push_op(OpCode::DataStackIdx(stack_idx), &upvalue.span);
                     }
                 }
 
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs
index 9c7ccb8d19d0..e05e91087a6f 100644
--- a/tvix/eval/src/opcode.rs
+++ b/tvix/eval/src/opcode.rs
@@ -172,7 +172,7 @@ pub enum OpCode {
     //
     // It is illegal for a `Data*` opcode to appear anywhere else.
     /// Populate a static upvalue by copying from the stack immediately.
-    DataLocalIdx(StackIdx),
+    DataStackIdx(StackIdx),
     /// Populate a static upvalue of a thunk by copying it the stack, but do
     /// when the thunk is finalised (by OpFinalise) rather than immediately.
     DataDeferredLocal(StackIdx),
diff --git a/tvix/eval/src/value/function.rs b/tvix/eval/src/value/function.rs
index e543b1aafd44..c9664112f1cd 100644
--- a/tvix/eval/src/value/function.rs
+++ b/tvix/eval/src/value/function.rs
@@ -51,7 +51,7 @@ pub struct Lambda {
     /// Number of upvalues which the code in this Lambda closes
     /// over, and which need to be initialised at
     /// runtime.  Information about the variables is emitted using
-    /// data-carrying opcodes (see [`OpCode::DataLocalIdx`]).
+    /// data-carrying opcodes (see [`OpCode::DataStackIdx`]).
     pub(crate) upvalue_count: usize,
     pub(crate) formals: Option<Formals>,
 }
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index c9b96fa61c34..c67e9f6d8899 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -734,7 +734,7 @@ impl<'o> VM<'o> {
 
             // Data-carrying operands should never be executed,
             // that is a critical error in the VM.
-            OpCode::DataLocalIdx(_)
+            OpCode::DataStackIdx(_)
             | OpCode::DataDeferredLocal(_)
             | OpCode::DataUpvalueIdx(_)
             | OpCode::DataCaptureWith => {
@@ -813,7 +813,7 @@ impl<'o> VM<'o> {
     ) -> EvalResult<()> {
         for _ in 0..count {
             match self.inc_ip() {
-                OpCode::DataLocalIdx(StackIdx(stack_idx)) => {
+                OpCode::DataStackIdx(StackIdx(stack_idx)) => {
                     let idx = self.frame().stack_offset + stack_idx;
 
                     let val = match self.stack.get(idx) {
@@ -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),
-                                    "stack_idx": stack_idx,
-                                    "absolute stack position": idx,
+                                    "stack_idx(relative)": stack_idx,
+                                    "stack_idx(absolute)": idx,
                                 }))),
                             }))
                         }