aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/optimizer.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-01-20 17:09:23 +0000
committerGitHub <noreply@github.com>2025-01-20 17:09:23 +0000
commitab61d3f4303d14a413bc9ae6557c730ffdf7579e (patch)
treeec35e41ce467f4cb281208970cf453a680d82aed /Python/optimizer.c
parent0a6412f9cc9e694e76299cfbd73ec969b7d47af6 (diff)
downloadcpython-ab61d3f4303d14a413bc9ae6557c730ffdf7579e.tar.gz
cpython-ab61d3f4303d14a413bc9ae6557c730ffdf7579e.zip
GH-128914: Remove conditional stack effects from `bytecodes.c` and the code generators (GH-128918)
Diffstat (limited to 'Python/optimizer.c')
-rw-r--r--Python/optimizer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c
index 9beb47246eb..b91caf11ffa 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -1274,10 +1274,7 @@ uop_optimize(
for (int pc = 0; pc < length; pc++) {
int opcode = buffer[pc].opcode;
int oparg = buffer[pc].oparg;
- if (_PyUop_Flags[opcode] & HAS_OPARG_AND_1_FLAG) {
- buffer[pc].opcode = opcode + 1 + (oparg & 1);
- }
- else if (oparg < _PyUop_Replication[opcode]) {
+ if (oparg < _PyUop_Replication[opcode]) {
buffer[pc].opcode = opcode + oparg + 1;
}
else if (is_terminator(&buffer[pc])) {