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

Method test_load_attr_specialize

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

Source from the content-addressed store, hash-verified

1319 @cpython_only
1320 @requires_specialization
1321 def test_load_attr_specialize(self):
1322 load_attr_quicken = """\
1323 0 RESUME_CHECK 0
1324
1325 1 LOAD_CONST_IMMORTAL 0 ('a')
1326 LOAD_ATTR_SLOT 0 (__class__)
1327 RETURN_VALUE
1328"""
1329 co = compile("'a'.__class__", "", "eval")
1330 self.code_quicken(lambda: exec(co, {}, {}))
1331 got = self.get_disassembly(co, adaptive=True)
1332 self.do_disassembly_compare(got, load_attr_quicken)
1333
1334 @cpython_only
1335 @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