feat(gc): WIP

This commit is contained in:
2025-06-02 12:00:38 +08:00
parent 20b2b6f1ef
commit d3442e87e7
7 changed files with 72 additions and 77 deletions

View File

@@ -7,19 +7,12 @@ use crate::env::VmEnv;
use super::Value;
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Collect)]
#[collect(no_drop)]
pub struct List<'gc> {
data: Vec<Value<'gc>>,
}
unsafe impl<'gc> Collect<'gc> for List<'gc> {
fn trace<Tr: gc_arena::collect::Trace<'gc>>(&self, cc: &mut Tr) {
for v in self.data.iter() {
v.trace(cc);
}
}
}
impl<'gc> List<'gc> {
pub fn new() -> Self {
List {