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

Function propagate_locations_in_block

crates/codegen/src/ir.rs:2680–2692  ·  view source on GitHub ↗
(
    block: &mut Block,
    location: SourceLocation,
    end_location: SourceLocation,
)

Source from the content-addressed store, hash-verified

2678}
2679
2680fn propagate_locations_in_block(
2681 block: &mut Block,
2682 location: SourceLocation,
2683 end_location: SourceLocation,
2684) {
2685 let mut prev_location = location;
2686 let mut prev_end_location = end_location;
2687 for instr in &mut block.instructions {
2688 maybe_propagate_location(instr, prev_location, prev_end_location);
2689 prev_location = instr.location;
2690 prev_end_location = instr.end_location;
2691 }
2692}
2693
2694fn compute_predecessors(blocks: &[Block]) -> Vec<u32> {
2695 let mut predecessors = vec![0u32; blocks.len()];

Callers 2

propagate_line_numbersFunction · 0.85

Calls 1

maybe_propagate_locationFunction · 0.85

Tested by

no test coverage detected