feat: SCC analysis (thunk capture WIP)

This commit is contained in:
2025-06-17 11:53:54 +08:00
parent b2d2490327
commit 7f6848c9e5
19 changed files with 501 additions and 458 deletions

View File

@@ -10,7 +10,7 @@ use crate::ty::public as p;
use super::Value;
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub struct List {
data: EcoVec<Value>,
}
@@ -57,15 +57,6 @@ impl List {
}
}
pub fn capture(&mut self, env: &Weak<VmEnv>) {
self.data.iter().for_each(|v| {
if let Value::Thunk(ref thunk) = v.clone() {
todo!()
// thunk.capture_env_weak(env.clone());
}
})
}
pub fn into_inner(self) -> EcoVec<Value> {
self.data
}