about summary refs log tree commit diff
path: root/tvix/eval/src/vm.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-02T01·38+0300
committertazjin <tazjin@tvl.su>2022-09-08T07·59+0000
commit0d7ad5e6d1992d4f80f0ea08fee636b7e34eec59 (patch)
tree28474ff042e31b55d3c8698bbfa1d43e117c0282 /tvix/eval/src/vm.rs
parent5ee89bcf5ca3f0b0d3b809b01ac04bf38f51d7e4 (diff)
refactor(tvix/eval): pass a VM reference to builtins r/4744
This makes it possible for builtins to force values on their own,
without the VM having to apply a strictness mask to the arguments
first.

Change-Id: Ib49a94e56ca2a8d515c39647381ab55a727766e3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6411
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r--tvix/eval/src/vm.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 5fabdb491e..318fc726ab 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -418,7 +418,7 @@ impl VM {
 
                         Value::Builtin(builtin) => {
                             let arg = self.pop();
-                            let result = fallible!(self, builtin.apply(arg));
+                            let result = fallible!(self, builtin.apply(self, arg));
                             self.push(result);
                         }
                         _ => return Err(self.error(ErrorKind::NotCallable)),