diff options
author | Guido van Rossum <guido@python.org> | 2023-11-20 18:08:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-20 18:08:53 (GMT) |
commit | 1995955173737bcb009dbacaeff7821b4d744148 (patch) | |
tree | 96a6c3f5901c4ed2c4cf5fa205231f7216a6e9c1 /Python/abstract_interp_cases.c.h | |
parent | d59feb5dbe5395615d06c30a95e6a6a9b7681d4d (diff) | |
download | cpython-1995955173737bcb009dbacaeff7821b4d744148.zip cpython-1995955173737bcb009dbacaeff7821b4d744148.tar.gz cpython-1995955173737bcb009dbacaeff7821b4d744148.tar.bz2 |
gh-106529: Make FOR_ITER a viable uop (#112134)
This uses the new mechanism whereby certain uops
are replaced by others during translation,
using the `_PyUop_Replacements` table.
We further special-case the `_FOR_ITER_TIER_TWO` uop
to update the deoptimization target to point
just past the corresponding `END_FOR` opcode.
Two tiny code cleanups are also part of this PR.
Diffstat (limited to 'Python/abstract_interp_cases.c.h')
-rw-r--r-- | Python/abstract_interp_cases.c.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/abstract_interp_cases.c.h b/Python/abstract_interp_cases.c.h index a2f6aa8..0d7fbe8 100644 --- a/Python/abstract_interp_cases.c.h +++ b/Python/abstract_interp_cases.c.h @@ -624,6 +624,12 @@ break; } + case _FOR_ITER_TIER_TWO: { + STACK_GROW(1); + PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1)), true); + break; + } + case _ITER_CHECK_LIST: { break; } |