diff options
author | Mark Shannon <mark@hotpy.org> | 2025-01-27 16:24:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-27 16:24:48 (GMT) |
commit | 75b49621578a45415bfeedd6cc68d50e821d8281 (patch) | |
tree | 907f5c0765dc65e5f0eaa81ef9f80589623e0361 /Python/codegen.c | |
parent | 8ec76d90340287eb3587f0ae388bbfe158fb28d8 (diff) | |
download | cpython-75b49621578a45415bfeedd6cc68d50e821d8281.zip cpython-75b49621578a45415bfeedd6cc68d50e821d8281.tar.gz cpython-75b49621578a45415bfeedd6cc68d50e821d8281.tar.bz2 |
GH-128914: Remove all but one conditional stack effects (GH-129226)
* Remove all 'if (0)' and 'if (1)' conditional stack effects
* Use array instead of conditional for BUILD_SLICE args
* Refactor LOAD_GLOBAL to use a common conditional uop
* Remove conditional stack effects from LOAD_ATTR specializations
* Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array.
* Remove conditional stack effects from CALL_FUNCTION_EX
Diffstat (limited to 'Python/codegen.c')
-rw-r--r-- | Python/codegen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/codegen.c b/Python/codegen.c index 61707ba..df3b5aa 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -4108,7 +4108,10 @@ ex_call: } assert(have_dict); } - ADDOP_I(c, loc, CALL_FUNCTION_EX, nkwelts > 0); + if (nkwelts == 0) { + ADDOP(c, loc, PUSH_NULL); + } + ADDOP(c, loc, CALL_FUNCTION_EX); return SUCCESS; } |