summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* gh-101037: Fix potential memory underallocation for zeros of int subtypes ↵Mark Dickinson2023-01-211-0/+3
| | | | | | | | | (#101038) This PR fixes object allocation in long_subtype_new to ensure that there's at least one digit in all cases, and makes sure that the value of that digit is copied over from the source long. Needs backport to 3.11, but not any further: the change to require at least one digit was only introduced for Python 3.11. Fixes #101037.
* gh-59956: Clarify GILState-related Code (gh-101161)Eric Snow2023-01-195-18/+27
| | | | | | | | | | The objective of this change is to help make the GILState-related code easier to understand. This mostly involves moving code around and some semantically equivalent refactors. However, there are a also a small number of slight changes in structure and behavior: * tstate_current is moved out of _PyRuntimeState.gilstate * autoTSSkey is moved out of _PyRuntimeState.gilstate * autoTSSkey is initialized earlier * autoTSSkey is re-initialized (after fork) earlier https://github.com/python/cpython/issues/59956
* gh-100712: make it possible to disable specialization (for debugging) (#100713)Irit Katriel2023-01-191-0/+2
|
* GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)Mark Shannon2023-01-163-21/+23
|
* GH-100892: consolidate `HEAD_LOCK/HEAD_UNLOCK` macros (#100953)Kumar Aditya2023-01-151-0/+6
|
* GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924)Mark Shannon2023-01-112-2/+22
|
* Post 3.12.0a4Thomas Wouters2023-01-101-1/+1
|
* Python 3.12.0a4v3.12.0a4Thomas Wouters2023-01-101-2/+2
|
* GH-100126: Skip incomplete frames in more places (GH-100613)Brandt Bucher2023-01-091-0/+15
|
* gh-100758: Refactor initialisation of frame headers into a single function ↵Irit Katriel2023-01-061-4/+8
| | | | (_PyFrame_Initialize) (GH-100759)
* GH-99005: More intrinsics (GH-100774)Mark Shannon2023-01-064-90/+90
| | | * Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
* GH-99005: Add `CALL_INTRINSIC_1` instruction (GH-100771)Mark Shannon2023-01-053-55/+63
| | | | | | | | * Remove PRINT_EXPR instruction * Remove STOPITERATION_ERROR instruction * Remove IMPORT_STAR instruction
* GH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (GH-100753)Mark Shannon2023-01-052-27/+26
|
* GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)Mark Shannon2023-01-041-1/+5
|
* gh-100720: refactor calculation of number of frame slots for a code object ↵Irit Katriel2023-01-041-1/+10
| | | | into the new function _PyFrame_NumSlotsForCodeObject (#100722)
* gh-100146: Steal references from stack when building a list (#100147)L. A. F. Pereira2023-01-031-0/+2
| | | | | | | | | | When executing the BUILD_LIST opcode, steal the references from the stack, in a manner similar to the BUILD_TUPLE opcode. Implement this by offloading the logic to a new private API, _PyList_FromArraySteal(), that works similarly to _PyTuple_FromArraySteal(). This way, instead of performing multiple stack pointer adjustments while the list is being initialized, the stack is adjusted only once and a fast memory copy operation is performed in one fell swoop.
* Fix `pydtrace.d` path comment in `Include/pydtrace.h` (#28539)Mark Hansen2022-12-311-1/+1
|
* gh-100228: Warn from os.fork() if other threads exist. (#100229)Gregory P. Smith2022-12-294-0/+10
| | | | | Not comprehensive, best effort warning. There are cases when threads exist on some platforms that this code cannot detect. macOS when API permissions allow and Linux with a readable /proc procfs present are the currently supported cases where a warning should show up reliably. Starting with a DeprecationWarning for now, it is less disruptive than something like RuntimeWarning and most likely to only be seen in people's CI tests - a good place to start with this messaging.
* Revert "gh-100288: Specialise LOAD_ATTR_METHOD for managed dictionaries ↵Ken Jin2022-12-232-29/+28
| | | | | (GH-100289)" (#100468) This reverts commit c3c7848a48b74a321632202e4bdcf2f465fb1cc6.
* gh-100288: Specialise LOAD_ATTR_METHOD for managed dictionaries (GH-100289)Ken Jin2022-12-232-28/+29
|
* gh-92216: improve performance of `hasattr` for type objects (GH-99979)Pieter Eendebak2022-12-231-0/+4
|
* gh-99110: Initialize `frame->previous` in init_frame to fix segmentation ↵Bill Fisher2022-12-231-1/+4
| | | | fault when accessing `frame.f_back` (#100182)
* gh-99761: Add `_PyLong_IsPositiveSingleDigit` function to check for single ↵Pieter Eendebak2022-12-221-0/+19
| | | | digit integers (#100064)
* Better stats for `LOAD_ATTR` and `STORE_ATTR` (GH-100295)Mark Shannon2022-12-161-1/+1
| | | | | * Don't attempt to specialize for LOAD_ATTR on instance if class has attribute * Improvement to LOAD_ATTR and STORE_ATTR specialization stats.
* gh-81057: Move the Cached Parser Dummy Name to _PyRuntimeState (#100277)Eric Snow2022-12-162-1/+18
|
* Move stats for the method cache into the `Py_STAT` machinery (GH-100255)Mark Shannon2022-12-152-6/+7
|
* GH-100222: fix typo _py_set_opocde -> _py_set_opcode (GH-100259)Carl Meyer2022-12-151-1/+1
| | | | | Typo introduced in #100223. Automerge-Triggered-By: GH:brandtbucher
* GH-100000: Cleanup and polish various watchers code (GH-99998)Itamar Ostricher2022-12-141-1/+0
| | | | | | * Initialize `type_watchers` array to `NULL`s * Optimize code watchers notification * Optimize func watchers notification
* gh-90111: Minor Cleanup for Runtime-Global Objects (gh-100254)Eric Snow2022-12-143-6/+6
| | | | | | | | * move _PyRuntime.global_objects.interned to _PyRuntime.cached_objects.interned_strings (and use _Py_CACHED_OBJECT()) * rename _PyRuntime.global_objects to _PyRuntime.static_objects (This also relates to gh-96075.) https://github.com/python/cpython/issues/90111
* GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code ↵Mark Shannon2022-12-142-38/+41
| | | | unit. (GH-100223)
* gh-81057: Move Signal-Related Globals to _PyRuntimeState (gh-100085)Eric Snow2022-12-123-5/+66
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move faulthandler Globals to _PyRuntimeState (gh-100152)Eric Snow2022-12-123-0/+102
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move tracemalloc Globals to _PyRuntimeState (gh-100151)Eric Snow2022-12-124-28/+124
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Fix the wasm32-wasi Buildbot (gh-100139)Eric Snow2022-12-091-1/+1
| | | | | The build was broken by gh-100084. https://github.com/python/cpython/issues/81057
* GH-98522: Add version number to code objects. (GH-98525)Mark Shannon2022-12-092-0/+3
| | | | | | * Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
* gh-88267: Avoid DLL exporting functions from static builds on Windows(GH-99888)Christian Rendina2022-12-091-3/+9
|
* GH-100110: Specialize FOR_ITER for tuples (GH-100109)Ken Jin2022-12-093-41/+49
| | | * Specialize FOR_ITER for tuples
* gh-81057: Move Threading-Related Globals to _PyRuntimeState (#100084)Eric Snow2022-12-092-0/+83
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move Ceval Trampoline Globals to _PyRuntimeState (gh-100083)Eric Snow2022-12-094-41/+105
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move time Globals to _PyRuntimeState (gh-100122)Eric Snow2022-12-085-41/+28
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move OS-Related Globals to _PyRuntimeState (gh-100082)Eric Snow2022-12-087-0/+51
| | | https://github.com/python/cpython/issues/81057
* gh-81057: Move More Globals to _PyRuntimeState (gh-100092)Eric Snow2022-12-076-4/+37
| | | https://github.com/python/cpython/issues/81057
* gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#100070)Victor Stinner2022-12-073-27/+96
| | | | | | | | | | | | | | The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their arguments once. If an argument has side effects, these side effects are no longer duplicated. Use temporary variables to avoid duplicating side effects of macro arguments. If available, use _Py_TYPEOF() to avoid type punning. Otherwise, use memcpy() for the assignment to prevent a miscompilation with strict aliasing caused by type punning. Add _Py_TYPEOF() macro: __typeof__() on GCC and clang. Add test_py_clear() and test_py_setref() unit tests to _testcapi.
* PyUnicode_KIND() uses _Py_RVALUE() (#100060)Victor Stinner2022-12-061-1/+1
| | | | The PyUnicode_KIND() macro is modified to use _Py_RVALUE(), so it can no longer be used as a l-value.
* Post 3.12.0a3Thomas Wouters2022-12-061-1/+1
|
* Python 3.12.0a3v3.12.0a3Thomas Wouters2022-12-061-2/+2
|
* gh-99741: Implement Multi-Phase Init for the _xxsubinterpreters Module ↵Eric Snow2022-12-051-3/+18
| | | | | | | (gh-99742) _xxsubinterpreters is an internal module used for testing. https://github.com/python/cpython/issues/99741
* no-issue: Fix typo in pycore_object.h (gh-99994)Ikko Ashimine2022-12-051-1/+1
|
* gh-99741: Clean Up the _xxsubinterpreters Module (gh-99940)Eric Snow2022-12-021-1/+1
| | | | | This cleanup up resolves a few subtle bugs and makes the implementation for multi-phase init much cleaner. https://github.com/python/cpython/issues/99741
* gh-99741: Fix the Cross-Interpreter Data API (gh-99939)Eric Snow2022-12-022-2/+4
| | | | | There were some minor issues that showed up while I was working on porting _xxsubinterpreters to multi-phase init. This fixes them. https://github.com/python/cpython/issues/99741