MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / union

Method union

src/entity/set.rs:115–125  ·  view source on GitHub ↗
(&mut self, other: &Self)

Source from the content-addressed store, hash-verified

113 #[inline]
114 #[track_caller]
115 pub fn union(&mut self, other: &Self) -> bool {
116 debug_assert!(self.storage.len() >= other.storage.len());
117
118 let mut changed = false;
119 for (word, &other_word) in self.storage.iter_mut().zip(&other.storage) {
120 let old_word = *word;
121 *word |= other_word;
122 changed |= *word != old_word;
123 }
124 changed
125 }
126
127 /// Removes all elements from the set and resizes it to be large enough to
128 /// hold entity references with an index below `max_index`.

Callers 1

propagate_to_predsMethod · 0.80

Calls 1

iter_mutMethod · 0.45

Tested by

no test coverage detected