summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD ↵Irit Katriel2022-03-314-85/+104
| | | | (GH-32115)
* bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)Victor Stinner2022-03-316-36/+36
| | | Use the macro in C files of the Python/ directory.
* bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191)Victor Stinner2022-03-311-6/+6
| | | | | | | | | | | | 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-303-6/+20
|
* Merge deoptimization blocks in interpreter (GH-32155)Mark Shannon2022-03-302-36/+26
|
* bpo-46864: Suppress even more ob_shash deprecation warnings (GH-32176)Christian Heimes2022-03-301-0/+5
|
* bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122)Dennis Sweeney2022-03-291-14/+18
|
* bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)Kumar Aditya2022-03-273-11/+47
| | | | * add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
* bpo-43224: Implement PEP 646 grammar changes (GH-31018)Matthew Rahtz2022-03-262-14/+13
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)Dennis Sweeney2022-03-252-6/+9
| | | | | * 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-251-3/+7
| | | | | | | | | | | (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-46841: remove no-longer-used macro UPDATE_PREV_INSTR_OPARG (GH-32100)Irit Katriel2022-03-241-2/+0
|
* bpo-46864: Suppress deprecation warnings for ob_shash. (GH-32042)Inada Naoki2022-03-231-1/+4
|
* bpo-43166: Disable ceval.c optimizations for Windows debug builds (GH-32023)neonene2022-03-231-4/+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-222-96/+104
| | | | | * Remove the f_state field from _PyInterpreterFrame * Make ownership of the frame explicit, replacing the is_generator field with an owner field.
* bpo-46841: Quicken code in-place (GH-31888)Brandt Bucher2022-03-215-150/+75
| | | | | | | | | | | | | | | | | | | * 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-211-4/+7
| | | | 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-8/+11
| | | | | | | | | | | | | | | 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-211-1/+1
| | | | | | | | | | | 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-181-2/+0
| | | | Remove private empty _PyFrame_Fini() and _PyFrame_DebugMallocStats() functions.
* Use low bit of LOAD_GLOBAL's oparg to indicate whether it should push an ↵Mark Shannon2022-03-172-7/+26
| | | | additional NULL. (GH-31933)
* bpo-46841: Don't scan backwards in bytecode (GH-31901)Mark Shannon2022-03-161-13/+7
|
* bpo-45923: Decouple suspension of tracing from tracing flag. (GH-31908)Mark Shannon2022-03-152-33/+28
|
* bpo-46920: Remove code that has explainers why it was disabled (GH-31813)Oleg Iarygin2022-03-141-6/+0
|
* bpo-46920: Remove disabled debug code added decades ago and likely ↵Oleg Iarygin2022-03-141-18/+0
| | | | unnecessary (GH-31812)
* bpo-46987: Remove _PySys_GetObjectId / _PySys_GetObjectId (GH-31835)Dong-hee Na2022-03-141-36/+0
|
* bpo-46841: Add a _Py_SET_OPCODE macro (GH-31780)Brandt Bucher2022-03-122-81/+66
|
* bpo-46906: Add PyFloat_Pack8() to the C API (GH-31657)Victor Stinner2022-03-111-5/+4
| | | | | | | | | | | | | | | | | | | | | | 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.
* Use FASTCALL for __import__ (GH-31752)Kumar Aditya2022-03-112-28/+110
|
* Update adaptive.md for inline caching (GH-31817)Mark Shannon2022-03-111-9/+20
|
* bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)Brandt Bucher2022-03-082-27/+16
|
* bpo-40059: Add tomllib (PEP-680) (GH-31498)Taneli Hukkinen2022-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new standard library module, `tomllib`, for parsing TOML. The implementation is based on Tomli (https://github.com/hukkin/tomli). ## Steps taken (converting `tomli` to `tomllib`) - Move everything in `tomli:src/tomli` to `Lib/tomllib`. Exclude `py.typed`. - Remove `__version__ = ...` line from `Lib/tomllib/__init__.py` - Move everything in `tomli:tests` to `Lib/test/test_tomllib`. Exclude the following test data dirs recursively: - `tomli:tests/data/invalid/_external/` - `tomli:tests/data/valid/_external/` - Create `Lib/test/test_tomllib/__main__.py`: ```python import unittest from . import load_tests unittest.main() ``` - Add the following to `Lib/test/test_tomllib/__init__.py`: ```python import os from test.support import load_package_tests def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args) ``` Also change `import tomli as tomllib` to `import tomllib`. - In `cpython/Lib/tomllib/_parser.py` replace `__fp` with `fp` and `__s` with `s`. Add the `/` to `load` and `loads` function signatures. - Run `make regen-stdlib-module-names` - Create `Doc/library/tomllib.rst` and reference it in `Doc/library/fileformats.rst`
* bpo-46841: Use inline caching for calls (GH-31709)Brandt Bucher2022-03-074-355/+191
|
* bpo-46940: Don't override existing AttributeError suggestion information ↵Pablo Galindo Salgado2022-03-071-3/+6
| | | | | | | | | | | | (GH-31710) When an exception is created in a nested call to PyObject_GetAttr, any external calls will override the context information of the AttributeError that we have already placed in the most internal call. This will cause the suggestions we create to nor work properly as the attribute name and object that we will be using are the incorrect ones. To avoid this, we need to check first if these attributes are already set and bail out if that's the case.
* Remove trailing spaces (GH-31695)Serhiy Storchaka2022-03-052-2/+2
|
* bpo-46841: Fix BINARY_OP's handling of inline caches (GH-31671)Brandt Bucher2022-03-042-3/+5
|
* bpo-46841: Fix error message hacks in `GET_AWAITABLE` (GH-31664)Brandt Bucher2022-03-043-20/+14
|
* 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-033-231/+159
|
* bpo-46841: Improve the failure stats for COMPARE_OP (GH-31663)Brandt Bucher2022-03-031-0/+5
|
* Move check for str-only keys in LOAD_GLOBAL specializations to ↵Mark Shannon2022-03-032-15/+14
| | | | specialization time. (GH-31659)
* 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
|