summaryrefslogtreecommitdiffstats
path: root/Python/makeopcodetargets.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-06-19 22:47:04 (GMT)
committerGitHub <noreply@github.com>2023-06-19 22:47:04 (GMT)
commit33f0a8578b729e67c482daedc2660648afd0ee78 (patch)
treeb3593b66cc56e07461348935f6a8c9259211ea87 /Python/makeopcodetargets.py
parent28187a9c4f95affe50fd37e0db0db177e2b9c2e9 (diff)
downloadcpython-33f0a8578b729e67c482daedc2660648afd0ee78.zip
cpython-33f0a8578b729e67c482daedc2660648afd0ee78.tar.gz
cpython-33f0a8578b729e67c482daedc2660648afd0ee78.tar.bz2
gh-105481: generate _specializations and _specialized_instructions from bytecodes.c (#105913)
Diffstat (limited to 'Python/makeopcodetargets.py')
-rwxr-xr-xPython/makeopcodetargets.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/makeopcodetargets.py b/Python/makeopcodetargets.py
index 2b402ae..5843079 100755
--- a/Python/makeopcodetargets.py
+++ b/Python/makeopcodetargets.py
@@ -25,12 +25,13 @@ def write_contents(f):
"""Write C code contents to the target file object.
"""
opcode = find_module('opcode')
+ _opcode_metadata = find_module('_opcode_metadata')
targets = ['_unknown_opcode'] * 256
for opname, op in opcode.opmap.items():
if not opcode.is_pseudo(op):
targets[op] = "TARGET_%s" % opname
next_op = 1
- for opname in opcode._specialized_instructions:
+ for opname in _opcode_metadata._specialized_instructions:
while targets[next_op] != '_unknown_opcode':
next_op += 1
targets[next_op] = "TARGET_%s" % opname