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

Method get_disassembly

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

Source from the content-addressed store, hash-verified

1000 maxDiff = None
1001
1002 def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs):
1003 # We want to test the default printing behaviour, not the file arg
1004 output = io.StringIO()
1005 with contextlib.redirect_stdout(output):
1006 if wrapper:
1007 dis.dis(func, **kwargs)
1008 else:
1009 dis.disassemble(func, lasti, **kwargs)
1010 return output.getvalue()
1011
1012 def get_disassemble_as_string(self, func, lasti=-1):
1013 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