about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-01-29T21·45+0300
committertazjin <tazjin@tvl.su>2023-05-25T11·28+0000
commit22776280b59f1efa0b63bd7efa6612a3827f8c65 (patch)
tree166d4b29bb83bf1835ff688dc72ef6ee9abebaf4 /tvix/eval/src/compiler/mod.rs
parent5d3fb33baa8da6bb8cfbd078e2b295d773a721ba (diff)
feat(tvix/eval): unthunk empty lists and attribute sets r/6205
Change-Id: Ie66cb1b163a544d45d113fd0f866286f230b0188
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7960
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index bfb823b673..c7061c77a0 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -592,6 +592,10 @@ impl Compiler<'_> {
             self.scope_mut().mark_initialised(item_slot);
         }
 
+        if count == 0 {
+            self.unthunk();
+        }
+
         self.push_op(OpCode::OpList(Count(count)), node);
         self.scope_mut().end_scope();
     }