refactor primops
This commit is contained in:
@@ -51,13 +51,17 @@ impl<'gc> crate::Vm<'gc> {
|
||||
return self.call(reader, mc, arg, resume_pc);
|
||||
}
|
||||
ThunkState::Blackhole => {
|
||||
return self.finish_err(Error::eval_error("infinite recursion encountered"));
|
||||
return self
|
||||
.finish_err(Error::eval_error("infinite recursion encountered"));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(val) = namespace.as_gc::<AttrSet>().and_then(|attrs| attrs.lookup(name)) {
|
||||
if let Some(val) = namespace
|
||||
.as_gc::<AttrSet>()
|
||||
.and_then(|attrs| attrs.lookup(name))
|
||||
{
|
||||
self.replace(0, val);
|
||||
} else if counter + 1 == n as i32 {
|
||||
return self.finish_err(Error::eval_error(format!(
|
||||
|
||||
Reference in New Issue
Block a user