Add explicit managed traits and inherited method arity contracts

This commit is contained in:
2026-10-21 21:34:46 +08:00
parent b7daabdaad
commit eb60212428
16 changed files with 454 additions and 16 deletions
+10
View File
@@ -69,6 +69,16 @@ impl Heap {
})
}
pub(crate) fn live_references(&self) -> impl Iterator<Item = ObjectRef> + '_ {
self.slots.iter().enumerate().filter_map(|(index, slot)| {
slot.object.as_ref().map(|_| ObjectRef {
heap_id: self.id,
index,
generation: slot.generation,
})
})
}
pub(crate) fn begin_read_only(&mut self) -> usize {
let protected = self
.slots