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

Method _body

Tools/jit/_optimizers.py:315–326  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

313 block = block.link
314
315 def _body(self) -> str:
316 lines = ["#" + line for line in self.text.splitlines()]
317 hot = True
318 for block in self._blocks():
319 if hot != block.hot:
320 hot = block.hot
321 # Make it easy to tell at a glance where cold code is:
322 lines.append(f"# JIT: {'HOT' if hot else 'COLD'} ".ljust(80, "#"))
323 lines.extend(block.noninstructions)
324 for inst in block.instructions:
325 lines.append(inst.text)
326 return "\n".join(lines)
327
328 def _predecessors(self, block: _Block) -> typing.Generator[_Block, None, None]:
329 # This is inefficient, but it's never wrong:

Callers 1

runMethod · 0.95

Calls 6

_blocksMethod · 0.95
splitlinesMethod · 0.45
appendMethod · 0.45
ljustMethod · 0.45
extendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected