bpo-41463: Generate information about jumps from 'opcode.py' rather than duplicating it in 'compile.c' (GH-21714)
Generate information about jumps from 'opcode.py' rather than duplicate it in 'compile.c'
diff --git a/Include/opcode.h b/Include/opcode.h
index 19944fa..420c87a 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -127,6 +127,28 @@
#define SET_UPDATE 163
#define DICT_MERGE 164
#define DICT_UPDATE 165
+#ifdef NEED_OPCODE_JUMP_TABLES
+static uint32_t _PyOpcode_RelativeJump[8] = {
+ 0U,
+ 0U,
+ 536870912U,
+ 67125248U,
+ 67141632U,
+ 0U,
+ 0U,
+ 0U,
+};
+static uint32_t _PyOpcode_Jump[8] = {
+ 0U,
+ 0U,
+ 536870912U,
+ 101695488U,
+ 67141632U,
+ 0U,
+ 0U,
+ 0U,
+};
+#endif /* OPCODE_TABLES */
/* EXCEPT_HANDLER is a special, implicit block type which is created when
entering an except handler. It is not an opcode but we define it here