about summary refs log tree commit diff
path: root/tvix/eval/src/compiler
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-29T15·03+0300
committertazjin <tazjin@tvl.su>2022-09-06T14·58+0000
commit8033a7abaea3c44a16eb6d3db477a89c2fa88a82 (patch)
treefe25f2decdae42e561dec6257287129e26812254 /tvix/eval/src/compiler
parent28a9847c65e316fdb97c1bcb79f48cb0114724af (diff)
refactor(tvix/eval): simplify thunk representations r/4676
For now, do not distinguish between closing and non-closing thunks, it
will make the initial implementation easier. See Knuth etc.

Change-Id: I0bd51e0f89f2c77e90bac63b507e5027b649e3d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6346
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/compiler')
-rw-r--r--tvix/eval/src/compiler/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index a1f11501a449..2ae010ada6ed 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -877,7 +877,7 @@ impl Compiler {
         // Emit the thunk directly if it does not close over the
         // environment.
         if thunk.lambda.upvalue_count == 0 {
-            self.emit_constant(Value::Thunk(Thunk::new(thunk.lambda)));
+            self.emit_constant(Value::Thunk(Thunk::new(Rc::new(thunk.lambda))));
             return;
         }