Skip to content

Commit d77c487

Browse files
authored
gh-102674: Remove _specialization_stats from Lib/opcode.py (#102685)
It's not use except in a test, so move it there instead.
1 parent cdb21ba commit d77c487

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Diff for: Lib/opcode.py

-8
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,6 @@ def pseudo_op(name, op, real_ops):
377377
_specialized_instructions = [
378378
opcode for family in _specializations.values() for opcode in family
379379
]
380-
_specialization_stats = [
381-
"success",
382-
"failure",
383-
"hit",
384-
"deferred",
385-
"miss",
386-
"deopt",
387-
]
388380

389381
_cache_format = {
390382
"LOAD_GLOBAL": {

Diff for: Lib/test/test__opcode.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ def test_stack_effect_jump(self):
6969

7070
class SpecializationStatsTests(unittest.TestCase):
7171
def test_specialization_stats(self):
72-
stat_names = opcode._specialization_stats
73-
72+
stat_names = ["success", "failure", "hit", "deferred", "miss", "deopt"]
7473
specialized_opcodes = [
7574
op.lower()
7675
for op in opcode._specializations

0 commit comments

Comments
 (0)