summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
...
* GH-98831: Identify instructions that don't use oparg (#100957)Guido van Rossum2023-01-142-3/+13
| | | | | | | For these the instr_format field uses IX instead of IB. Register instructions use IX, IB, IBBX, IBBB, etc. Also: Include the closing '}' in Block.tokens, for completeness
* Don't double count misses. (GH-100984)Mark Shannon2023-01-131-0/+3
|
* GH-100997: Implement Multi-Phase Init for the _testinternalcapi Module ↵Eric Snow2023-01-122-3/+0
| | | | | | | (gh-100998) _testinternalcapi is an internal module used for testing. https://github.com/python/cpython/issues/100997
* GH-98831: Refactor instr format code and change to enum (#100895)Guido van Rossum2023-01-091-51/+53
|
* GH-98831: Add some tests for generate_cases.py (#100763)Guido van Rossum2023-01-061-0/+310
| | | | | | - This doesn't cover everything (far from it) but it's a start. - This uses pytest, which isn't ideal, but was quickest to get started. Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* GH-98831: Update generate_cases.py: register inst, opcode_metadata.h (#100735)Guido van Rossum2023-01-052-36/+231
| | | | | | | | (These aren't used yet, but may be coming soon, and it's easier to keep this tool the same between branches.) Added a sanity check for all this to compile.c. Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
* GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)Mark Shannon2023-01-041-6/+2
|
* gh-100720: refactor calculation of number of frame slots for a code object ↵Irit Katriel2023-01-041-0/+1
| | | | into the new function _PyFrame_NumSlotsForCodeObject (#100722)
* gh-89419: gdb: fix bug causing `AttributeError` in py-locals when no frame ↵Eli Schwartz2023-01-031-0/+1
| | | | is available (#100611)
* gh-100540: Remove obsolete Modules/_ctypes/darwin/ dlfcn shim (GH-100541)Zachary Ware2022-12-291-1/+0
| | | As far as I can tell, this hasn't been actually used since Mac OS X 10.2.
* gh-100540: Remove unused Modules/_ctypes/libffi_osx/ (GH-100543)Zachary Ware2022-12-282-6/+5
| | | | It was an ancient, modified copy of libffi that has not been in use since GH-22855.
* Fix copy-paste error in `Tools/clinic.py` (#100560)Nikita Sobolev2022-12-281-1/+1
|
* GH-100342: check for allocation failure in AC `*args` parsing (#100343)Kumar Aditya2022-12-281-0/+4
|
* GH-98831: Modernize a ton of simpler instructions (#100545)Guido van Rossum2022-12-281-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * load_const and load_fast aren't families for now * Don't decref unmoved names * Modernize GET_ANEXT * Modernize GET_AWAITABLE * Modernize ASYNC_GEN_WRAP * Modernize YIELD_VALUE * Modernize POP_EXCEPT (in more than one way) * Modernize PREP_RERAISE_STAR * Modernize LOAD_ASSERTION_ERROR * Modernize LOAD_BUILD_CLASS * Modernize STORE_NAME * Modernize LOAD_NAME * Modernize LOAD_CLASSDEREF * Modernize LOAD_DEREF * Modernize STORE_DEREF * Modernize COPY_FREE_VARS (mark it as done) * Modernize LIST_TO_TUPLE * Modernize LIST_EXTEND * Modernize SET_UPDATE * Modernize SETUP_ANNOTATIONS * Modernize DICT_UPDATE * Modernize DICT_MERGE * Modernize MAP_ADD * Modernize IS_OP * Modernize CONTAINS_OP * Modernize CHECK_EXC_MATCH * Modernize IMPORT_NAME * Modernize IMPORT_STAR * Modernize IMPORT_FROM * Modernize JUMP_FORWARD (mark it as done) * Modernize JUMP_BACKWARD (mark it as done)
* Remove `NoneType` redefinition from `clinic.py` (#100551)Nikita Sobolev2022-12-271-2/+0
|
* gh-100454: Start running SSL tests with OpenSSL 3.1.0-beta1 (#100456)Illia Volochii2022-12-241-4/+4
|
* GH-99770: Make the correct call specialization fail kind show up in the ↵penguin_wwy2022-12-221-1/+1
| | | | stats (GH-99771)
* GH-98831: Add DECREF_INPUTS(), expanding to DECREF() each stack input (#100205)Guido van Rossum2022-12-171-1/+5
| | | | | | | | | | | | | | | | | | | The presence of this macro indicates that a particular instruction may be considered for conversion to a register-based format (see https://github.com/faster-cpython/ideas/issues/485). An invariant (currently unchecked) is that `DEOPT_IF()` may only occur *before* `DECREF_INPUTS()`, and `ERROR_IF()` may only occur *after* it. One reason not to check this is that there are a few places where we insert *two* `DECREF_INPUTS()` calls, in different branches of the code. The invariant checking would have to be able to do some flow control analysis to understand this. Note that many instructions, especially specialized ones, can't be converted to use this macro straightforwardly. This is because the generator currently only generates plain `Py_DECREF(variable)` statements, and cannot generate things like `_Py_DECREF_SPECIALIZED()` let alone deal with `_PyList_AppendTakeRef()`.
* gh-81057: Move the Cached Parser Dummy Name to _PyRuntimeState (#100277)Eric Snow2022-12-161-4/+0
|
* Assorted minor fixes for specialization stats. (GH-100219)Mark Shannon2022-12-141-10/+5
|
* GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code ↵Mark Shannon2022-12-141-1/+1
| | | | unit. (GH-100223)
* gh-81057: Move _Py_RefTotal to the "Ignored Globals" List (gh-100203)Eric Snow2022-12-122-4/+7
| | | | | We can't move it to _PyRuntimeState because the symbol is exposed in the stable ABI. We'll have to sort that out before a per-interpreter GIL, but it shouldn't be too hard. https://github.com/python/cpython/issues/81057
* gh-81057: Move Signal-Related Globals to _PyRuntimeState (gh-100085)Eric Snow2022-12-121-7/+1
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move faulthandler Globals to _PyRuntimeState (gh-100152)Eric Snow2022-12-122-10/+1
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move tracemalloc Globals to _PyRuntimeState (gh-100151)Eric Snow2022-12-121-11/+0
| | | https://github.com/python/cpython/issues/81057
* GH-100143: Improve collecting pystats for parts of runs (GH-100144)Michael Droettboom2022-12-121-19/+29
| | | | | | | | * pystats off by default * Add -Xpystats flag * Always dump pystats, even if turned off
* gh-100176: remove incorrect version compatibility check from argument clinic ↵Shantanu2022-12-121-4/+0
| | | | (#100190)
* GH-98522: Add version number to code objects. (GH-98525)Mark Shannon2022-12-091-0/+5
| | | | | | * Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
* gh-81057: Move Threading-Related Globals to _PyRuntimeState (#100084)Eric Snow2022-12-092-6/+2
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move Ceval Trampoline Globals to _PyRuntimeState (gh-100083)Eric Snow2022-12-091-13/+1
| | | https://github.com/python/cpython/issues/81057
* GH-98831: Generate things in the input order (#100123)Guido van Rossum2022-12-081-24/+32
| | | | This makes it easier to see what changed in the generated code when converting an instruction to super or macro.
* gh-81057: Move time Globals to _PyRuntimeState (gh-100122)Eric Snow2022-12-081-6/+0
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move OS-Related Globals to _PyRuntimeState (gh-100082)Eric Snow2022-12-082-5/+6
| | | https://github.com/python/cpython/issues/81057
* GH-98831: Typed stack effects, and more instructions converted (#99764)Guido van Rossum2022-12-082-135/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stack effects can now have a type, e.g. `inst(X, (left, right -- jump/uint64_t)) { ... }`. Instructions converted to the non-legacy format: * COMPARE_OP * COMPARE_OP_FLOAT_JUMP * COMPARE_OP_INT_JUMP * COMPARE_OP_STR_JUMP * STORE_ATTR * DELETE_ATTR * STORE_GLOBAL * STORE_ATTR_INSTANCE_VALUE * STORE_ATTR_WITH_HINT * STORE_ATTR_SLOT, and complete the store_attr family * Complete the store_subscr family: STORE_SUBSCR{,DICT,LIST_INT} (STORE_SUBSCR was alread half converted, but wasn't using cache effects yet.) * DELETE_SUBSCR * PRINT_EXPR * INTERPRETER_EXIT (a bit weird, ends in return) * RETURN_VALUE * GET_AITER (had to restructure it some) The original had mysterious `SET_TOP(NULL)` before `goto error`. I assume those just account for `obj` having been decref'ed, so I got rid of them in favor of the cleanup implied by `ERROR_IF()`. * LIST_APPEND (a bit unhappy with it) * SET_ADD (also a bit unhappy with it) Various other improvements/refactorings as well.
* gh-81057: Move More Globals to _PyRuntimeState (gh-100092)Eric Snow2022-12-072-20/+0
| | | https://github.com/python/cpython/issues/81057
* gh-90110: Clean Up the C-analyzer Globals Lists (gh-100091)Eric Snow2022-12-073-440/+485
| | | https://github.com/python/cpython/issues/90110
* GH-100026: Include the number of raw input files in summarize_stats.py ↵Michael Droettboom2022-12-061-0/+4
| | | | (GH-100027)
* gh-99741: Implement Multi-Phase Init for the _xxsubinterpreters Module ↵Eric Snow2022-12-051-7/+0
| | | | | | | (gh-99742) _xxsubinterpreters is an internal module used for testing. https://github.com/python/cpython/issues/99741
* GH-98831: Support cache effects in super- and macro instructions (#99601)Guido van Rossum2022-12-033-270/+480
|
* GH-99905: Fix output of misses in summarize_stats.py execution counts (GH-99906)Michael Droettboom2022-11-301-3/+3
| | | This was an indentation error introduced in 2844aa6a
* gh-64490: Fix bugs in argument clinic varargs processing (#32092)colorfulappl2022-11-241-5/+6
|
* gh-99240: Fix double-free bug in Argument Clinic str_converter generated ↵colorfulappl2022-11-241-2/+23
| | | | | | | | code (GH-99241) Fix double-free bug mentioned at https://github.com/python/cpython/issues/99240, by moving memory clean up out of "exit" label. Automerge-Triggered-By: GH:erlend-aasland
* gh-64490: Fix refcount error when arguments are packed to tuple in argument ↵colorfulappl2022-11-241-1/+1
| | | | clinic (#99233)
* GH-98831: Add `macro` and `op` and their implementation to DSL (#99495)Guido van Rossum2022-11-234-73/+246
| | | | | | | | | | | | | | Newly supported interpreter definition syntax: - `op(NAME, (input_stack_effects -- output_stack_effects)) { ... }` - `macro(NAME) = OP1 + OP2;` Also some other random improvements: - Convert `WITH_EXCEPT_START` to use stack effects - Fix lexer to balk at unrecognized characters, e.g. `@` - Fix moved output names; support object pointers in cache - Introduce `error()` method to print errors - Introduce read_uint16(p) as equivalent to `*p` Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-96002: Add functional test for Argument Clinic (#96178)colorfulappl2022-11-211-0/+1
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-98831: Refactor and fix cases generator (#99526)Guido van Rossum2022-11-184-241/+344
| | | | Also complete cache effects for BINARY_SUBSCR family.
* gh-81057: Move the global Dict-Related Versions to _PyRuntimeState (gh-99497)Eric Snow2022-11-161-3/+0
| | | | | We also move the global func version. https://github.com/python/cpython/issues/81057
* gh-81057: Move contextvars-related Globals to _PyRuntimeState (gh-99400)Eric Snow2022-11-162-8/+3
| | | | | This is part of the effort to consolidate global variables, to make them easier to manage (and make it easier to later move some of them to PyInterpreterState). https://github.com/python/cpython/issues/81057
* gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516)Eric Snow2022-11-162-68/+96
| | | https://github.com/python/cpython/issues/81057
* GH-98831: Implement basic cache effects (#99313)Guido van Rossum2022-11-162-72/+154
|