feat(tvix/eval): nonrecursive deep_force()
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>
This commit is contained in:
parent
c956138ee6
commit
3701379745
5 changed files with 83 additions and 81 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue