diff options
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index d4eb0657251a..1aaba9b0573e 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -435,6 +435,19 @@ impl VM { } } + OpCode::OpFinalise(StackIdx(idx)) => { + match &self.stack[self.frame().stack_offset + idx] { + Value::Closure(closure) => closure + .resolve_deferred_upvalues(&self.stack[self.frame().stack_offset..]), + + v => { + #[cfg(feature = "disassembler")] + drop(tracer); + panic!("compiler error: invalid finaliser value: {}", v); + } + } + } + // Data-carrying operands should never be executed, // that is a critical error in the VM. OpCode::DataLocalIdx(_) |