refactor primops

This commit is contained in:
2026-05-08 17:46:23 +08:00
parent b3e6591809
commit 62d65b2e5f
14 changed files with 163 additions and 133 deletions
+6 -2
View File
@@ -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!(