From d1798444bec692a608aa93605cbe449d985c3e16 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 28 Aug 2022 23:53:20 +0300 Subject: feat(tvix/eval): Add Compiler::thunk method for emitting thunks The logic in this method is *very* similar to `compile_lambda`. It is intended to be called around any expression that should be thunked (such as function applications, attribute set values, etc.). Change-Id: Idfbb2daa9f4b735095378fb9c39a2fd07c8cff91 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6344 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/vm.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tvix/eval/src/vm.rs') diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 1aaba9b057..b363522994 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -435,6 +435,8 @@ impl VM { } } + OpCode::OpThunk(_idx) => todo!("runtime thunk construction"), + OpCode::OpFinalise(StackIdx(idx)) => { match &self.stack[self.frame().stack_offset + idx] { Value::Closure(closure) => closure -- cgit 1.4.1