MCPcopy Index your code
hub / github.com/RustPython/RustPython / print_instructions

Function print_instructions

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

Source from the content-addressed store, hash-verified

911
912
913def print_instructions(instrs, exception_entries, formatter, lasti=-1):
914 for instr in instrs:
915 # Each CACHE takes 2 bytes
916 is_current_instr = instr.offset <= lasti \
917 <= instr.offset + 2 * _get_cache_size(_all_opname[_deoptop(instr.opcode)])
918 formatter.print_instruction(instr, is_current_instr)
919
920 formatter.print_exception_table(exception_entries)
921
922def _disassemble_str(source, **kwargs):
923 """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