feat: get rid of gc and cyclic thunk

This commit is contained in:
2025-06-05 16:43:47 +08:00
parent 51f8df9cca
commit 484cfa4610
17 changed files with 342 additions and 595 deletions

View File

@@ -1,8 +1,6 @@
use std::mem::{MaybeUninit, replace, transmute};
use std::ops::Deref;
use gc_arena::Collect;
use crate::error::*;
macro_rules! into {
@@ -20,13 +18,6 @@ pub struct Stack<T, const CAP: usize> {
top: usize,
}
unsafe impl<'gc, T: Collect<'gc>, const CAP: usize> Collect<'gc> for Stack<T, CAP> {
fn trace<Tr: gc_arena::collect::Trace<'gc>>(&self, cc: &mut Tr) {
for v in self.iter() {
v.trace(cc);
}
}
}
impl<T, const CAP: usize> Default for Stack<T, CAP> {
fn default() -> Self {