diff options
author | Mark Shannon <mark@hotpy.org> | 2023-10-31 10:09:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-31 10:09:54 (GMT) |
commit | d27acd4461ee603bcf6f4a81ca6afccc9fc87331 (patch) | |
tree | b989f6c029b1350612cc9df07d0d027df2a745d8 /Python/ceval_macros.h | |
parent | e3353c498d79f0f3f108a9baf8807a12e77c2ebe (diff) | |
download | cpython-d27acd4461ee603bcf6f4a81ca6afccc9fc87331.zip cpython-d27acd4461ee603bcf6f4a81ca6afccc9fc87331.tar.gz cpython-d27acd4461ee603bcf6f4a81ca6afccc9fc87331.tar.bz2 |
GH-111485: Increment `next_instr` consistently at the start of the instruction. (GH-111486)
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r-- | Python/ceval_macros.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h index 544e8ef..b11240b 100644 --- a/Python/ceval_macros.h +++ b/Python/ceval_macros.h @@ -60,25 +60,21 @@ #endif #ifdef Py_STATS -#define INSTRUCTION_START(op) \ +#define INSTRUCTION_STATS(op) \ do { \ - frame->instr_ptr = next_instr++; \ OPCODE_EXE_INC(op); \ if (_Py_stats) _Py_stats->opcode_stats[lastopcode].pair_count[op]++; \ lastopcode = op; \ } while (0) #else -#define INSTRUCTION_START(op) \ - do { \ - frame->instr_ptr = next_instr++; \ - } while(0) +#define INSTRUCTION_STATS(op) ((void)0) #endif #if USE_COMPUTED_GOTOS -# define TARGET(op) TARGET_##op: INSTRUCTION_START(op); +# define TARGET(op) TARGET_##op: # define DISPATCH_GOTO() goto *opcode_targets[opcode] #else -# define TARGET(op) case op: TARGET_##op: INSTRUCTION_START(op); +# define TARGET(op) case op: TARGET_##op: # define DISPATCH_GOTO() goto dispatch_opcode #endif |