feat: less gc (WIP)
This commit is contained in:
@@ -12,12 +12,17 @@ use super::super::public as p;
|
||||
use super::Value;
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Constructor, Clone, PartialEq, Collect)]
|
||||
#[collect(no_drop)]
|
||||
#[derive(Constructor, Clone, PartialEq)]
|
||||
pub struct AttrSet<'gc> {
|
||||
data: HashMap<usize, Value<'gc>>,
|
||||
}
|
||||
|
||||
unsafe impl<'gc> Collect<'gc> for AttrSet<'gc> {
|
||||
fn trace<T: gc_arena::collect::Trace<'gc>>(&self, cc: &mut T) {
|
||||
self.data.trace(cc);
|
||||
}
|
||||
}
|
||||
|
||||
impl<'gc> From<HashMap<usize, Value<'gc>>> for AttrSet<'gc> {
|
||||
fn from(data: HashMap<usize, Value<'gc>>) -> Self {
|
||||
Self { data }
|
||||
|
||||
Reference in New Issue
Block a user