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

Function format_registers

mypyc/ir/pprint.py:379–391  ·  view source on GitHub ↗
(func_ir: FuncIR, names: dict[Value, str])

Source from the content-addressed store, hash-verified

377
378
379def format_registers(func_ir: FuncIR, names: dict[Value, str]) -> list[str]:
380 result = []
381 i = 0
382 regs = all_values_full(func_ir.arg_regs, func_ir.blocks)
383 while i < len(regs):
384 i0 = i
385 group = [names[regs[i0]]]
386 while i + 1 < len(regs) and regs[i + 1].type == regs[i0].type:
387 i += 1
388 group.append(names[regs[i]])
389 i += 1
390 result.append("{} :: {}".format(", ".join(group), regs[i0].type))
391 return result
392
393
394def format_blocks(

Callers 1

format_funcFunction · 0.85

Calls 5

all_values_fullFunction · 0.90
lenFunction · 0.85
appendMethod · 0.80
formatMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…