| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(#115945)
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
| |
* Target _FOR_ITER_TIER_TWO at POP_TOP following the matching END_FOR
* Modify _GUARD_NOT_EXHAUSTED_RANGE, _GUARD_NOT_EXHAUSTED_LIST and _GUARD_NOT_EXHAUSTED_TUPLE so that they also target the POP_TOP following the matching END_FOR
|
|
|
|
|
| |
It used to crash when passing NULL or non-dict as globals.
Now it sets a SystemError.
|
| |
|
|
|
|
| |
(GH-118482)
|
|
|
|
|
| |
(gh-118205)
This change will make some later changes simpler.
|
|
|
|
| |
handled. (GH-118484)
|
|
|
|
| |
invalid objects during GC (#118478)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "Raw" variant of PyTime functions:
* PyTime_MonotonicRaw()
* PyTime_PerfCounterRaw()
* PyTime_TimeRaw()
Changes:
* Add documentation and tests. Tests release the GIL while calling
raw clock functions.
* py_get_system_clock() and py_get_monotonic_clock() now check that
the GIL is hold by the caller if raise_exc is non-zero.
* Reimplement "Unchecked" functions with raw clock functions.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Account for `add_stopiteration_handler` pushing a block for `async with`.
To allow generator functions that previously almost hit the `CO_MAXBLOCKS`
limit by nesting non-async blocks, the limit is increased by 1.
This increase allows one more block in non-generator functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code for Tier 2 is now only compiled when configured
with `--enable-experimental-jit[=yes|interpreter]`.
We drop support for `PYTHON_UOPS` and -`Xuops`,
but you can disable the interpreter or JIT
at runtime by setting `PYTHON_JIT=0`.
You can also build it without enabling it by default
using `--enable-experimental-jit=yes-off`;
enable with `PYTHON_JIT=1`.
On Windows, the `build.bat` script supports
`--experimental-jit`, `--experimental-jit-off`,
`--experimental-interpreter`.
In the C code, `_Py_JIT` is defined as before
when the JIT is enabled; the new variable
`_Py_TIER2` is defined when the JIT *or* the
interpreter is enabled. It is actually a bitmask:
1: JIT; 2: default-off; 4: interpreter.
|
|
|
|
| |
(GH-118349)
|
|
|
|
|
| |
Don't test the undefined behavior of fileno()
on a closed file, but use fstat() as a reliable
test if the file was closed or not.
|
|
|
|
|
|
| |
Avoid detaching thread state when stopping the world. When re-attaching
the thread state, the thread would attempt to resume the top-most
critical section, which might now be held by a thread paused for our
stop-the-world request.
|
|
|
| |
Small TSAN fixups for instrumentation
|
|
|
| |
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
| |
|
|
|
|
| |
Android app (#118063)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
(gh-118204)
This change will make some later changes simpler. It also brings more consistent behavior and lower maintenance costs.
|
|
|
|
|
|
|
|
|
| |
Deferred reference counting is not fully implemented yet. As a temporary
measure, we immortalize objects that would use deferred reference
counting to avoid multi-threaded scaling bottlenecks.
This is only performed in the free-threaded build once the first
non-main thread is started. Additionally, some tests, including refleak
tests, suppress this behavior.
|
|
|
|
|
|
|
| |
Basically, I've turned most of _PyImport_LoadDynamicModuleWithSpec() into two new functions (_PyImport_GetModInitFunc() and _PyImport_RunModInitFunc()) and moved the rest of it out into _imp_create_dynamic_impl(). There shouldn't be any changes in behavior.
This change makes some future changes simpler. This is particularly relevant to potentially calling each module init function in the main interpreter first. Thus the critical part of the PR is the addition of _PyImport_RunModInitFunc(), which is strictly focused on running the init func and validating the result. A later PR will take it a step farther by capturing error information rather than raising exceptions.
FWIW, this change also helps readers by clarifying a bit more about what happens when an extension/builtin module is imported.
|
| |
|
| |
|
|
|
|
|
| |
inlining (#118160)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
|
|
|
| |
Switch GIL to disabled by default in free-threaded build so that the
free-threaded CIs catch thread-safety issues.
|
|
|
|
| |
(GH-118279)
|
| |
|
| |
|
|
|
| |
This does some cleanup in preparation for later changes.
|
| |
|
| |
|
|
|
|
|
| |
A couple of refleaks slipped through in gh-118194. This takes care of them.
(AKA _Py_ext_module_loader_info_init() does not steal references.)
|
|
|
| |
This helps with a later change that splits up _PyImport_LoadDynamicModuleWithSpec().
|
|
|
|
|
| |
Singlephase or Not (gh-118193)
This change makes other upcoming changes simpler.
|
|
|
| |
See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
|
|
|
| |
These are cleanups I've pulled out of gh-118116. Mostly, this change moves code around to align with some future changes and to improve clarity a little. There is one very small change in behavior: we now add the module to the per-interpreter caches after updating the global state, rather than before.
|
| |
|
|
|
| |
Covert DEOPT_IFs on likely side exits to EXIT_IFs
|
|
|
|
| |
sequences for introspection (#118007)
|
|
|
|
|
| |
Better version of gh-118117.
Just check for immortality instead of an address range check.
|
|
|
|
|
| |
`tstate->state` (#118165)
Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state`
|