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

Method _insert_continue_label

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

Source from the content-addressed store, hash-verified

332 yield pre
333
334 def _insert_continue_label(self) -> None:
335 # Find the block with the last instruction:
336 for end in reversed(list(self._blocks())):
337 if end.instructions:
338 break
339 # Before:
340 # jmp FOO
341 # After:
342 # jmp FOO
343 # _JIT_CONTINUE:
344 # This lets the assembler encode _JIT_CONTINUE jumps at build time!
345 continuation = self._lookup_label(f"{self.label_prefix}_JIT_CONTINUE")
346 assert continuation.label
347 continuation.noninstructions.append(f"{continuation.label}:")
348 end.link, continuation.link = continuation, end.link
349
350 def _mark_hot_blocks(self) -> None:
351 # Start with the last block, and perform a DFS to find all blocks that

Callers 1

runMethod · 0.95

Calls 4

_blocksMethod · 0.95
_lookup_labelMethod · 0.95
listClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected