MCPcopy Index your code
hub / github.com/python/cpython / generate_opmap

Function generate_opmap

Tools/cases_generator/py_metadata_generator.py:63–69  ·  view source on GitHub ↗
(analysis: Analysis, out: CWriter)

Source from the content-addressed store, hash-verified

61
62
63def generate_opmap(analysis: Analysis, out: CWriter) -> None:
64 specialized = get_specialized(analysis)
65 out.emit("opmap = frozendict(\n")
66 for inst, op in analysis.opmap.items():
67 if inst not in specialized:
68 out.emit(f"{inst}={analysis.opmap[inst]},\n")
69 out.emit(")\n\n")
70
71
72def generate_py_metadata(

Callers 1

generate_py_metadataFunction · 0.85

Calls 3

get_specializedFunction · 0.85
emitMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…