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

Function print_instructions

Lib/dis.py:919–926  ·  view source on GitHub ↗
(instrs, exception_entries, formatter, lasti=-1)

Source from the content-addressed store, hash-verified

917
918
919def print_instructions(instrs, exception_entries, formatter, lasti=-1):
920 for instr in instrs:
921 # Each CACHE takes 2 bytes
922 is_current_instr = instr.offset <= lasti \
923 <= instr.offset + 2 * _get_cache_size(_all_opname[_deoptop(instr.opcode)])
924 formatter.print_instruction(instr, is_current_instr)
925
926 formatter.print_exception_table(exception_entries)
927
928def _disassemble_str(source, **kwargs):
929 """Compile the source string, then disassemble the code object."""

Callers 1

_disassemble_bytesFunction · 0.85

Calls 4

_get_cache_sizeFunction · 0.85
_deoptopFunction · 0.85
print_instructionMethod · 0.80
print_exception_tableMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…