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

Method clear

Tools/cases_generator/stack.py:282–286  ·  view source on GitHub ↗

Flush to memory and clear variables stack

(self, out: CWriter)

Source from the content-addressed store, hash-verified

280 return Local.from_memory(var, self.base_offset)
281
282 def clear(self, out: CWriter) -> None:
283 "Flush to memory and clear variables stack"
284 self.flush(out)
285 self.variables = []
286 self.base_offset = self.logical_sp
287
288 def push(self, var: Local) -> None:
289 assert(var not in self.variables), var

Callers 3

popMethod · 0.95
exit_if_afterMethod · 0.45
sync_spMethod · 0.45

Calls 1

flushMethod · 0.95

Tested by

no test coverage detected