gh-102674: Remove _specialization_stats from Lib/opcode.py (#102685)

It's not use except in a test, so move it there instead.
This commit is contained in:
Dong-hee Na 2023-03-15 05:20:14 +09:00 committed by GitHub
parent cdb21ba74d
commit d77c48740f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 10 deletions

View file

@ -377,14 +377,6 @@ _specializations = {
_specialized_instructions = [ _specialized_instructions = [
opcode for family in _specializations.values() for opcode in family opcode for family in _specializations.values() for opcode in family
] ]
_specialization_stats = [
"success",
"failure",
"hit",
"deferred",
"miss",
"deopt",
]
_cache_format = { _cache_format = {
"LOAD_GLOBAL": { "LOAD_GLOBAL": {

View file

@ -69,8 +69,7 @@ class OpcodeTests(unittest.TestCase):
class SpecializationStatsTests(unittest.TestCase): class SpecializationStatsTests(unittest.TestCase):
def test_specialization_stats(self): def test_specialization_stats(self):
stat_names = opcode._specialization_stats stat_names = ["success", "failure", "hit", "deferred", "miss", "deopt"]
specialized_opcodes = [ specialized_opcodes = [
op.lower() op.lower()
for op in opcode._specializations for op in opcode._specializations