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

Method next

cranelift/codegen/src/egraph/mod.rs:64–76  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

62 type Item = Block;
63
64 fn next(&mut self) -> Option<Block> {
65 let block = self.stack.pop()?;
66
67 // Collect children into `self.children`, reusing the allocation.
68 self.children.clear();
69 self.children.extend(self.domtree.children(block));
70
71 // Push in reverse so that the first child ends up on top of the stack
72 // and is visited first.
73 self.stack.extend(self.children.iter().rev().copied());
74
75 Some(block)
76 }
77}
78
79/// Pass over a Function that does the whole aegraph thing.

Callers

nothing calls this directly

Calls 6

childrenMethod · 0.80
copiedMethod · 0.80
popMethod · 0.45
clearMethod · 0.45
extendMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected