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

Method current_crit_key

cranelift/bforest/src/path.rs:399–405  ·  view source on GitHub ↗

Get the critical key for the current node at `level`. The critical key is less than or equal to all keys in the sub-tree at `level` and greater than all keys to the left of the current node at `level`. The left-most node at any level does not have a critical key.

(&self, level: usize, pool: &NodePool<F>)

Source from the content-addressed store, hash-verified

397 ///
398 /// The left-most node at any level does not have a critical key.
399 fn current_crit_key(&self, level: usize, pool: &NodePool<F>) -> Option<F::Key> {
400 // Find the level containing the critical key for the current node.
401 self.left_sibling_branch_level(level).map(|bl| {
402 let (keys, _) = pool[self.node[bl]].unwrap_inner();
403 keys[usize::from(self.entry[bl]) - 1]
404 })
405 }
406
407 /// Update the critical key after removing the front entry of the leaf node.
408 fn update_crit_key(&mut self, pool: &mut NodePool<F>) {

Callers 1

underflowed_nodeMethod · 0.80

Calls 4

fromFunction · 0.85
unwrap_innerMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected