summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* bpo-46831: Update __build_class__ comment (#31522)Shantanu2022-03-031-3/+2
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-46845: Reduce dict size when all keys are Unicode (GH-31564)Inada Naoki2022-03-011-40/+53
|
* bpo-46841: Use inline cache for `BINARY_SUBSCR`. (GH-31618)Mark Shannon2022-03-012-24/+38
|
* bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622)Brandt Bucher2022-03-012-33/+36
|
* compiler: Merge except_table and cnotab (GH-31614)Inada Naoki2022-03-011-0/+6
|
* bpo-46753: Add the empty tuple to the _PyRuntimeState.global_objects. (gh-31345)Eric Snow2022-02-281-5/+0
| | | https://bugs.python.org/issue46753
* bpo-45431: Rename CFrame to _PyCFrame in the C API (GH-31584)Victor Stinner2022-02-281-3/+3
| | | | | | Rename also struct _cframe to struct _PyCFrame. Add a comment suggesting using public functions rather than using directly the private _PyCFrame structure.
* bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)Mark Shannon2022-02-283-32/+38
|
* bpo-46841: Use inline caching for `UNPACK_SEQUENCE` (GH-31591)Brandt Bucher2022-02-282-26/+26
|
* Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)Kumar Aditya2022-02-261-1/+3
|
* bpo-46816: Remove declarations for non-__STDC__ compilers (GH-31466)Oleg Iarygin2022-02-251-6/+0
| | | | After Python switched to C11, there is a guarantee that every compiler conforms to ISO C so checks of __STDC__ have no sense.
* bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame (GH-31583)Victor Stinner2022-02-255-59/+59
| | | | | Rename also struct _interpreter_frame to struct _PyInterpreterFrame. Reduce risk of name conflicts if a project includes pycore_frame.h.
* bpo-45316: Move _PyArg_Fini() to internal C API (GH-31580)Victor Stinner2022-02-252-1/+2
| | | | Move the private unexported _PyArg_Fini() function to the internal C API: to the pycore_pylifecycle.h header file.
* bpo-45316: Move private functions to internal C API (GH-31579)Victor Stinner2022-02-251-1/+2
| | | | | | | | | Move the unexported private functions to the internal C API: * pycore_frame.h: _PyFrame_New_NoTrack() * pycore_function.h: _PyFunction_GetVersionForCurrentState() * pycore_genobject.h: _PyAsyncGenValueWrapperNew() * pycore_genobject.h: _PyCoro_GetAwaitableIter() * pycore_genobject.h: _PyGen_yf()
* bpo-46808: remove NEXT_BLOCK() from compile.c (GH-31448)Irit Katriel2022-02-251-63/+72
|
* bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543)Brandt Bucher2022-02-255-124/+143
|
* bpo-46748: Don't import <stdbool.h> in public headers (GH-31553)Petr Viktorin2022-02-251-0/+2
| | | | | | | <stdbool.h> is the standard/modern way to define embedd/extends Python free to define bool, true and false, but there are existing applications that use slightly different redefinitions, which fail if the header is included. It's OK to use stdbool outside the public headers, though. https://bugs.python.org/issue46748
* bpo-46656: Remove Py_NO_NAN macro (GH-31160)Victor Stinner2022-02-251-2/+0
| | | | Building Python now requires support for floating point Not-a-Number (NaN): remove the Py_NO_NAN macro.
* bpo-45107: Specialize `LOAD_METHOD` for instances with dict. (GH-31531)Mark Shannon2022-02-243-30/+102
|
* bpo-46430: Fix memory leak in interned strings of deep-frozen modules (GH-31549)Kumar Aditya2022-02-241-2/+4
|
* bpo-45459: C API uses type names rather than structure names (GH-31528)Victor Stinner2022-02-242-5/+5
| | | | Thanks to the new pytypedefs.h, it becomes to use type names like PyObject rather like structure names like "struct _object".
* bpo-46823: Implement LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE superinstruction ↵Dennis Sweeney2022-02-243-4/+88
| | | | (GH-31484)
* bpo-44337: Shrink the LOAD_ATTR/STORE_ATTR caches (GH-31517)Brandt Bucher2022-02-232-42/+33
|
* bpo-45412: Add _PY_SHORT_FLOAT_REPR macro (GH-31171)Victor Stinner2022-02-233-12/+13
| | | | | | | | | | Remove the HAVE_PY_SET_53BIT_PRECISION macro (moved to the internal C API). * Move HAVE_PY_SET_53BIT_PRECISION macro to pycore_pymath.h. * Replace PY_NO_SHORT_FLOAT_REPR macro with _PY_SHORT_FLOAT_REPR macro which is always defined. gcc -Wundef emits a warning when using _PY_SHORT_FLOAT_REPR but the macro is not defined, if pycore_pymath.h include was forgotten.
* bpo-45885: Don't un-adapt `COMPARE_OP` when collecting stats (GH-31516)Brandt Bucher2022-02-231-2/+8
|
* bpo-46329: Fix test failure when `Py_STATS` is enabled (GH-31511)Brandt Bucher2022-02-231-2/+1
|
* bpo-46765: Replace Locally Cached Strings with Statically Initialized ↵Eric Snow2022-02-236-162/+42
| | | | | Objects (gh-31366) https://bugs.python.org/issue46765
* Fix reporting of specialization stats. (GH-31503)Mark Shannon2022-02-221-0/+2
|
* Move call specializations from CALL to PRECALL. (GH-31496)Mark Shannon2022-02-223-149/+246
|
* bpo-46329: Streamline calling sequence a bit. (GH-31465)Mark Shannon2022-02-212-134/+158
| | | | | | | | | | | | | | * Move handling of bound-methods to PRECALL. * Remove call_shape.postcall_shrink * Remove call_shape.callable * Remove call_shape.callable. Change CALL oparg to match PRECALL oparg. * Move KW_NAMES before PRECALL. * Update opcode docs in dis.rst
* bpo-46329: Change calling sequence (again) (GH-31373)Mark Shannon2022-02-184-58/+49
| | | | * Change calling sequence: Add PUSH_NULL. Merge PRECALL_FUNCTION and PRECALL_METHOD into PRECALL.
* bpo-46709: check eval breaker in specialized `CALL` opcodes (GH-31404)Nikita Sobolev2022-02-181-0/+9
|
* bpo-46072: Add detailed failure stats for BINARY_OP (GH-31289)Brandt Bucher2022-02-161-12/+103
|
* bpo-46702: Specialize UNPACK_SEQUENCE (GH-31240)Brandt Bucher2022-02-163-79/+132
|
* bpo-46724: Use `JUMP_ABSOLUTE` for all backward jumps. (GH-31326)Mark Shannon2022-02-151-0/+5
| | | | | | | | | * Make sure all backward jumps use JUMP_ABSOLUTE. * Add news. * Fix up news item. * Make test use consistent style.
* bpo-46541: Discover the global strings. (gh-31346)Eric Snow2022-02-154-2/+13
| | | | | | | Instead of manually enumerating the global strings in generate_global_objects.py, we extrapolate the list from usage of _Py_ID() and _Py_STR() in the source files. This is partly inspired by gh-31261. https://bugs.python.org/issue46541
* Remove unnecessary basic block from comprehensions (GH-31263)Brandt Bucher2022-02-141-6/+3
|
* Add pair counts to stats output and summary. (GH-31324)Mark Shannon2022-02-141-5/+11
|
* Include length in stats for UNPACK_SEQUENCE. (GH-31254)Mark Shannon2022-02-142-8/+30
|
* bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)Petr Viktorin2022-02-111-1/+1
| | | | | * Make PyType_GetModuleByDef public (remove underscore) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-45490: Rename static inline functions (GH-31217)Victor Stinner2022-02-111-1/+1
| | | | | | | | | | | | When a static inline function is wrapped by a macro which casts its arguments to the expected type, there is no need that the function has a different name than the macro. Use the same name for the macro and the function to avoid confusion. Rename _PyUnicode_get_wstr_length() to PyUnicode_WSTR_LENGTH(). Don't rename static inline _Py_NewRef() and _Py_XNewRef() functions, since the C API exports Py_NewRef() and Py_XNewRef() functions as regular functions. The name cannot be reused in this case.
* bpo-45923: Add `RESUME_QUICK` (GH-31244)Brandt Bucher2022-02-103-13/+18
|
* Gather stats for PRECALL_METHOD. (GH-31259)Mark Shannon2022-02-102-2/+14
|
* bpo-46532: Reduce number of memory writes to update call_shape.kwnames. ↵Mark Shannon2022-02-101-7/+15
| | | | (GH-31231)
* Fix sys.getdxp() when configured with --enable-pystats. (GH-31251)Mark Shannon2022-02-101-1/+17
|
* Add stats for PRECALL_FUNCTION. (GH-31250)Mark Shannon2022-02-102-3/+34
|
* bpo-46528: Attempt SWAPs at compile-time (GH-30970)Brandt Bucher2022-02-091-0/+67
|
* bpo-46528: Check PyMem_Malloc for NULL (GH-30998)Brandt Bucher2022-02-091-8/+15
|
* bpo-46072: Output stats as markdown with collapsible sections. (GH-31228)Mark Shannon2022-02-091-189/+197
|
* bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized ↵Eric Snow2022-02-0815-599/+431
| | | | | | | | | | | | | | | | | | | | | | | | | | | | global objects. (gh-30928) We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code. It is still used in a number of non-builtin stdlib modules. The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime. A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings). https://bugs.python.org/issue46541#msg411799 explains the rationale for this change. The core of the change is in: * (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros * Include/internal/pycore_runtime_init.h - added the static initializers for the global strings * Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState * Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings. That check is added to the PR CI config. The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()). This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *. The following are not changed (yet): * stop using _Py_IDENTIFIER() in the stdlib modules * (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API * (maybe) intern the strings during runtime init https://bugs.python.org/issue46541