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'
This commit is contained in:
Mark Shannon 2020-08-04 17:30:11 +01:00 committed by GitHub
parent c7decc27d5
commit 582aaf19e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 114 additions and 59 deletions

22
Include/opcode.h generated
View file

@ -127,6 +127,28 @@ extern "C" {
#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