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

Method push_outputs

Tools/cases_generator/stack.py:633–645  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

631 self.sanity_check()
632
633 def push_outputs(self) -> None:
634 if self.spilled:
635 raise StackError(f"Unbalanced stack spills")
636 self.clear_inputs("at the end of the micro-op")
637 if len(self.inputs) > self.peeks and self.check_liveness:
638 raise StackError(f"Input variable '{self.inputs[-1].name}' is still live")
639 self._push_defined_outputs()
640 if self.outputs:
641 for out in self.outputs[self.peeks:]:
642 if self.needs_defining(out):
643 raise StackError(f"Output variable '{self.outputs[0].name}' is not defined")
644 self.stack.push(out)
645 self.outputs = []
646
647 def as_comment(self) -> str:
648 stack_comment = self.stack.as_comment()

Callers 1

emit_tokensMethod · 0.80

Calls 5

clear_inputsMethod · 0.95
_push_defined_outputsMethod · 0.95
needs_definingMethod · 0.95
StackErrorClass · 0.85
pushMethod · 0.45

Tested by

no test coverage detected