cpython/Tools
Guido van Rossum 41bc101dd6
GH-98831: "Generate" the interpreter (#98830)
The switch cases (really TARGET(opcode) macros) have been moved from ceval.c to generated_cases.c.h. That file is generated from instruction definitions in bytecodes.c (which impersonates a C file so the C code it contains can be edited without custom support in e.g. VS Code).

The code generator lives in Tools/cases_generator (it has a README.md explaining how it works). The DSL used to describe the instructions is a work in progress, described in https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md.

This is surely a work-in-progress. An easy next step could be auto-generating super-instructions.

**IMPORTANT: Merge Conflicts**

If you get a merge conflict for instruction implementations in ceval.c, your best bet is to port your changes to bytecodes.c. That file looks almost the same as the original cases, except instead of `TARGET(NAME)` it uses `inst(NAME)`, and the trailing `DISPATCH()` call is omitted (the code generator adds it automatically).
2022-11-02 21:31:26 -07:00
..
build gh-99016: Make build scripts compatible with Python 3.8 (GH-99017) 2022-11-02 20:30:09 +02:00
buildbot bpo-41173: Copy test results file from ARM worker before uploading (GH-21305) 2020-07-08 00:24:39 +01:00
c-analyzer GH-98686: Quicken everything (GH-98687) 2022-11-02 10:42:57 -07:00
cases_generator GH-98831: "Generate" the interpreter (#98830) 2022-11-02 21:31:26 -07:00
ccbench bpo-43723: Fix deprecation error caused by thread.setDaemon() (GH-25361) 2021-04-12 13:12:36 +02:00
clinic gh-92886: [clinic.py] raise exception on invalid input instead of assertion (GH-98051) 2022-10-07 14:41:35 -07:00
freeze gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358) 2022-05-06 03:41:24 +02:00
gdb GH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. (GH-96204) 2022-08-24 14:21:01 +01:00
i18n gh-95731: Fix module docstring extraction in pygettext (#95732) 2022-10-15 07:57:53 -07:00
importbench Tools/importbench: Fix a misplaced stderr= (GH-12690) 2019-04-05 09:18:19 +02:00
iobench Replace KB unit with KiB (#4293) 2017-11-08 14:44:44 -08:00
msi gh-90989: Install Windows launcher per-user, and clarify some installer text (GH-97655) 2022-09-30 10:29:31 +01:00
nuget bpo-41744: Package python.props with correct name in NuGet package (GH-22154) 2020-09-14 20:30:15 +01:00
patchcheck gh-97669: Create Tools/patchcheck/ directory (#98186) 2022-10-12 10:09:21 +02:00
peg_generator gh-84623: Remove unused imports (#94132) 2022-06-22 19:14:27 +02:00
scripts gh-90716: add _pylong.py module (#96673) 2022-10-25 22:00:50 -07:00
ssl gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683) 2022-08-29 18:19:15 +02:00
stringbench [codemod] Fix non-matching bracket pairs (GH-28473) 2021-09-22 01:09:00 +02:00
tz bpo-29919: Remove unused imports found by pyflakes (#137) 2017-03-27 16:05:26 +02:00
unicode bpo-47243: Duplicate entry in 'Objects/unicodetype_db.h' (GH-32376) 2022-09-28 06:57:14 -07:00
unittestgui Remove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438) 2021-05-16 16:55:06 +01:00
wasm gh-96883: browser: include concurrent.futures (GH-96886) 2022-09-17 13:23:39 +02:00
README gh-97681: Remove Tools/demo/ directory (#97682) 2022-10-03 17:09:02 +02:00

README

This directory contains a number of Python programs that are useful
while building or extending Python.

buildbot        Batchfiles for running on Windows buildbot workers.

ccbench         A Python threads-based concurrency benchmark. (*)

freeze          Create a stand-alone executable from a Python program.

gdb             Python code to be run inside gdb, to make it easier to
                debug Python itself (by David Malcolm).

i18n            Tools for internationalization. pygettext.py
                parses Python source code and generates .pot files,
                and msgfmt.py generates a binary message catalog
                from a catalog in text format.

iobench         Benchmark for the new Python I/O system. (*)

msi             Support for packaging Python as an MSI package on Windows.

parser          Un-parsing tool to generate code from an AST.

peg_generator   PEG-based parser generator (pegen) used for new parser.

scripts         A number of useful single-file programs, e.g. tabnanny.py
                by Tim Peters, which checks for inconsistent mixing of
                tabs and spaces, and 2to3, which converts Python 2 code
                to Python 3 code.

stringbench     A suite of micro-benchmarks for various operations on
                strings (both 8-bit and unicode). (*)

unicode         Tools for generating unicodedata and codecs from unicode.org
                and other mapping files (by Fredrik Lundh, Marc-Andre Lemburg
                and Martin von Loewis).

unittestgui     A Tkinter based GUI test runner for unittest, with test
                discovery.


(*) A generic benchmark suite is maintained separately at https://github.com/python/performance

Note: The pynche color editor has moved to https://gitlab.com/warsaw/pynche