Skip to content

Commit

Permalink
gh-102674: Remove _specialization_stats from Lib/opcode.py (#102685)
Browse files Browse the repository at this point in the history
It's not use except in a test, so move it there instead.
  • Loading branch information
corona10 authored Mar 14, 2023
1 parent cdb21ba commit d77c487
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 0 additions & 8 deletions Lib/opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,6 @@ def pseudo_op(name, op, real_ops):
_specialized_instructions = [
opcode for family in _specializations.values() for opcode in family
]
_specialization_stats = [
"success",
"failure",
"hit",
"deferred",
"miss",
"deopt",
]

_cache_format = {
"LOAD_GLOBAL": {
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test__opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def test_stack_effect_jump(self):

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
Expand Down

0 comments on commit d77c487

Please sign in to comment.