about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-03T01·26+0300
committertazjin <tazjin@tvl.su>2022-09-08T20·17+0000
commite129ce15d766d95ac2eb91c9e58520d88f16d7fc (patch)
tree30901bbcb07c9cd621c783b8c419f1e05b7b4ba6 /tvix/eval/src
parent678533bfc487dddfc4a2ad87b307159af952a225 (diff)
feat(tvix/eval): thunk creation of lists r/4765
Change-Id: I84b68c5d002ec613d278315bbf49e9839f0fe8e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6432
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/compiler/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 269604a859bd..f40d3855f7fb 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -159,7 +159,9 @@ impl Compiler<'_> {
             ast::Expr::UnaryOp(op) => self.compile_unary_op(slot, op),
             ast::Expr::BinOp(op) => self.compile_binop(slot, op),
             ast::Expr::HasAttr(has_attr) => self.compile_has_attr(slot, has_attr),
-            ast::Expr::List(list) => self.compile_list(slot, list),
+            ast::Expr::List(list) => {
+                self.thunk(slot, &list, move |c, l, s| c.compile_list(s, l.clone()))
+            }
             ast::Expr::AttrSet(attrs) => self.thunk(slot, &attrs, move |c, a, s| {
                 c.compile_attr_set(s, a.clone())
             }),