diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-12-11T09·04-0800 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-12T14·36+0000 |
commit | 370137974526ef9af1f0d3496d17e4232e3babfe (patch) | |
tree | 338546dc311f221db73e191953dfb1af2ddb2d60 /tvix/eval/src/vm/mod.rs | |
parent | c956138ee6c158c12f5c5eb3568aea1b0aea7494 (diff) |
feat(tvix/eval): nonrecursive deep_force() r/7175
This commit implements deep_force() nonrecursively, by maintaining an explicit stack rather than using the call stack for recursion. As an added bonus, we don't need to pass around the SharedThunkSet anymore, and can in fact completely eliminate SharedThunkSet. Change-Id: I7c4f59f37834d451a28bf6be317eb0a90eac4ee6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10252 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: Adam Joseph <adam@westernsemico.com>
Diffstat (limited to 'tvix/eval/src/vm/mod.rs')
-rw-r--r-- | tvix/eval/src/vm/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/vm/mod.rs b/tvix/eval/src/vm/mod.rs index e11b3b5d13c4..5ab095b22056 100644 --- a/tvix/eval/src/vm/mod.rs +++ b/tvix/eval/src/vm/mod.rs @@ -30,7 +30,7 @@ use crate::{ upvalues::Upvalues, value::{ Builtin, BuiltinResult, Closure, CoercionKind, Lambda, NixAttrs, NixList, PointerEquality, - SharedThunkSet, Thunk, Value, + Thunk, Value, }, vm::generators::GenCo, warnings::{EvalWarning, WarningKind}, @@ -1202,7 +1202,7 @@ pub struct RuntimeResult { /// before returning. async fn final_deep_force(co: GenCo) -> Result<Value, ErrorKind> { let value = generators::request_stack_pop(&co).await; - Ok(generators::request_deep_force(&co, value, SharedThunkSet::default()).await) + Ok(generators::request_deep_force(&co, value).await) } pub fn run_lambda( |