]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Tier 2 cleanups and tweaks (#115534)
authorGuido van Rossum <guido@python.org>
Tue, 20 Feb 2024 20:24:35 +0000 (12:24 -0800)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2024 20:24:35 +0000 (20:24 +0000)
commit142502ea8d26b17732009b6e981e630c342054f7
treeec422247c652811eb58ed555bfba2f03f957faac
parent520403ed4cdf4890d63403c9cf01ac63233f5ef4
Tier 2 cleanups and tweaks (#115534)

* Rename `_testinternalcapi.get_{uop,counter}_optimizer` to `new_*_optimizer`
* Use `_PyUOpName()` instead of` _PyOpcode_uop_name[]`
* Add `target` to executor iterator items -- `list(ex)` now returns `(opcode, oparg, target, operand)` quadruples
* Add executor methods `get_opcode()` and `get_oparg()` to get `vmdata.opcode`, `vmdata.oparg`
* Define a helper for printing uops, and unify various places where they are printed
* Add a hack to summarize_stats.py to fix legacy uop names (e.g. `POP_TOP` -> `_POP_TOP`)
* Define helpers in `test_opt.py` for accessing the set or list of opnames of an executor
Lib/test/test_capi/test_opt.py
Lib/test/test_monitoring.py
Modules/_testinternalcapi.c
Python/ceval.c
Python/optimizer.c
Python/optimizer_analysis.c
Python/specialize.c
Tools/scripts/summarize_stats.py