Skip to content

Commit

Permalink
pythongh-102674: Remove _specialization_stats from Lib/opcode.py (pyt…
Browse files Browse the repository at this point in the history
…hon#102685)

It's not use except in a test, so move it there instead.
  • Loading branch information
corona10 authored and Fidget-Spinner committed Mar 27, 2023
1 parent f4367d5 commit b608a19
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 @@ -389,14 +389,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 b608a19

Please sign in to comment.