refactor(tvix/eval): simplify thunk representations

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>
This commit is contained in:
Vincent Ambo 2022-08-29 18:03:24 +03:00 committed by tazjin
parent 28a9847c65
commit 8033a7abae
2 changed files with 8 additions and 8 deletions

View file

@ -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;
}