MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / update_max

Method update_max

cranelift/bitset/src/compound.rs:382–392  ·  view source on GitHub ↗

Update the `self.max` field, based on the old word index of `self.max`.

(&mut self, word_of_old_max: usize)

Source from the content-addressed store, hash-verified

380
381 /// Update the `self.max` field, based on the old word index of `self.max`.
382 fn update_max(&mut self, word_of_old_max: usize) {
383 self.max = self.elems[0..word_of_old_max + 1]
384 .iter()
385 .enumerate()
386 .rev()
387 .filter_map(|(word, sub)| {
388 let bit = sub.max()?;
389 Some(u32::try_from(Self::elem(word, bit)).unwrap())
390 })
391 .next();
392 }
393
394 /// Get the largest value in this set, or `None` if this set is empty.
395 ///

Callers 1

removeMethod · 0.80

Calls 4

nextMethod · 0.45
iterMethod · 0.45
maxMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected