feat(tvix/eval): unthunk empty lists and attribute sets
Change-Id: Ie66cb1b163a544d45d113fd0f866286f230b0188 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7960 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
5d3fb33baa
commit
22776280b5
2 changed files with 8 additions and 0 deletions
|
@ -658,6 +658,10 @@ impl Compiler<'_> {
|
|||
if kind.is_attrs() {
|
||||
self.push_op(OpCode::OpAttrs(Count(count)), node);
|
||||
}
|
||||
|
||||
if count == 0 {
|
||||
self.unthunk();
|
||||
}
|
||||
}
|
||||
|
||||
/// Compile a standard `let ...; in ...` expression.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue