diff options
author | Mark Shannon <mark@hotpy.org> | 2023-07-04 17:23:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 17:23:00 +0100 |
commit | 318ea2c72e9aed7ac92457c28747eda9424c8327 (patch) | |
tree | 76e36a8bfdc7a6702b4fa5f4c7c34944efafc6d6 /Python/opcode_metadata.h | |
parent | 80f1c6c49b4cd2bf698eb2bc3d2f3da904880dd2 (diff) | |
download | cpython-318ea2c72e9aed7ac92457c28747eda9424c8327.tar.gz cpython-318ea2c72e9aed7ac92457c28747eda9424c8327.zip |
GH-106360: Support very basic superblock introspection (#106422)
* Add len() and indexing support to uop superblocks.
Diffstat (limited to 'Python/opcode_metadata.h')
-rw-r--r-- | Python/opcode_metadata.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/opcode_metadata.h b/Python/opcode_metadata.h index 82c98235892..ac86a4abd9c 100644 --- a/Python/opcode_metadata.h +++ b/Python/opcode_metadata.h @@ -942,9 +942,7 @@ struct opcode_macro_expansion { #ifndef NEED_OPCODE_METADATA extern const struct opcode_metadata _PyOpcode_opcode_metadata[512]; extern const struct opcode_macro_expansion _PyOpcode_macro_expansion[256]; -#ifdef Py_DEBUG extern const char * const _PyOpcode_uop_name[512]; -#endif #else const struct opcode_metadata _PyOpcode_opcode_metadata[512] = { [NOP] = { true, INSTR_FMT_IX, 0 }, @@ -1265,7 +1263,7 @@ const struct opcode_macro_expansion _PyOpcode_macro_expansion[256] = { [COPY] = { .nuops = 1, .uops = { { COPY, 0, 0 } } }, [SWAP] = { .nuops = 1, .uops = { { SWAP, 0, 0 } } }, }; -#ifdef Py_DEBUG +#ifdef NEED_OPCODE_METADATA const char * const _PyOpcode_uop_name[512] = { [300] = "EXIT_TRACE", [301] = "SAVE_IP", @@ -1282,5 +1280,5 @@ const char * const _PyOpcode_uop_name[512] = { [312] = "_LOAD_LOCALS", [313] = "_LOAD_FROM_DICT_OR_GLOBALS", }; -#endif +#endif // NEED_OPCODE_METADATA #endif |