summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* GH-111843: Tier 2 exponential backoff (GH-111850)Mark Shannon2023-11-093-14/+41
|
* GH-109369: Exit tier 2 if executor is invalid (GH-111657)Mark Shannon2023-11-096-5/+34
|
* gh-111569: Implement Python critical section API (gh-111571)Sam Gross2023-11-082-0/+110
| | | | | | | | Critical sections are helpers to replace the global interpreter lock with finer grained locking. They provide similar guarantees to the GIL and avoid the deadlock risk that plain locking involves. Critical sections are implicitly ended whenever the GIL would be released. They are resumed when the GIL would be acquired. Nested critical sections behave as if the sections were interleaved.
* GH-111848: Tidy up tier 2 handling of FOR_ITER specialization by using ↵Mark Shannon2023-11-084-113/+33
| | | | DEOPT_IF instead of jumps. (GH-111849)
* gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)Victor Stinner2023-11-074-8/+27
| | | | | | | | | | | | | | | | | | | | | * Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)" This reverts commit d9b606b3d04fc56fb0bcc479d7d6c14562edb5e2. * Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)" This reverts commit cde1071b2a72e8261ca66053ef61431b7f3a81fd. * Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)" This reverts commit d731579bfb9a497cfb0076cb6b221058a20088fe. * Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)" This reverts commit d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44. * Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)" This reverts commit 37e4e20eaa8f27ada926d49e5971fecf0477ad26.
* gh-111623: Add Support for Cross-interpreter tuples (gh-111628)Anthony Shaw2023-11-071-0/+98
|
* gh-106672: C API: Report indiscriminately ignored errors (GH-106674)Serhiy Storchaka2023-11-071-0/+3
| | | | | Functions which indiscriminately ignore all errors now report them as unraisable errors.
* GH-111485: Allow arbitrary annotations on instructions and micro-ops. ↵Mark Shannon2023-11-073-35/+18
| | | | (GH-111697)
* GH-111485: Make BEFORE_WITH a uop (GH-111812)Brandt Bucher2023-11-074-7/+55
|
* gh-76785: Move _Py_excinfo Functions Out of the Internal C-API (gh-111715)Eric Snow2023-11-062-175/+123
| | | | | I added _Py_excinfo to the internal API (and added its functions in Python/errors.c) in gh-111530 (9322ce9). Since then I've had a nagging sense that I should have added the type and functions in its own PR. While I do plan on using _Py_excinfo outside crossinterp.c very soon (see gh-111572/gh-111573), I'd still feel more comfortable if the _Py_excinfo stuff went in as its own PR. Hence, here we are. (FWIW, I may combine that with gh-111572, which I may, in turn, combine with gh-111573. We'll see.)
* GH-111772: Specialize slot loads and stores for `_Py_T_OBJECT` (GH-111773)Mark Shannon2023-11-061-3/+3
|
* GH-111646: Simplify optimizer, by compacting uops when making executor. ↵Mark Shannon2023-11-062-117/+119
| | | | (GH-111647)
* GH-110829: Ensure Thread.join() joins the OS thread (#110848)Antoine Pitrou2023-11-043-22/+116
| | | | | | | Joining a thread now ensures the underlying OS thread has exited. This is required for safer fork() in multi-threaded processes. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-111684: Avoid a Compiler Warning (gh-111706)Eric Snow2023-11-031-0/+4
|
* gh-103615: Use local events for opcode tracing (GH-109472)Tian Gao2023-11-033-6/+65
| | | | | | | * Use local monitoring for opcode trace * Remove f_opcode_trace_set * Add test for setting f_trace_opcodes after settrace
* 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)