diff options
author | Mark Shannon <mark@hotpy.org> | 2023-10-12 10:34:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 10:34:32 +0100 |
commit | 19b7ead5eb2fd1a0d19403e800a6f3adffbaac69 (patch) | |
tree | 06d2c2db6d13cab161597286d03225659c3e91f9 /Python/bytecodes.c | |
parent | fb7843ee895ac7f6eeb58f356b1a320eea081cfc (diff) | |
download | cpython-19b7ead5eb2fd1a0d19403e800a6f3adffbaac69.tar.gz cpython-19b7ead5eb2fd1a0d19403e800a6f3adffbaac69.zip |
GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 9b733ce4a8c..62dc548abd6 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -803,7 +803,6 @@ dummy_func( } macro(RETURN_VALUE) = - _SET_IP + // Tier 2 only; special-cased oparg _SAVE_CURRENT_IP + // Sets frame->prev_instr _POP_FRAME; @@ -828,7 +827,6 @@ dummy_func( macro(RETURN_CONST) = LOAD_CONST + - _SET_IP + // Tier 2 only; special-cased oparg _SAVE_CURRENT_IP + // Sets frame->prev_instr _POP_FRAME; @@ -3099,7 +3097,6 @@ dummy_func( _CHECK_FUNCTION_EXACT_ARGS + _CHECK_STACK_SPACE + _INIT_CALL_PY_EXACT_ARGS + - _SET_IP + // Tier 2 only; special-cased oparg _SAVE_CURRENT_IP + // Sets frame->prev_instr _PUSH_FRAME; @@ -3109,7 +3106,6 @@ dummy_func( _CHECK_FUNCTION_EXACT_ARGS + _CHECK_STACK_SPACE + _INIT_CALL_PY_EXACT_ARGS + - _SET_IP + // Tier 2 only; special-cased oparg _SAVE_CURRENT_IP + // Sets frame->prev_instr _PUSH_FRAME; @@ -3948,17 +3944,13 @@ dummy_func( } op(_SET_IP, (--)) { + TIER_TWO_ONLY frame->prev_instr = ip_offset + oparg; } op(_SAVE_CURRENT_IP, (--)) { - #if TIER_ONE + TIER_ONE_ONLY frame->prev_instr = next_instr - 1; - #endif - #if TIER_TWO - // Relies on a preceding _SET_IP - frame->prev_instr--; - #endif } op(_EXIT_TRACE, (--)) { |