summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Revert "bpo-44800: Document internal frame naming conventions (GH-32281)" ↵Mark Shannon2022-04-041-69/+0
| | | | | (#32301) This reverts commit 124227c95f310d2ecd4b567271ab1919fc7000cb.
* bpo-47000: Make `io.text_encoding()` respects UTF-8 mode (GH-32003)Inada Naoki2022-04-042-0/+2
| | | Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* bpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads ↵Hood Chatham2022-04-031-0/+25
| | | | | | (GH-32209) Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Brett Cannon <brett@python.org>
* bpo-44800: Document internal frame naming conventions (GH-32281)Nick Coghlan2022-04-031-0/+69
| | | | | | | | | | The fact interpreter frames were split out from full frame objects rather than always being part of the eval loop implementation means that it's tricky to infer the expected naming conventions simply from looking at the code. Documenting the de facto conventions in pycore_frame.h means future readers of the code will have a clear explanation of the rationale for those conventions (i.e. minimising non-functional code churn).
* bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)Irit Katriel2022-04-011-36/+36
|
* bpo-47009: Streamline list.append for the common case (GH-31864)Dennis Sweeney2022-04-011-0/+18
|
* bpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API ↵Victor Stinner2022-04-013-12/+16
| | | | | | | | | | | (GH-32054) Move the private _PyFrameEvalFunction type, and private _PyInterpreterState_GetEvalFrameFunc() and _PyInterpreterState_SetEvalFrameFunc() functions to the internal C API. The _PyFrameEvalFunction callback function type now uses the _PyInterpreterFrame type which is part of the internal C API. Update the _PyFrameEvalFunction documentation.
* bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)Victor Stinner2022-04-012-2/+5
| | | | | Move the private undocumented _PyEval_EvalFrameDefault() function to the internal C API. The function now uses the _PyInterpreterFrame type which is part of the internal C API.
* bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)Mark Shannon2022-03-311-0/+5
|
* bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD ↵Irit Katriel2022-03-311-8/+8
| | | | (GH-32115)
* bpo-47164: Add _PyCFunctionObject_CAST() macr (GH-32190)Victor Stinner2022-03-311-6/+11
| | | | | | | | Add _PyCFunctionObject_CAST() and _PyCMethodObject_CAST() macros to make macros casting their argument easier to read, but also to check the type of their input in debug mode: assert(PyCFunction_Check(func) and assert(PyCMethod_Check(func). Reformat also PyCFunction_XXX() macros for readability.
* bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)Victor Stinner2022-03-311-0/+18
| | | Use the macro in C files of the Python/ directory.
* bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191)Victor Stinner2022-03-312-34/+35
| | | | | | | | | | | | Add macros to cast objects to PyASCIIObject*, PyCompactUnicodeObject* and PyUnicodeObject*: _PyASCIIObject_CAST(), _PyCompactUnicodeObject_CAST() and _PyUnicodeObject_CAST(). Using these new macros make the code more readable and check their argument with: assert(PyUnicode_Check(op)). Remove redundant assert(PyUnicode_Check(op)) in macros using directly or indirectly these new CAST macros. Replacing existing casts with these macros.
* bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189)Christian Heimes2022-03-301-0/+27
|
* Merge deoptimization blocks in interpreter (GH-32155)Mark Shannon2022-03-301-0/+2
|
* bpo-47070: Add _PyBytes_Repeat() (GH-31999)Pieter Eendebak2022-03-281-0/+13
| | | Use it where appropriate: the repeat functions of `array.array`, `bytes`, `bytearray`, and `str`.
* bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)Kumar Aditya2022-03-271-26/+28
| | | | * add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
* bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)Dennis Sweeney2022-03-251-1/+1
| | | | | * Don't deopt if refcounts are too big * Detect more at specialization time
* bpo-42197: Don't create `f_locals` dictionary unless we actually need it. ↵Mark Shannon2022-03-252-0/+2
| | | | | | | | | | | (GH-32055) * `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer called during profile and tracing. (Contributed by Fabio Zadrozny) * Make accesses to a frame's `f_locals` safe from C code, not relying on calls to `PyFrame_FastToLocals` or `PyFrame_LocalsToFast`. * Document new `PyFrame_GetLocals` C-API function.
* bpo-46541: Add a Comment About When to Use _Py_DECLARE_STR(). (gh-32063)Eric Snow2022-03-231-0/+10
| | | | | In a gh-32003 comment, I realized it wasn't very clear how _Py_DECLARE_STR() should be used. This changes adds a comment to clarify. https://bugs.python.org/issue46541
* bpo-47012: speed up iteration of bytes and bytearray (GH-31867)Kumar Aditya2022-03-231-2/+8
|
* bpo-43166: Disable ceval.c optimizations for Windows debug builds (GH-32023)neonene2022-03-231-11/+0
| | | Also increases the stack allocation when run with `python_d.exe` to account for the extra stack checks that are added.
* bpo-47045: Remove `f_state` field (GH-31963)Mark Shannon2022-03-223-27/+22
| | | | | * Remove the f_state field from _PyInterpreterFrame * Make ownership of the frame explicit, replacing the is_generator field with an owner field.
* bpo-47084: Clear Unicode cached representations on finalization (GH-32032)Jeremy Kloth2022-03-221-0/+1
|
* Fix typo in pycore_bytesobject.h (GH-31914)jonasdlindner2022-03-211-1/+1
|
* bpo-47067: Optimize calling GenericAlias objects (GH-31996)penguin_wwy2022-03-212-0/+2
| | | Use vectorcall, and replace `PyObject_SetAttrString` with `PyObject_SetAttr` and a global string.
* bpo-46841: Quicken code in-place (GH-31888)Brandt Bucher2022-03-213-300/+464
| | | | | | | | | | | | | | | | | | | * Moves the bytecode to the end of the corresponding PyCodeObject, and quickens it in-place. * Removes the almost-always-unused co_varnames, co_freevars, and co_cellvars member caches * _PyOpcode_Deopt is a new mapping from all opcodes to their un-quickened forms. * _PyOpcode_InlineCacheEntries is renamed to _PyOpcode_Caches * _Py_IncrementCountAndMaybeQuicken is renamed to _PyCode_Warmup * _Py_Quicken is renamed to _PyCode_Quicken * _co_quickened is renamed to _co_code_adaptive (and is now a read-only memoryview). * Do not emit unused nonzero opargs anymore in the compiler.
* bpo-46850: Remove _PyEval_CallTracing() function (GH-32019)Victor Stinner2022-03-212-2/+3
| | | | Remove the private undocumented function _PyEval_CallTracing() from the C API. Call the public sys.call_tracing() function instead.
* bpo-46850: Remove _PyEval_GetCoroutineOriginTrackingDepth() (GH-32018)Victor Stinner2022-03-212-9/+10
| | | | | | | | | | | | | | | Remove the private undocumented function _PyEval_GetCoroutineOriginTrackingDepth() from the C API. Call the public sys.get_coroutine_origin_tracking_depth() function instead. Change the internal function _PyEval_SetCoroutineOriginTrackingDepth(): * Remove the 'tstate' parameter; * Add return value and raises an exception if depth is negative; * No longer export the function: call the public sys.set_coroutine_origin_tracking_depth() function instead. Uniformize also function declarations in pycore_ceval.h.
* bpo-46850: Remove _PyEval_SetAsyncGenFinalizer() (GH-32017)Victor Stinner2022-03-212-4/+8
| | | | | | | | | | | Remove the following private undocumented functions from the C API: * _PyEval_GetAsyncGenFirstiter() * _PyEval_GetAsyncGenFinalizer() * _PyEval_SetAsyncGenFirstiter() * _PyEval_SetAsyncGenFinalizer() Call the public sys.get_asyncgen_hooks() and sys.set_asyncgen_hooks() functions instead.
* bpo-45786: Remove _PyFrame_Fini() and _PyFrame_DebugMallocStats() (GH-31874)Victor Stinner2022-03-182-6/+0
| | | | Remove private empty _PyFrame_Fini() and _PyFrame_DebugMallocStats() functions.
* bpo-45923: Decouple suspension of tracing from tracing flag. (GH-31908)Mark Shannon2022-03-151-6/+1
|
* bpo-46987: Remove _PySys_GetObjectId / _PySys_GetObjectId (GH-31835)Dong-hee Na2022-03-141-2/+0
|
* bpo-46841: Add a _Py_SET_OPCODE macro (GH-31780)Brandt Bucher2022-03-121-0/+3
|
* bpo-46906: Add PyFloat_Pack8() to the C API (GH-31657)Victor Stinner2022-03-112-48/+9
| | | | | | | | | | | | | | | | | | | | | | Add new functions to pack and unpack C double (serialize and deserialize): * PyFloat_Pack2(), PyFloat_Pack4(), PyFloat_Pack8() * PyFloat_Unpack2(), PyFloat_Unpack4(), PyFloat_Unpack8() Document these functions and add unit tests. Rename private functions and move them from the internal C API to the public C API: * _PyFloat_Pack2() => PyFloat_Pack2() * _PyFloat_Pack4() => PyFloat_Pack4() * _PyFloat_Pack8() => PyFloat_Pack8() * _PyFloat_Unpack2() => PyFloat_Unpack2() * _PyFloat_Unpack4() => PyFloat_Unpack4() * _PyFloat_Unpack8() => PyFloat_Unpack8() Replace the "unsigned char*" type with "char*" which is more common and easy to use.
* bpo-44796: Unify TypeVar and ParamSpec substitution (GH-31143)Serhiy Storchaka2022-03-112-0/+2
| | | | | | Add methods __typing_subst__() in TypeVar and ParamSpec. Simplify code by using more object-oriented approach, especially the C code for types.GenericAlias and the Python code for collections.abc.Callable.
* bpo-46881: Statically allocate and initialize the latin1 characters. (GH-31616)Kumar Aditya2022-03-093-16/+289
|
* bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)Brandt Bucher2022-03-082-0/+7
|
* bpo-46841: Use inline caching for calls (GH-31709)Brandt Bucher2022-03-076-186/+105
|
* Post 3.11.0a6Pablo Galindo2022-03-071-1/+1
|
* Python 3.11.0a6v3.11.0a6Pablo Galindo2022-03-071-2/+2
|
* bpo-46864: Deprecate PyBytesObject.ob_shash. (GH-31598)Inada Naoki2022-03-061-1/+1
|
* bpo-46841: Fix error message hacks in `GET_AWAITABLE` (GH-31664)Brandt Bucher2022-03-041-8/+8
|
* bpo-46903: Handle str-subclasses in virtual instance dictionaries. (GH-31658)Mark Shannon2022-03-041-0/+1
|
* bpo-46841: Use inline caching for attribute accesses (GH-31640)Brandt Bucher2022-03-032-26/+115
|
* bpo-45459: Use type names in the internal C API (GH-31669)Victor Stinner2022-03-035-14/+11
| | | Replace "struct xxx" with "xxx" types in the internal C API.
* bpo-45459: Fix PyModuleDef_Slot type in the limited C API (GH-31668)Victor Stinner2022-03-032-4/+3
| | | Move the type definition to pytypedefs.h.
* bpo-46848: Move _PyBytes_Find() to internal C API (GH-31642)Victor Stinner2022-03-022-19/+19
| | | | | | Move _PyBytes_Find() and _PyBytes_ReverseFind() functions to the internal C API. bytesobject.c now includes pycore_bytesobject.h.
* bpo-46848: Use stringlib/fastsearch in mmap (GH-31625)Dennis Sweeney2022-03-021-0/+19
| | | Speed up mmap.find(). Add _PyBytes_Find() and _PyBytes_ReverseFind().
* bpo-46845: Reduce dict size when all keys are Unicode (GH-31564)Inada Naoki2022-03-011-2/+15
|