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

Method get_disassembly

Lib/test/test_dis.py:973–981  ·  view source on GitHub ↗
(self, func, lasti=-1, wrapper=True, **kwargs)

Source from the content-addressed store, hash-verified

971 maxDiff = None
972
973 def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs):
974 # We want to test the default printing behaviour, not the file arg
975 output = io.StringIO()
976 with contextlib.redirect_stdout(output):
977 if wrapper:
978 dis.dis(func, **kwargs)
979 else:
980 dis.disassemble(func, lasti, **kwargs)
981 return output.getvalue()
982
983 def get_disassemble_as_string(self, func, lasti=-1):
984 return self.get_disassembly(func, lasti, False)

Callers 15

do_disassembly_testMethod · 0.95
test_intrinsic_2Method · 0.95
checkMethod · 0.95
test_call_specializeMethod · 0.95
test_loop_quickenMethod · 0.95

Calls 2

getvalueMethod · 0.95
disMethod · 0.80

Tested by

no test coverage detected