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

Function add

Tools/cases_generator/opcode_metadata_generator.py:103–108  ·  view source on GitHub ↗
(inst: Instruction | PseudoInstruction)

Source from the content-addressed store, hash-verified

101 pushed_data: list[tuple[str, str]] = []
102
103 def add(inst: Instruction | PseudoInstruction) -> None:
104 stack = get_stack_effect(inst)
105 popped = (-stack.base_offset).to_c()
106 pushed = (stack.logical_sp - stack.base_offset).to_c()
107 popped_data.append((inst.name, popped))
108 pushed_data.append((inst.name, pushed))
109
110 for inst in analysis.instructions.values():
111 add(inst)

Callers 2

declareMethod · 0.50

Calls 3

get_stack_effectFunction · 0.90
to_cMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected