diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-06T20·13+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-11T12·26+0000 |
commit | 07ea30370e887b16228af0dccbe126010cce9e25 (patch) | |
tree | ad5c3920c489dc0720ea778a63d7bb971889a886 /tvix/eval/src/opcode.rs | |
parent | d75b207a63492cb120bcdd918fcc4178dca2bc36 (diff) |
refactor(tvix/eval): capture entire with_stack in upvalues r/4801
This completely rewrites the handling of "dynamic upvalues" to, instead of resolving them at thunk/closure instantiation time (which forces some values too early), capture the entire with stack of parent contexts if it exists. There are a couple of things in here that could be written more efficiently, but I'm first working through this to get to a bug related to with + recursion and the code complexity of some of the optimisations is distracting. Change-Id: Ia538e06c9146e3bf8decb9adf02dd726d2c651cf Reviewed-on: https://cl.tvl.fyi/c/depot/+/6486 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/opcode.rs')
-rw-r--r-- | tvix/eval/src/opcode.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs index 42b8760a1ed4..27fceaf9677c 100644 --- a/tvix/eval/src/opcode.rs +++ b/tvix/eval/src/opcode.rs @@ -125,6 +125,5 @@ pub enum OpCode { DataLocalIdx(StackIdx), DataDeferredLocal(StackIdx), DataUpvalueIdx(UpvalueIdx), - DataDynamicIdx(ConstantIdx), - DataDynamicAncestor(UpvalueIdx), + DataCaptureWith, } |