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

Method normalize

cranelift/bforest/src/path.rs:649–656  ·  view source on GitHub ↗

Normalize the path position such that it is either pointing at a real entry or `size=0` indicating "off-the-end".

(&mut self, pool: &NodePool<F>)

Source from the content-addressed store, hash-verified

647 /// Normalize the path position such that it is either pointing at a real entry or `size=0`
648 /// indicating "off-the-end".
649 pub fn normalize(&mut self, pool: &NodePool<F>) {
650 if let Some((leaf, entry)) = self.leaf_pos() {
651 if entry >= pool[leaf].entries() {
652 let leaf_level = self.size - 1;
653 self.next_node(leaf_level, pool);
654 }
655 }
656 }
657}
658
659#[cfg(test)]

Callers 2

gotoMethod · 0.80
gotoMethod · 0.80

Calls 3

leaf_posMethod · 0.80
next_nodeMethod · 0.80
entriesMethod · 0.45

Tested by

no test coverage detected