From 6c1948a71a7a52978a3ded23e242d664a5f097de Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 28 Aug 2022 16:50:46 +0300 Subject: feat(tvix/eval): detect deferred upvalue capturing Uses the threaded through slot offset to determine whether initialisation of a captured local upvalue must be defered to a later point where all values of a scope are available. This adds a new data representation to the opcode for this situation, but the equivalent runtime handling is not yet implemented. This is in part because there is more compiler machinery needed to find the resolution point. Change-Id: Ifd0c393f76abfe6e2d91483faf0f58947ab1dedc Reviewed-on: https://cl.tvl.fyi/c/depot/+/6329 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/opcode.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tvix/eval/src/opcode.rs') diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs index 5f1f33f2b3e5..12a76d368e4f 100644 --- a/tvix/eval/src/opcode.rs +++ b/tvix/eval/src/opcode.rs @@ -115,6 +115,7 @@ pub enum OpCode { // The VM skips over these by advancing the instruction pointer // according to the count. DataLocalIdx(StackIdx), + DataDeferredLocal(StackIdx), DataUpvalueIdx(UpvalueIdx), DataDynamicIdx(ConstantIdx), DataDynamicAncestor(UpvalueIdx), -- cgit 1.4.1