summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and ↵Irit Katriel2023-11-034-7/+15
| | | | frame state (#111648)
* gh-108082: Remove _PyErr_WriteUnraisableMsg() (GH-111643)Serhiy Storchaka2023-11-031-11/+0
| | | | Replace the remaining calls with PyErr_FormatUnraisable().
* gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF (#111655)AN Long2023-11-033-6/+3
|
* gh-76785: Minor Fixes in crossinterp.c (gh-111671)Eric Snow2023-11-031-126/+267
| | | There were a few corner cases I didn't handle properly in gh-111530, which I've noticed while working on a follow-up PR. This fixes those cases.
* gh-111663: Restore the Tier 2 uop count pystats (#111664)Michael Droettboom2023-11-021-0/+2
|
* gh-110892: Return NULL for `PyTrace_RETURN` events caused by an exception ↵Tian Gao2023-11-021-11/+31
| | | | (GH-110909)
* gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 ↵Irit Katriel2023-11-026-15/+23
| | | | (#111459)
* gh-108082: Use PyErr_FormatUnraisable() (GH-111580)Serhiy Storchaka2023-11-026-39/+35
| | | | | | Replace most of calls of _PyErr_WriteUnraisableMsg() and some calls of PyErr_WriteUnraisable(NULL) with PyErr_FormatUnraisable(). Co-authored-by: Victor Stinner <vstinner@python.org>
* Remove unnecessary includes (GH-111633)Serhiy Storchaka2023-11-022-2/+0
|
* GH-111435: Add Support for Sharing True and False Between Interpreters ↵Anthony Shaw2023-11-021-0/+25
| | | | | (gh-111436) This only affects users of the APIs in pycore_crossinterp.h (AKA _xxsubinterpretersmodule.c and _xxinterpchannels.c).
* gh-76785: Crossinterp utils additions (gh-111530)Eric Snow2023-11-014-76/+1117
| | | | | | | | | | | | This moves several general internal APIs out of _xxsubinterpretersmodule.c and into the new Python/crossinterp.c (and the corresponding internal headers). Specifically: * _Py_excinfo, etc.: the initial implementation for non-object exception snapshots (in pycore_pyerrors.h and Python/errors.c) * _PyXI_exception_info, etc.: helpers for passing an exception beween interpreters (wraps _Py_excinfo) * _PyXI_namespace, etc.: helpers for copying a dict of attrs between interpreters * _PyXI_Enter(), _PyXI_Exit(): functions that abstract out the transitions between one interpreter and a second that will do some work temporarily Again, these were all abstracted out of _xxsubinterpretersmodule.c as generalizations. I plan on proposing these as public API at some point.
* gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)Victor Stinner2023-11-011-6/+2
| | | | Replace PyUnicode_AsUTF8AndSize() with PyUnicode_AsUTF8() to remove the explicit check for embedded null characters.
* High level docs for the VM state (#111621)Guido van Rossum2023-11-011-0/+90
|
* GH-111485: Silence warnings in Python/executor_cases.c.h (#111619)Guido van Rossum2023-11-013-0/+6
|
* gh-111374: Add a new PYTHON_FROZEN_MODULES env var, equivalent of `-X ↵Yilei Yang2023-11-011-1/+17
| | | | | | | frozen_modules`. (#111411) Adds a new PYTHON_FROZEN_MODULES env var to correspond with -X frozen_modules. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-111520: Integrate the Tier 2 interpreter in the Tier 1 interpreter (#111428)Guido van Rossum2023-11-018-465/+462
| | | | | | | | | | | - There is no longer a separate Python/executor.c file. - Conventions in Python/bytecodes.c are slightly different -- don't use `goto error`, you must use `GOTO_ERROR(error)` (same for others like `unused_local_error`). - The `TIER_ONE` and `TIER_TWO` symbols are only valid in the generated (.c.h) files. - In Lib/test/support/__init__.py, `Py_C_RECURSION_LIMIT` is imported from `_testcapi`. - On Windows, in debug mode, stack allocation grows from 8MiB to 12MiB. - **Beware!** This changes the env vars to enable uops and their debugging to `PYTHON_UOPS` and `PYTHON_LLTRACE`.
* gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)Victor Stinner2023-11-013-21/+6
| | | | | | | Replace PyUnicode_AsUTF8AndSize() with PyUnicode_AsUTF8() to remove the explicit check for embedded null characters. The change avoids to have to include explicitly <string.h> to get the strlen() function when using a recent version of the limited C API.
* GH-111537: Avoid using `this_instr` in asserts. (GH-111600)Mark Shannon2023-11-012-36/+24
|
* GH-111485: Use micro-ops to split specialization code from base action ↵Mark Shannon2023-11-014-486/+587
| | | | (GH-111561)
* gh-108082: Add PyErr_FormatUnraisable() function (GH-111086)Serhiy Storchaka2023-10-311-8/+40
|
* gh-109181: Speed up Traceback object creation by lazily compute the line ↵Pablo Galindo Salgado2023-10-311-6/+29
| | | | | number (#111548) Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* GH-111438: Add Support for Sharing Floats Between Interpreters (gh-111439)Anthony Shaw2023-10-311-0/+28
| | | This only affects users of the APIs in pycore_crossinterp.h (AKA _xxsubinterpretersmodule.c and _xxinterpchannels.c).
* GH-111485: Remove some special cases from the code generator and bytecodes.c ↵Mark Shannon2023-10-314-10/+89
| | | | (GH-111540)
* GH-111485: Increment `next_instr` consistently at the start of the ↵Mark Shannon2023-10-315-493/+969
| | | | instruction. (GH-111486)
* gh-109329: Count tier2 opcode misses (#110561)Michael Droettboom2023-10-312-1/+5
| | | This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
* gh-76785: Move the Cross-Interpreter Code to Its Own File (gh-111502)Eric Snow2023-10-302-591/+631
| | | This is partly to clear this stuff out of pystate.c, but also in preparation for moving some code out of _xxsubinterpretersmodule.c. This change also moves this stuff to the internal API (new: Include/internal/pycore_crossinterp.h). @vstinner did this previously and I undid it. Now I'm re-doing it. :/
* gh-110481: Implement biased reference counting (gh-110764)Sam Gross2023-10-303-12/+5
|
* GH-111339: Fix initialization and finalization of static optimizer types ↵Savannah Ostrowski2023-10-291-14/+10
| | | | (GH-111430)
* gh-111386: Fix `uint32_t` cast in `generated_cases.c.h` (#111387)Nikita Sobolev2023-10-272-2/+2
|
* gh-109587: Allow "precompiled" perf-trampolines to largely mitigate the cost ↵gsallam2023-10-272-7/+84
| | | | of enabling perf-trampolines (#109666)
* gh-111354: define names for RESUME oparg values (#111365)Irit Katriel2023-10-265-7/+8
|
* gh-109094: replace frame->prev_instr by frame->instr_ptr (#109095)Irit Katriel2023-10-2611-120/+184
|
* GH-111213: Fix a few broken stats (GH-111216)Mark Shannon2023-10-261-1/+1
|
* GH-111339: Change `valid` property of executors to `is_valid()` method ↵Mark Shannon2023-10-261-13/+13
| | | | (GH-111350)
* gh-67224: Show source lines in tracebacks when using the -c option when ↵Pablo Galindo Salgado2023-10-261-19/+61
| | | | running Python (#111200)
* gh-106320: Re-add some PyLong/PyDict C-API functions (GH-#111162)scoder2023-10-251-1/+0
| | | | | | | | * gh-106320: Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray() and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement. See https://github.com/python/cpython/issues/111140 See https://github.com/python/cpython/issues/111139 * gh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.
* GH-109214: _SET_IP before _PUSH_FRAME (but not _POP_FRAME) (GH-111001)Brandt Bucher2023-10-243-42/+25
|
* GH-109369: Add machinery for deoptimizing tier2 executors, both individually ↵Mark Shannon2023-10-233-2/+237
| | | | and globally. (GH-110384)
* gh-67565: Remove redundant C-contiguity checks (GH-105521)Furkan Onder2023-10-233-21/+8
| | | | Co-authored-by: Stefan Krah <skrah@bytereef.org>
* gh-111123: symtable should visit exception handlers before the else block ↵Irit Katriel2023-10-211-2/+2
| | | | (#111142)
* gh-111133: Remove unnecessary PyFrozenSet_Check() calls in const folding ↵Kirill Podoprigora2023-10-201-14/+3
| | | | | (GH-111137) frozenset does not support multiplication.
* gh-111132: Fix crash on interactive_filename in `run_mod` (#111136)Nikita Sobolev2023-10-201-1/+3
|
* gh-76785: Clean Up the Channels Module (gh-110568)Eric Snow2023-10-171-7/+7
|
* gh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567)Eric Snow2023-10-171-0/+34
|
* gh-84570: Send-Wait Fixes for _xxinterpchannels (gh-111006)Eric Snow2023-10-171-0/+50
| | | | | There were a few things I did in gh-110565 that need to be fixed. I also forgot to add tests in that PR. (Note that this PR exposes a refleak introduced by gh-110246. I'll take care of that separately.)
* gh-109693: Remove pycore_atomic.h (gh-110992)Donghee Na2023-10-172-2/+0
|
* gh-110964: Remove private _PyArg functions (#110966)Victor Stinner2023-10-1710-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the following private functions and structures to pycore_modsupport.h internal C API: * _PyArg_BadArgument() * _PyArg_CheckPositional() * _PyArg_NoKeywords() * _PyArg_NoPositional() * _PyArg_ParseStack() * _PyArg_ParseStackAndKeywords() * _PyArg_Parser structure * _PyArg_UnpackKeywords() * _PyArg_UnpackKeywordsWithVararg() * _PyArg_UnpackStack() * _Py_ANY_VARARGS() Changes: * Python/getargs.h now includes pycore_modsupport.h to export functions. * clinic.py now adds pycore_modsupport.h when one of these functions is used. * Add pycore_modsupport.h includes when a C extension uses one of these functions. * Define Py_BUILD_CORE_MODULE in C extensions which now include directly or indirectly (via code generated by Argument Clinic) pycore_modsupport.h: * _csv * _curses_panel * _dbm * _gdbm * _multiprocessing.posixshmem * _sqlite.row * _statistics * grp * resource * syslog * _testcapi: bad_get() no longer uses METH_FASTCALL calling convention but METH_VARARGS. Replace _PyArg_UnpackStack() with PyArg_ParseTuple(). * _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined by _testcapi sub-modules which need the internal C API (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c, watchers.c. * Remove Include/cpython/modsupport.h header file. Include/modsupport.h no longer includes the removed header file. * Fix mypy clinic.py
* gh-109693: Update _gil_runtime_state.locked to use pyatomic.h (gh-110836)Donghee Na2023-10-162-16/+12
|
* gh-110912: Correctly display tracebacks for MemoryError exceptions using the ↵Pablo Galindo Salgado2023-10-161-4/+1
| | | | traceback module (#110921)
* gh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg with NULL ↵Nikita Sobolev2023-10-161-1/+1
| | | | (#110868)