implement __seq and __deepSeq
This commit is contained in:
@@ -248,6 +248,11 @@ impl<'gc> Value<'gc> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn to_bits(self) -> u64 {
|
||||
self.raw.to_bits()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn as_num(self) -> Option<NixNum> {
|
||||
if let Some(i) = self.as_inline::<i32>() {
|
||||
@@ -500,6 +505,12 @@ pub(crate) struct List<'gc> {
|
||||
}
|
||||
|
||||
impl<'gc> List<'gc> {
|
||||
pub(crate) fn new(mc: &Mutation<'gc>, data: SmallVec<[Value<'gc>; 4]>) -> Gc<'gc, Self> {
|
||||
Gc::new(mc, Self {
|
||||
inner: RefLock::new(data)
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn new_gc(mc: &Mutation<'gc>) -> Gc<'gc, Self> {
|
||||
Gc::new(mc, Self::default())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user