feat: gc (does compile, but WIP)

This commit is contained in:
2025-05-27 21:08:59 +08:00
parent 319c12c1f4
commit c3ace28af1
20 changed files with 696 additions and 575 deletions

View File

@@ -20,8 +20,8 @@ pub struct Stack<T, const CAP: usize> {
top: usize,
}
unsafe impl<T: Collect, const CAP: usize> Collect for Stack<T, CAP> {
fn trace(&self, cc: &gc_arena::Collection) {
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);
}