feat(vm): threaded VM
This commit is contained in:
+5
-5
@@ -263,11 +263,11 @@ impl<'gc> Value<'gc> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn restrict(self) -> Option<StrictValue<'gc>> {
|
||||
if !self.is::<Thunk<'gc>>() {
|
||||
Some(StrictValue(self))
|
||||
pub(crate) fn restrict(self) -> Result<StrictValue<'gc>, Gc<'gc, Thunk<'gc>>> {
|
||||
if let Some(thunk) = self.as_gc::<Thunk<'gc>>() {
|
||||
Err(thunk)
|
||||
} else {
|
||||
None
|
||||
Ok(StrictValue(self))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -462,7 +462,7 @@ pub(crate) enum ThunkState<'gc> {
|
||||
arg: Value<'gc>,
|
||||
},
|
||||
Blackhole,
|
||||
Evaluated(Value<'gc>),
|
||||
Evaluated(StrictValue<'gc>),
|
||||
}
|
||||
|
||||
#[derive(Collect, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user