summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* bpo-44874: deprecate Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END (GH-27693)Irit Katriel2021-08-181-4/+13
| | | | Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767)Dong-hee Na2021-08-171-0/+1
|
* bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)Ken Jin2021-08-172-9/+20
| | | | | | | | Adds four new instructions: * LOAD_METHOD_ADAPTIVE * LOAD_METHOD_CACHED * LOAD_METHOD_MODULE * LOAD_METHOD_CLASS
* bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)Hai Shi2021-08-171-0/+1
|
* bpo-44900: Add five superinstructions. (GH-27741)Mark Shannon2021-08-161-0/+5
| | | | | | | | * LOAD_FAST LOAD_FAST * STORE_FAST LOAD_FAST * LOAD_FAST LOAD_CONST * LOAD_CONST LOAD_FAST * STORE_FAST STORE_FAST
* bpo-44890: Fix AMD build error (GH-27740)Irit Katriel2021-08-121-2/+7
|
* bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)Irit Katriel2021-08-121-5/+8
|
* Classify specialization failures. Provides more useful stats, with lower ↵Mark Shannon2021-08-101-1/+3
| | | | overhead. (GH-27701)
* bpo-44826: Specialize STORE_ATTR (GH-27590)Mark Shannon2021-08-093-2/+10
| | | | | | | * Generalize cache names for LOAD_ATTR to allow store and delete specializations. * Factor out specialization of attribute dictionary access. * Specialize STORE_ATTR.
* bpo-44821: Eagerly assign __dict__ for new objects. (GH-27589)Mark Shannon2021-08-041-0/+2
|
* Add option to write specialization stats to files and script to summarize. ↵Mark Shannon2021-08-041-0/+1
| | | | | | | (GH-27575) * Add option to write stats to random file in a directory. * Add script to summarize stats.
* Minor fixes to specialization stats. (GH-27457)Mark Shannon2021-07-291-0/+2
| | | | | * Use class, not value for fail stats for BINARY_SUBSCR. * Fix counts for unquickened instructions.
* bpo-44725 : expose specialization stats in python (GH-27192)Irit Katriel2021-07-291-0/+3
|
* bpo-41103: Resurrect the old buffer protocol. (GH-27437)Inada Naoki2021-07-291-0/+47
| | | | | Revert "bpo-41103: Remove old buffer protocol support (#21117)" This reverts commit 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.
* bpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903)Hai Shi2021-07-291-0/+3
|
* closes bpo-44751: Move crypt.h include from public header to _cryptmodule ↵Geoffrey Thomas2021-07-271-13/+0
| | | | | (GH-27394) Automerge-Triggered-By: GH:benjaminp
* bpo-44590: Lazily allocate frame objects (GH-27077)Mark Shannon2021-07-267-67/+116
| | | | | | | | | | | | | | * Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it. * Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector. * Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation. * Move ownership of InterpreterFrame in generator from frame object to generator object. * Do not create frame objects for Python calls. * Do not create frame objects for generators.
* bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make ↵Petr Viktorin2021-07-231-14/+12
| | | | | | | | | | | | Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) * Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG The field is always present in the type struct, as explained in the added comment. * Remove Py_TPFLAGS_HAVE_AM_SEND The flag is not needed, and since it was added in 3.10 it can be removed now.
* bpo-44654: Do not export the union type related symbols (GH-27223)Serhiy Storchaka2021-07-181-4/+4
|
* bpo-44654: Refactor and clean up the union type implementation (GH-27196)Serhiy Storchaka2021-07-172-8/+7
|
* Remove legacy opcache structs (GH-27164)Ken Jin2021-07-162-25/+0
|
* bpo-20201: variadic arguments support for AC (GH-18609)Batuhan Taskaya2021-07-161-1/+10
| | | Implement support for `*args` in AC, and port `print()` to use it.
* bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)Irit Katriel2021-07-152-11/+16
|
* bpo-44207: Add an internal version number to function objects. (GH-27078)Mark Shannon2021-07-121-0/+10
|
* bpo-43950: Add option to opt-out of PEP-657 (GH-27023)Ammar Askar2021-07-071-0/+1
| | | | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-44530: Add co_qualname field to PyCodeObject (GH-26941)Gabriele N. Tornetta2021-07-072-4/+6
|
* bpo-44490: Add __parameters__ and __getitem__ to types.Union (GH-26980)Yurii Karabas2021-07-061-0/+5
| | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* bpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)Ammar Askar2021-07-041-1/+1
| | | | | | | | The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location to print carets on the specific expressions involved in a traceback. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-43950: Add code.co_positions (PEP 657) (GH-26955)Pablo Galindo2021-07-022-4/+23
| | | | | | | | | | | | | | | This PR is part of PEP 657 and augments the compiler to emit ending line numbers as well as starting and ending columns from the AST into compiled code objects. This allows bytecodes to be correlated to the exact source code ranges that generated them. This information is made available through the following public APIs: * The `co_positions` method on code objects. * The C API function `PyCode_Addr2Location`. Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-44531: Add _PyType_AllocNoTrack() function (GH-26947)Victor Stinner2021-07-011-0/+2
| | | | | | | | | | | | Add an internal _PyType_AllocNoTrack() function to allocate an object without tracking it in the GC. Modify dict_new() to use _PyType_AllocNoTrack(): dict subclasses are now only tracked once all PyDictObject members are initialized. Calling _PyObject_GC_UNTRACK() is no longer needed for the dict type. Similar change in tuple_subtype_new() for tuple subclasses. Replace tuple_gc_track() with _PyObject_GC_TRACK().
* bpo-44313: generate LOAD_ATTR/CALL_FUNCTION for top-level imported objects ↵Batuhan Taskaya2021-06-301-0/+1
| | | | (GH-26677)
* bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839)Guido van Rossum2021-06-231-6/+0
| | | | | | All uses of this flag are either setting it or in doc or tests for it. So we should be able to get rid of it completely.
* bpo-39947: Remove old private trashcan C API functions (GH-26869)Victor Stinner2021-06-231-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove 4 C API private trashcan functions which were only kept for the backward compatibility of the stable ABI with Python 3.8 and older, since the trashcan API was not usable with the limited C API on Python 3.8 and older. The trashcan API was excluded from the limited C API in Python 3.9. Removed functions: * _PyTrash_deposit_object() * _PyTrash_destroy_chain() * _PyTrash_thread_deposit_object() * _PyTrash_thread_destroy_chain() The trashcan C API was never usable with the limited C API, since old trashcan macros accessed directly PyThreadState members like "_tstate->trash_delete_nesting", whereas the PyThreadState structure is opaque in the limited C API. Exclude also the PyTrash_UNWIND_LEVEL constant from the C API. The trashcan C API was modified in Python 3.9 by commit 38965ec5411da60d312b59be281f3510d58e0cf1 and in Python 3.10 by commit ed1a5a5baca8f61e9a99c5be3adc16b1801514fe to hide implementation details.
* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808)Russell Keith-Magee2021-06-221-1/+1
| | | * bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated.
* bpo-43693: Turn localspluskinds into an object (GH-26749)Guido van Rossum2021-06-212-27/+18
| | | Managing it as a bare pointer to malloc'ed bytes is just too awkward in a few places.
* bpo-44337: Improve LOAD_ATTR specialization (GH-26759)Mark Shannon2021-06-211-0/+1
| | | | | | | | * Specialize obj.__class__ with LOAD_ATTR_SLOT * Specialize instance attribute lookup with attribute on class, provided attribute on class is not an overriding descriptor. * Add stat for how many times the unquickened instruction has executed.
* bpo-44032: Move pointer to code object from frame-object to frame specials ↵Mark Shannon2021-06-182-2/+9
| | | | array. (GH-26771)
* bpo-43693: Eliminate unused "fast locals". (gh-26587)Eric Snow2021-06-152-8/+2
| | | | | Currently, if an arg value escapes (into the closure for an inner function) we end up allocating two indices in the fast locals even though only one gets used. Additionally, using the lower index would be better in some cases, such as with no-arg `super()`. To address this, we update the compiler to fix the offsets so each variable only gets one "fast local". As a consequence, now some cell offsets are interspersed with the locals (only when an arg escapes to an inner function). https://bugs.python.org/issue43693
* Add extra stats for attribute misses (GH-26732)Mark Shannon2021-06-151-0/+5
|
* bpo-44338: Port LOAD_GLOBAL to PEP 659 adaptive interpreter (GH-26638)Mark Shannon2021-06-143-24/+18
| | | | | | | | | | * Add specializations of LOAD_GLOBAL. * Add more stats. * Remove old opcache; it is no longer used. * Add NEWS
* Add more const modifiers. (GH-26691)Serhiy Storchaka2021-06-122-5/+5
|
* bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)Victor Stinner2021-06-111-1/+3
| | | | Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning: no longer cast "const PyObject*" to "PyObject*".
* bpo-44363: Get test_capi passing with address sanitizer (GH-26639)Mark Shannon2021-06-101-1/+10
|
* bpo-44348: Move trace-info to thread-state (GH-26623)Mark Shannon2021-06-101-0/+6
| | | | | * Move trace-info to thread state. * Correct output for pdb when turning on tracing in middle of line
* bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)Mark Shannon2021-06-103-0/+186
| | | | | | | | | | | | | | * Specialize LOAD_ATTR with LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS * Move dict-common.h to internal/pycore_dict.h * Add LOAD_ATTR_WITH_HINT specialized opcode. * Quicken in function if loopy * Specialize LOAD_ATTR for module attributes. * Add specialization stats
* bpo-43693: Un-revert commit f3fa63e. (#26609)Eric Snow2021-06-083-6/+16
| | | | | | | | | This was reverted in GH-26596 (commit 6d518bb) due to some bad memory accesses. * Add the MAKE_CELL opcode. (gh-26396) The memory accesses have been fixed. https://bugs.python.org/issue43693
* Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals ↵Pablo Galindo2021-06-083-16/+6
| | | | | offsets. (gh-26396)" (GH-26597) This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.
* bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function ↵Pablo Galindo2021-06-081-8/+2
| | | | | | (GH-26493)" (GH-26596) This reverts commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 as is causing crashes in some Windows tests in the buildbots.
* bpo-43693: Silence some compiler warnings. (gh-26588)Eric Snow2021-06-072-5/+2
| | | | | | | The plan is to eventually make PyCodeObject opaque in the public C-API, with the full struct moved to Include/internal/pycore_code.h. _PyLocalsPlusKinds and _PyLocalsPlusKind started off there but were needed on PyCodeObject, hence the duplication. This led to warnings with some compilers. (Apparently it does not trigger a warning on my install of GCC.) This change eliminates the superfluous typedef. https://bugs.python.org/issue43693
* bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. ↵Eric Snow2021-06-073-6/+16
| | | | | | | (gh-26396) This moves logic out of the frame initialization code and into the compiler and eval loop. Doing so simplifies the runtime code and allows us to optimize it better. https://bugs.python.org/issue43693