Skip to content

Commit b608a19

Browse files
corona10Fidget-Spinner
authored andcommitted
pythongh-102674: Remove _specialization_stats from Lib/opcode.py (python#102685)
It's not use except in a test, so move it there instead.
1 parent f4367d5 commit b608a19

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Lib/opcode.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,6 @@ def pseudo_op(name, op, real_ops):
389389
_specialized_instructions = [
390390
opcode for family in _specializations.values() for opcode in family
391391
]
392-
_specialization_stats = [
393-
"success",
394-
"failure",
395-
"hit",
396-
"deferred",
397-
"miss",
398-
"deopt",
399-
]
400392

401393
_cache_format = {
402394
"LOAD_GLOBAL": {

Lib/test/test__opcode.py

Lines changed: 1 addition & 2 deletions
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)