diff options
author | Dong-hee Na <donghee.na@python.org> | 2023-03-14 20:20:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 20:20:14 (GMT) |
commit | d77c48740f5cd17597693bd0d27e32db725fa3a0 (patch) | |
tree | 09a11de107925b819565dbc161655cd01d29218e | |
parent | cdb21ba74d933e262bc1696b6ce78b50cb5a4443 (diff) | |
download | cpython-d77c48740f5cd17597693bd0d27e32db725fa3a0.zip cpython-d77c48740f5cd17597693bd0d27e32db725fa3a0.tar.gz cpython-d77c48740f5cd17597693bd0d27e32db725fa3a0.tar.bz2 |
gh-102674: Remove _specialization_stats from Lib/opcode.py (#102685)
It's not use except in a test, so move it there instead.
-rw-r--r-- | Lib/opcode.py | 8 | ||||
-rw-r--r-- | Lib/test/test__opcode.py | 3 |
2 files changed, 1 insertions, 10 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py index 23529d8..d4a2d55 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -377,14 +377,6 @@ _specializations = { _specialized_instructions = [ opcode for family in _specializations.values() for opcode in family ] -_specialization_stats = [ - "success", - "failure", - "hit", - "deferred", - "miss", - "deopt", -] _cache_format = { "LOAD_GLOBAL": { diff --git a/Lib/test/test__opcode.py b/Lib/test/test__opcode.py index db83106..fb4ab15 100644 --- a/Lib/test/test__opcode.py +++ b/Lib/test/test__opcode.py @@ -69,8 +69,7 @@ class OpcodeTests(unittest.TestCase): class SpecializationStatsTests(unittest.TestCase): def test_specialization_stats(self): - stat_names = opcode._specialization_stats - + stat_names = ["success", "failure", "hit", "deferred", "miss", "deopt"] specialized_opcodes = [ op.lower() for op in opcode._specializations |