| 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: |