Skip to content

Commit e44bf1c

Browse files
authored
Fix: Duplicates in _PyOpcode_OpName (python#59)
1 parent 4dd472a commit e44bf1c

File tree

5 files changed

+52
-45
lines changed

5 files changed

+52
-45
lines changed

Include/internal/pycore_opcode.h

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode.h

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/opcode.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ def pseudo_op(name, op, real_ops):
479479
'BB_BRANCH', # When both exits have not been generated.
480480
# The BB_BRANCH transitions to one of these two.
481481
# This happens when the fall through is generated, but not the other branch.
482-
'BB_BRANCH_IF_FLAG_UNSET', # When alternate exit is not yet generated.
483-
'BB_BRANCH_IF_FLAG_SET', # When successor exit is not yet generated.
482+
# Duplicated in the specialised # 'BB_BRANCH_IF_FLAG_UNSET', # When alternate exit is not yet generated.
483+
# Duplicated in the specialised # 'BB_BRANCH_IF_FLAG_SET', # When successor exit is not yet generated.
484484
# When both edges are generated
485485
'BB_JUMP_IF_FLAG_UNSET',
486486
'BB_JUMP_IF_FLAG_SET',
@@ -490,9 +490,9 @@ def pseudo_op(name, op, real_ops):
490490
# These tests correspond to the jump instructions
491491
# FOR_ITER's null (iterator) check
492492
'BB_TEST_ITER',
493-
'BB_TEST_ITER_RANGE',
494-
'BB_TEST_ITER_LIST',
495-
'BB_TEST_ITER_TUPLE',
493+
# Duplicated in the specialised # 'BB_TEST_ITER_RANGE',
494+
# Duplicated in the specialised # 'BB_TEST_ITER_LIST',
495+
# Duplicated in the specialised # 'BB_TEST_ITER_TUPLE',
496496
# POP_JUMP_IF_FALSE, POP_JUMP_IF_TRUE
497497
'BB_TEST_POP_IF_FALSE',
498498
'BB_TEST_POP_IF_TRUE',

Python/opcode_targets.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/build/generate_opcode_h.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def main(opcode_py, outfile='Include/opcode.h', internaloutfile='Include/interna
102102
for name in opcode['_specialized_instructions']:
103103
while used[next_op]:
104104
next_op += 1
105+
assert name not in opname_including_specialized
105106
specialized_opmap[name] = next_op
106107
opname_including_specialized[next_op] = name
107108
used[next_op] = True
@@ -117,6 +118,7 @@ def main(opcode_py, outfile='Include/opcode.h', internaloutfile='Include/interna
117118
for name in opcode['_uops']:
118119
while used[next_op]:
119120
next_op += 1
121+
assert name not in opname_including_specialized
120122
uop_opmap[name] = next_op
121123
opname_including_specialized[next_op] = name
122124
used[next_op] = True

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy