refactor(tvix/eval): remove VM argument from suspended native thunks

Because they do not use it, and it can not be passed with the coming
generator refactoring.

Change-Id: I0d96f2357a7ee79cd8a0f401583d4286230d4a6b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8146
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
Vincent Ambo 2023-02-26 18:40:52 +03:00 committed by tazjin
parent 38fd3cb292
commit bfb787a6c5
3 changed files with 7 additions and 13 deletions

View file

@ -1329,7 +1329,7 @@ fn compile_src_builtin(
let file = source.add_file(format!("<src-builtins/{}.nix>", name), code.to_string());
let weak = weak.clone();
Value::Thunk(Thunk::new_suspended_native(Box::new(move |_| {
Value::Thunk(Thunk::new_suspended_native(Box::new(move || {
let result = compile(
&parsed.tree().expr().unwrap(),
None,
@ -1390,7 +1390,7 @@ pub fn prepare_globals(
let weak_globals = weak.clone();
builtins.insert(
"builtins",
Value::Thunk(Thunk::new_suspended_native(Box::new(move |_| {
Value::Thunk(Thunk::new_suspended_native(Box::new(move || {
Ok(weak_globals
.upgrade()
.unwrap()