MCPcopy Index your code
hub / github.com/RustPython/RustPython / iter_blocks

Function iter_blocks

crates/codegen/src/ir.rs:1862–1872  ·  view source on GitHub ↗
(blocks: &[Block])

Source from the content-addressed store, hash-verified

1860}
1861
1862fn iter_blocks(blocks: &[Block]) -> impl Iterator<Item = (BlockIdx, &Block)> + '_ {
1863 let mut next = BlockIdx(0);
1864 core::iter::from_fn(move || {
1865 if next == BlockIdx::NULL {
1866 return None;
1867 }
1868 let (idx, b) = (next, &blocks[next]);
1869 next = b.next;
1870 Some((idx, b))
1871 })
1872}
1873
1874/// Generate Python 3.11+ format linetable from source locations
1875fn generate_linetable(

Callers 3

finalize_codeMethod · 0.85
generate_exception_tableFunction · 0.85
push_cold_blocks_to_endFunction · 0.85

Calls 2

BlockIdxClass · 0.85
SomeClass · 0.50

Tested by

no test coverage detected