| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
The tool now allows user-added #LINE preprocessor directives.
https://github.com/python/cpython/issues/102737
|
|
|
|
| |
instructions (#102739)
|
|
|
|
|
|
|
|
|
|
| |
The "check if generated files are up to date" CI check appears to be currently failing on all PRs (but not on pushes to main)
See, for example:
- https://github.com/python/cpython/pull/94468
- https://github.com/python/cpython/pull/94468
- https://github.com/python/cpython/pull/102731
This appears to be because the C-analyzer tool doesn't like the `#line` directives introduced in https://github.com/python/cpython/commit/70185de1abfe428049a5c43d58fcb656b46db96c. I'm advised by the message printed to the terminal in https://github.com/python/cpython/actions/runs/4428706945/jobs/7768216988#step:14:84 that this is the appropriate short-term fix!
|
|
|
|
|
|
|
|
|
| |
This behavior is optional, because in some extreme cases it
may just make debugging harder. The tool defaults it to off,
but it is on in Makefile.pre.in.
Also note that this makes diffs to generated_cases.c.h noisier,
since whenever you insert or delete a line in bytecodes.c,
all subsequent #line directives will change.
|
|
|
|
|
|
|
|
|
|
|
| |
This will keep us from adding new unsupported (i.e. non-const) C global variables, which would break interpreter isolation.
FYI, historically it is very uncommon for new global variables to get added. Furthermore, it is rare for new code to break the c-analyzer. So the check should almost always pass unnoticed.
Note that I've removed test_check_c_globals. A test wasn't a great fit conceptually and was super slow on debug builds. A CI check is a better fit.
This also resolves gh-100237.
https://github.com/python/cpython/issues/81057
|
| |
|
|
|
|
|
| |
distutils was removed in November. However, the c-analyzer relies on it. To solve that here, we vendor the parts the tool needs so it can be run against 3.12+. (Also see gh-92584.)
Note that we may end up removing this code later in favor of a solution in common with the peg_generator tool (which also relies on distutils). At the least, the copy here makes sure the c-analyzer tool works on 3.12+ in the meantime.
|
|
|
| |
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
|
|
|
|
|
|
|
| |
Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon.
Note that this does include moving last_resort_memory_error to PyInterpreterState.
https://github.com/python/cpython/issues/90110
|
| |
|
|
|
| |
The input files no longer use `-i`.
|
|
|
|
| |
* Emit straight stack_pointer[-i] instead of PEEK(i), POKE(i, ...)
* Expand JUMPBY() and NEXTOPARG(), and fix a perf bug
|
| |
|
|
|
|
|
|
| |
* gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h
* Make cases_generator correct on Windows
|
|
|
|
|
| |
Adapt StringIO, TextIOWrapper, FileIO, Buffered*, and BytesIO types.
Automerge-Triggered-By: GH:erlend-aasland
|
|
|
|
| |
* Convert zone info type to heap type and add it to module state
* Add global variables to module state
|
|
|
|
| |
later version numbers (GH-101877)
|
|
|
|
|
| |
of cores (#101841)
unhardcode freeze test build parallelism. base it on the number of cpus, don't use more than max(2, os.cpu_count()/3).
|
|
|
|
|
|
|
|
|
| |
(#101837)
Prevent test_tools from copying 1000M of "source"
It doesn't need a git repo, just the checkout. We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold.
This should significantly reduce IO and presumably time on buildbots during this long test.
|
|
|
|
|
| |
Add repeat, islice, chain, tee, teedataobject, and batched types to module state.
Automerge-Triggered-By: GH:erlend-aasland
|
|
|
|
| |
Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt
|
|
|
|
|
|
|
|
|
|
| |
* Write output and metadata in a single run
This halves the time to run the cases generator
(most of the time goes into parsing the input).
* Declare or define opcode metadata based on NEED_OPCODE_TABLES
* Use generated metadata for stack_effect()
* compile.o depends on opcode_metadata.h
* Return -1 from _PyOpcode_num_popped/pushed for unknown opcode
|
|
|
| |
Includes a slight improvement to `DECREF_INPUTS()`.
|
|
|
| |
New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
|
|
|
| |
Generator update: support balanced parentheses and brackets in conditions and size expressions.
|
|
|
| |
New generator feature: Generate useful glue for output arrays, so you can just write values to the output array (no bounds checking). Rewrote UNPACK_SEQUENCE_TWO_TUPLE to use this, and also UNPACK_SEQUENCE_{TUPLE,LIST}.
|
| |
|
|
|
|
|
| |
This is step 1 in potentially dropping all the "channel"-related code. Channels have already been removed from PEP 554.
https://github.com/python/cpython/issues/101524
|
|
|
|
| |
definition DSL (#101481)
|
| |
|
| |
|
|
|
|
| |
Also check for instructions straddling families (this includes macro parts).
|
|
|
|
| |
PyLongValue struct. (GH-101292)
|
| |
|
| |
|
|
|
|
|
|
| |
Fix two bugs in case generator
- UndefinedLocalError when generating metadata for an 'op'
- Accidental newline inserted in test_generator.py
|
| |
|
| |
|
|
|
| |
(And fix a bug that only occurs when you follow the advice.)
|
|
|
|
| |
* Make macro test more elaborate
* Add test for 'register inst()'
|
|
|
|
| |
(#101287)
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Fixes #100340 allows -Wno-int-conversion for wasm
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
MemoryError (#101051)
|
| |
|