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

Function after_branch_increfs

mypyc/transform/refcount.py:231–245  ·  view source on GitHub ↗
(
    label: BasicBlock,
    pre_live: AnalysisDict[Value],
    pre_borrow: AnalysisDict[Value],
    source_borrowed: set[Value],
    ordering: dict[Value, int],
)

Source from the content-addressed store, hash-verified

229
230
231def after_branch_increfs(
232 label: BasicBlock,
233 pre_live: AnalysisDict[Value],
234 pre_borrow: AnalysisDict[Value],
235 source_borrowed: set[Value],
236 ordering: dict[Value, int],
237) -> tuple[Value, ...]:
238 target_pre_live = pre_live[label, 0]
239 target_borrowed = pre_borrow[label, 0]
240 incref = (source_borrowed - target_borrowed) & target_pre_live
241 if incref:
242 return tuple(
243 reg for reg in sorted(incref, key=lambda r: ordering[r]) if reg.type.is_refcounted
244 )
245 return ()
246
247
248def add_block(

Callers 1

Calls 2

tupleClass · 0.85
sortedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…