about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 4dd8fe4b50af..0e26dbc23b9a 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -885,7 +885,10 @@ impl Compiler<'_> {
         // If the function is not a closure, just emit it directly and
         // move on.
         if compiled.lambda.upvalue_count == 0 {
-            self.emit_constant_old(Value::Closure(Closure::new(Rc::new(compiled.lambda))));
+            self.emit_constant(
+                Value::Closure(Closure::new(Rc::new(compiled.lambda))),
+                &node,
+            );
             return;
         }
 
@@ -897,7 +900,7 @@ impl Compiler<'_> {
             .chunk()
             .push_constant(Value::Blueprint(Rc::new(compiled.lambda)));
 
-        self.push_op_old(OpCode::OpClosure(blueprint_idx));
+        self.push_op(OpCode::OpClosure(blueprint_idx), &node);
         self.emit_upvalue_data(slot, compiled.scope.upvalues);
     }