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

Method _save_physical_sp

Tools/cases_generator/stack.py:301–308  ·  view source on GitHub ↗
(self, out: CWriter)

Source from the content-addressed store, hash-verified

299 out.emit(f"stack_pointer[{stack_offset.to_c()}] = {var.name};\n")
300
301 def _save_physical_sp(self, out: CWriter) -> None:
302 if self.physical_sp != self.logical_sp:
303 diff = self.logical_sp - self.physical_sp
304 out.start_line()
305 out.emit(f"stack_pointer += {diff.to_c()};\n")
306 out.emit(f"ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);\n")
307 self.physical_sp = self.logical_sp
308 self._print(out)
309
310 def save_variables(self, out: CWriter) -> None:
311 out.start_line()

Callers 1

flushMethod · 0.95

Calls 4

_printMethod · 0.95
start_lineMethod · 0.80
to_cMethod · 0.80
emitMethod · 0.45

Tested by

no test coverage detected