summaryrefslogtreecommitdiffstats
path: root/Lib/opcode.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-08-17 16:07:58 (GMT)
committerGitHub <noreply@github.com>2023-08-17 16:07:58 (GMT)
commit0b243c2f665e6784b74ac4d602d4ee429a2ad7f0 (patch)
tree5444c3a7fa1cb2d85a916f3a2773b509c4da2523 /Lib/opcode.py
parent4cb08188e8f0faaec303e268e12aa1d6f54017f7 (diff)
downloadcpython-0b243c2f665e6784b74ac4d602d4ee429a2ad7f0.zip
cpython-0b243c2f665e6784b74ac4d602d4ee429a2ad7f0.tar.gz
cpython-0b243c2f665e6784b74ac4d602d4ee429a2ad7f0.tar.bz2
gh-105481: opcode.h is no longer generated during the build (#108080)
Diffstat (limited to 'Lib/opcode.py')
-rw-r--r--Lib/opcode.py31
1 files changed, 1 insertions, 30 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 6b9d9ce..f848752 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -44,39 +44,10 @@ if sys.version_info[:2] >= (3, 13):
_intrinsic_1_descs = _opcode.get_intrinsic1_descs()
_intrinsic_2_descs = _opcode.get_intrinsic2_descs()
+ _nb_ops = _opcode.get_nb_ops()
hascompare = [opmap["COMPARE_OP"]]
-_nb_ops = [
- ("NB_ADD", "+"),
- ("NB_AND", "&"),
- ("NB_FLOOR_DIVIDE", "//"),
- ("NB_LSHIFT", "<<"),
- ("NB_MATRIX_MULTIPLY", "@"),
- ("NB_MULTIPLY", "*"),
- ("NB_REMAINDER", "%"),
- ("NB_OR", "|"),
- ("NB_POWER", "**"),
- ("NB_RSHIFT", ">>"),
- ("NB_SUBTRACT", "-"),
- ("NB_TRUE_DIVIDE", "/"),
- ("NB_XOR", "^"),
- ("NB_INPLACE_ADD", "+="),
- ("NB_INPLACE_AND", "&="),
- ("NB_INPLACE_FLOOR_DIVIDE", "//="),
- ("NB_INPLACE_LSHIFT", "<<="),
- ("NB_INPLACE_MATRIX_MULTIPLY", "@="),
- ("NB_INPLACE_MULTIPLY", "*="),
- ("NB_INPLACE_REMAINDER", "%="),
- ("NB_INPLACE_OR", "|="),
- ("NB_INPLACE_POWER", "**="),
- ("NB_INPLACE_RSHIFT", ">>="),
- ("NB_INPLACE_SUBTRACT", "-="),
- ("NB_INPLACE_TRUE_DIVIDE", "/="),
- ("NB_INPLACE_XOR", "^="),
-]
-
-
_cache_format = {
"LOAD_GLOBAL": {
"counter": 1,