]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-98831: Implement array support in cases generator (#100912)
authorGuido van Rossum <guido@python.org>
Tue, 17 Jan 2023 23:59:19 +0000 (15:59 -0800)
committerGitHub <noreply@github.com>
Tue, 17 Jan 2023 23:59:19 +0000 (15:59 -0800)
commit80e3e3423cb456ba341f95d6a07e94cf3b16c0be
tree32ddc8bc516b2010d48a529c9cc03fb68631c80e
parentf34176b77f222726d901595968a4b44456186da4
GH-98831: Implement array support in cases generator (#100912)

You can now write things like this:
```
inst(BUILD_STRING, (pieces[oparg] -- str)) { ... }
inst(LIST_APPEND, (list, unused[oparg-1], v -- list, unused[oparg-1])) { ... }
```
Note that array output effects are only partially supported (they must be named `unused` or correspond to an input effect).
Python/bytecodes.c
Python/generated_cases.c.h
Python/opcode_metadata.h
Tools/cases_generator/generate_cases.py
Tools/cases_generator/parser.py
Tools/cases_generator/test_generator.py