about summary refs log tree commit diff
path: root/tvix/eval/src/vm.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-26T18·48+0300
committertazjin <tazjin@tvl.su>2022-09-03T21·55+0000
commit1163ef3e413d239282b8a5fc24b708ee62c6f6a7 (patch)
tree21f1085fdd7095c54a55059d7b7a7b2f9f1139a7 /tvix/eval/src/vm.rs
parent2f93ed297e3cef8486e9160f5d3d68be1939d7d5 (diff)
feat(tvix/eval): implement compilation of upvalue access r/4623
This adds a new upvalue tracking structure in the compiler to resolve
upvalues and track their positions within a function when compiling a
closure.

The compiler will emit runtime upvalue access instructions after this
commit, but the creation of the runtime closure object etc. is not yet
wired up.

Change-Id: Ib0c2c25f686bfd45f797c528753068858e3a770d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6289
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r--tvix/eval/src/vm.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 85f81bac6e..1c7772f2a7 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -366,6 +366,8 @@ impl VM {
                         _ => return Err(ErrorKind::NotCallable.into()),
                     };
                 }
+
+                OpCode::OpGetUpvalue(_) => todo!("getting upvalues"),
             }
 
             #[cfg(feature = "disassembler")]