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

Method stackref_kill

Tools/cases_generator/generators_common.py:363–380  ·  view source on GitHub ↗
(
        self,
        name: Token,
        storage: Storage,
        escapes: bool
    )

Source from the content-addressed store, hash-verified

361 return True
362
363 def stackref_kill(
364 self,
365 name: Token,
366 storage: Storage,
367 escapes: bool
368 ) -> bool:
369 live = ""
370 for var in reversed(storage.inputs):
371 if var.name == name.text:
372 if live and escapes:
373 raise analysis_error(
374 f"Cannot close '{name.text}' when "
375 f"'{live}' is still live", name)
376 var.kill()
377 break
378 if var.in_local:
379 live = var.name
380 return True
381
382 def stackref_close_specialized(
383 self,

Callers 3

stackref_stealMethod · 0.95
emit_SimpleStmtMethod · 0.95

Calls 2

analysis_errorFunction · 0.90
killMethod · 0.45

Tested by

no test coverage detected