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

Function uses_this

Tools/cases_generator/tier1_generator.py:119–137  ·  view source on GitHub ↗
(inst: Instruction)

Source from the content-addressed store, hash-verified

117
118
119def uses_this(inst: Instruction) -> bool:
120 if inst.properties.needs_this:
121 return True
122 for uop in inst.parts:
123 if not isinstance(uop, Uop):
124 continue
125 for cache in uop.caches:
126 if cache.name != "unused":
127 return True
128 # Can't be merged into the loop above, because
129 # this must strictly be performed at the end.
130 for uop in inst.parts:
131 if not isinstance(uop, Uop):
132 continue
133 for tkn in uop.body.tokens():
134 if (tkn.kind == "IDENTIFIER"
135 and (tkn.text in {"DEOPT_IF", "EXIT_IF", "AT_END_EXIT_IF"})):
136 return True
137 return False
138
139
140UNKNOWN_OPCODE_HANDLER ="""\

Callers 1

generate_tier1_casesFunction · 0.85

Calls 1

tokensMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…