diff options
author | Mark Shannon <mark@hotpy.org> | 2020-08-04 16:30:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 16:30:11 (GMT) |
commit | 582aaf19e8b94a70c1f96792197770d604ba0fdf (patch) | |
tree | 5f7934d5792806ac1f21c023734eebfb031b0117 /Include | |
parent | c7decc27d529c04a4e6b2922e3f3f9419b920f63 (diff) | |
download | cpython-582aaf19e8b94a70c1f96792197770d604ba0fdf.zip cpython-582aaf19e8b94a70c1f96792197770d604ba0fdf.tar.gz cpython-582aaf19e8b94a70c1f96792197770d604ba0fdf.tar.bz2 |
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'
Diffstat (limited to 'Include')
-rw-r--r-- | Include/opcode.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ 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 |