feat(tvix/eval): implement OpForce in VM

This operation forces the evaluation of a thunk.

There is some potential here for making an implementation that avoids
some copies, but the thunk machinery is tricky to get right so the
first priority is to make sure it is correct by keeping the
implementation simple.

Change-Id: Ib381455b02f42ded717faff63f55afed4c8fb7e3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6352
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-08-29 18:33:02 +03:00 committed by tazjin
parent db9cb70d5d
commit 9a783e50a4
4 changed files with 46 additions and 2 deletions

View file

@ -38,6 +38,9 @@ pub enum ErrorKind {
// Attempt to call something that is not callable.
NotCallable,
// Infinite recursion encountered while forcing thunks.
InfiniteRecursion,
ParseErrors(Vec<rnix::parser::ParseError>),
AssertionFailed,