Remove pinned VRegs. (#108)

This commit is contained in:
Chris Fallin
2023-01-24 17:31:41 -08:00
committed by GitHub
parent e41c6140de
commit e09f6519a6
6 changed files with 222 additions and 576 deletions

View File

@@ -140,6 +140,13 @@ impl AdaptiveMap {
&Self::Large(ref map) => AdaptiveMapIter::Large(map.iter()),
}
}
fn is_empty(&self) -> bool {
match self {
AdaptiveMap::Small { values, .. } => values.iter().all(|&value| value == 0),
AdaptiveMap::Large(m) => m.values().all(|&value| value == 0),
}
}
}
enum AdaptiveMapIter<'a> {
@@ -268,6 +275,11 @@ impl IndexSet {
_ => false,
}
}
/// Is the set empty?
pub(crate) fn is_empty(&self) -> bool {
self.elems.is_empty()
}
}
pub struct SetBitsIter(u64);