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

Method pad

Tools/jit/_stencils.py:212–218  ·  view source on GitHub ↗

Pad the stencil to the given alignment.

(self, alignment: int)

Source from the content-addressed store, hash-verified

210 disassembly: list[str] = dataclasses.field(default_factory=list, init=False)
211
212 def pad(self, alignment: int) -> None:
213 """Pad the stencil to the given alignment."""
214 offset = len(self.body)
215 padding = -offset % alignment
216 if padding:
217 self.disassembly.append(f"{offset:x}: {' '.join(['00'] * padding)}")
218 self.body.extend([0] * padding)
219
220
221@dataclasses.dataclass

Callers 1

process_relocationsMethod · 0.80

Calls 3

appendMethod · 0.45
joinMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected