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

Method test_call_specialize

Lib/test/test_dis.py:1336–1349  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1334 @cpython_only
1335 @requires_specialization
1336 def test_call_specialize(self):
1337 call_quicken = """\
1338 0 RESUME_CHECK 0
1339
1340 1 LOAD_NAME 0 (str)
1341 PUSH_NULL
1342 LOAD_SMALL_INT 1
1343 CALL_STR_1 1
1344 RETURN_VALUE
1345"""
1346 co = compile("str(1)", "", "eval")
1347 self.code_quicken(lambda: exec(co, {}, {}))
1348 got = self.get_disassembly(co, adaptive=True)
1349 self.do_disassembly_compare(got, call_quicken)
1350
1351 @cpython_only
1352 @requires_specialization

Callers

nothing calls this directly

Calls 5

code_quickenMethod · 0.95
get_disassemblyMethod · 0.95
compileFunction · 0.50
execFunction · 0.50

Tested by

no test coverage detected