MCPcopy Index your code
hub / github.com/python/mypy / insert_uninit_checks

Function insert_uninit_checks

mypyc/transform/uninit.py:26–36  ·  view source on GitHub ↗
(ir: FuncIR, strict_traceback_checks: bool)

Source from the content-addressed store, hash-verified

24
25
26def insert_uninit_checks(ir: FuncIR, strict_traceback_checks: bool) -> None:
27 # Remove dead blocks from the CFG, which helps avoid spurious
28 # checks due to unused error handling blocks.
29 cleanup_cfg(ir.blocks)
30
31 cfg = get_cfg(ir.blocks)
32 must_defined = analyze_must_defined_regs(
33 ir.blocks, cfg, set(ir.arg_regs), all_values(ir.arg_regs, ir.blocks)
34 )
35
36 ir.blocks = split_blocks_at_uninits(ir.blocks, must_defined.before, strict_traceback_checks)
37
38
39def split_blocks_at_uninits(

Callers 5

run_caseMethod · 0.90
run_caseMethod · 0.90
run_caseMethod · 0.90
run_caseMethod · 0.90
compile_scc_to_irFunction · 0.90

Calls 6

cleanup_cfgFunction · 0.90
get_cfgFunction · 0.90
all_valuesFunction · 0.90
setClass · 0.85
split_blocks_at_uninitsFunction · 0.85

Tested by 4

run_caseMethod · 0.72
run_caseMethod · 0.72
run_caseMethod · 0.72
run_caseMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…