summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-102737: Un-ignore ceval.c in the CI globals check (gh-102745)Eric Snow2023-03-162-7/+7
| | | | | The tool now allows user-added #LINE preprocessor directives. https://github.com/python/cpython/issues/102737
* gh-102738: remove from cases generator the code related to register ↵Irit Katriel2023-03-151-126/+64
| | | | instructions (#102739)
* Exclude `ceval.c` from the C-analyzer tool (#102735)Alex Waygood2023-03-151-0/+5
| | | | | | | | | | 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!
* gh-102654: Insert #line directives in generated_cases.c.h (#102669)Guido van Rossum2023-03-151-16/+73
| | | | | | | | | 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.
* gh-81057: Add a CI Check for New Unsupported C Global Variables (gh-102506)Eric Snow2023-03-145-20/+81
| | | | | | | | | | | 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
* GH-94851: check unicode consistency of static strings in debug mode (#102684)Kumar Aditya2023-03-141-0/+1
|
* gh-81057: Vendor a Subset of distutils for the c-analyzer Tool (gh-102505)Eric Snow2023-03-0915-0/+2301
| | | | | 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.
* gh-102507 Remove invisible pagebreak characters (#102531)JosephSBoyle2023-03-081-7/+4
| | | Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
* gh-90110: Fix the c-analyzer Tool (#102483)Eric Snow2023-03-076-21/+70
| | | | | | | 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
* gh-102416: Do not memoize incorrectly loop rules in the parser (#102467)Pablo Galindo Salgado2023-03-061-2/+3
|
* gh-102021 : Allow multiple input files for interpreter loop generator (#102022)Jacob Bower2023-03-043-36/+98
| | | The input files no longer use `-i`.
* GH-102305: Expand some macros in generated_cases.c.h (#102309)Guido van Rossum2023-02-281-27/+21
| | | | * Emit straight stack_pointer[-i] instead of PEEK(i), POKE(i, ...) * Expand JUMPBY() and NEXTOPARG(), and fix a perf bug
* gh-102151: Correctly fetch CONFIG_ARGS in Tools/freeze/test/freeze.py (#102152)Erlend E. Aasland2023-02-231-1/+1
|
* gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)Steve Dower2023-02-201-3/+4
| | | | | | * gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h * Make cases_generator correct on Windows
* gh-101819: Adapt _io types to heap types, batch 1 (GH-101949)Erlend E. Aasland2023-02-201-8/+0
| | | | | Adapt StringIO, TextIOWrapper, FileIO, Buffered*, and BytesIO types. Automerge-Triggered-By: GH:erlend-aasland
* gh-99138: Isolate _zoneinfo (#99218)Erlend E. Aasland2023-02-151-11/+0
| | | | * Convert zone info type to heap type and add it to module state * Add global variables to module state
* gh-101849: Add upgrade codes for old versions of launcher that ended up with ↵Steve Dower2023-02-132-1/+22
| | | | later version numbers (GH-101877)
* gh-89792: Limit test_tools freeze test build parallelism based on the number ↵Gregory P. Smith2023-02-121-3/+12
| | | | | 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).
* gh-89792: Prevent test_tools from copying 1000M of "source" in freeze test ↵Gregory P. Smith2023-02-121-1/+13
| | | | | | | | | (#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.
* gh-101277: Finalise isolating itertools (GH-101305)Erlend E. Aasland2023-02-101-22/+0
| | | | | Add repeat, islice, chain, tee, teedataobject, and batched types to module state. Automerge-Triggered-By: GH:erlend-aasland
* gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727)Gregory P. Smith2023-02-091-2/+2
| | | | Fixes CVE-2023-0286 (High) and a couple of Medium security issues. https://www.openssl.org/news/secadv/20230207.txt
* gh-98831: Use opcode metadata for stack_effect() (#101704)Guido van Rossum2023-02-091-19/+25
| | | | | | | | | | * 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
* gh-98831: Modernize CALL and family (#101508)Guido van Rossum2023-02-081-5/+16
| | | Includes a slight improvement to `DECREF_INPUTS()`.
* gh-98831: Modernize CALL_FUNCTION_EX (#101627)Guido van Rossum2023-02-082-5/+19
| | | New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
* gh-98831: Modernize FORMAT_VALUE (#101628)Guido van Rossum2023-02-082-5/+12
| | | Generator update: support balanced parentheses and brackets in conditions and size expressions.
* gh-98831: Finish the UNPACK_SEQUENCE family (#101666)Guido van Rossum2023-02-072-18/+26
| | | 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}.
* gh-98831: Move DSL documentation here from ideas repo (#101629)Guido van Rossum2023-02-072-3/+415
|
* gh-101524: Split Up the _xxsubinterpreters Module (gh-101526)Eric Snow2023-02-041-0/+1
| | | | | 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
* gh-98831: rewrite PUSH_EXC_INFO and conditional jumps in the instruction ↵Irit Katriel2023-02-011-1/+1
| | | | definition DSL (#101481)
* gh-101409: Improve generated clinic code for self type checks (#101411)Erlend E. Aasland2023-01-311-10/+12
|
* gh-98831: Clean up and add cache size static_assert to macro (#101442)Guido van Rossum2023-01-312-4/+24
|
* GH-101369: Allow macros as family members (#101399)Guido van Rossum2023-01-302-36/+93
| | | | Also check for instructions straddling families (this includes macro parts).
* GH-101291: Refactor the `PyLongObject` struct into object header and ↵Mark Shannon2023-01-301-1/+1
| | | | PyLongValue struct. (GH-101292)
* gh-98831: Support conditional effects; use for LOAD_ATTR (#101333)Guido van Rossum2023-01-303-69/+159
|
* gh-99834: Update bundled copy of Tcl/Tk to 8.6.13.0 on Windows (GH-101307)Steve Dower2023-01-261-0/+3
|
* gh-98831: Fix two bugs in case generator (#101349)Guido van Rossum2023-01-262-5/+8
| | | | | | Fix two bugs in case generator - UndefinedLocalError when generating metadata for an 'op' - Accidental newline inserted in test_generator.py
* gh-98831: rewrite RAISE_VARARGS in the instruction definition DSL (#101306)Irit Katriel2023-01-251-2/+4
|
* gh-98831: add variable stack effect support to cases generator (#101309)Irit Katriel2023-01-251-18/+60
|
* Add advice how to freeze fewer modules (#101298)Guido van Rossum2023-01-251-1/+6
| | | (And fix a bug that only occurs when you follow the advice.)
* GH-98831: Elaborate some cases_generator tests (#101299)Guido van Rossum2023-01-251-13/+41
| | | | * Make macro test more elaborate * Add test for 'register inst()'
* gh-98831: rewrite pattern matching opcodes in the instruction definition DSL ↵Irit Katriel2023-01-242-4/+18
| | | | (#101287)
* GH-91375: Purge `asyncio` static variables from globals-to-fix list (#101288)Erlend E. Aasland2023-01-241-23/+0
|
* GH-92123: Move _elementtree heap types to module state (#101187)Erlend E. Aasland2023-01-211-4/+0
|
* gh-98831: register instructions have 0 pushes and pops (#101163)Irit Katriel2023-01-191-0/+1
|
* gh-100712: make it possible to disable specialization (for debugging) (#100713)Irit Katriel2023-01-191-0/+5
|
* gh-100340: Allows -Wno-int-conversion for wasm (#100341)Kushal Das2023-01-181-0/+3
| | | Fixes #100340 allows -Wno-int-conversion for wasm
* Fix typo and old link in wasm readme (#101096)Zac Hatfield-Dodds2023-01-181-2/+2
|
* GH-98831: Implement array support in cases generator (#100912)Guido van Rossum2023-01-173-56/+303
| | | | | | | | 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).
* gh-101046: Fix a potential memory leak in the parser when raising ↵Pablo Galindo Salgado2023-01-161-1/+1
| | | | MemoryError (#101051)
* GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)Mark Shannon2023-01-161-0/+2
|