| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
No longer export _PyUnicode_FromId() internal C API function.
Change comment style to "// comment" and add comment explaining why
other functions have to be exported.
Update Tools/build/generate_token.py to update Include/internal/pycore_token.h
comments.
|
|
|
|
|
|
|
|
| |
Remove the internal _PyDict_GetItemStringWithError() function. It can
now be replaced with the new public PyDict_ContainsString() and
PyDict_GetItemStringRef() functions.
getargs.c now now uses a strong reference for current_arg.
find_keyword() returns a strong reference.
|
|
|
|
|
|
|
|
|
|
|
|
| |
No longer export these 5 internal C API functions:
* _PyArena_AddPyObject()
* _PyArena_Free()
* _PyArena_Malloc()
* _PyArena_New()
* _Py_FatalRefcountErrorFunc()
Change comment style to "// comment" and add comment explaining why
other functions have to be exported.
|
|
|
|
|
|
|
|
|
| |
No longer export these 2 internal C API functions:
* _PyTime_AsNanoseconds()
* _PyTime_GetSystemClockWithInfo()
Change comment style to "// comment" and add comment explaining why
other functions have to be exported.
|
| |
|
|
|
|
|
| |
The _socket extension uses _PyCapsule_SetTraverse() to visit and clear
the socket type in the garbage collector. So the _socket.socket type
can be cleared in some corner cases when it wasn't possible before.
|
|
|
|
| |
(#108367)
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove private _PyDict_GetItemStringWithError() function of the
public C API: the new PyDict_GetItemStringRef() can be used instead.
* Move private _PyDict_GetItemStringWithError() to the internal C API.
* _testcapi get_code_extra_index() uses PyDict_GetItemStringRef().
Avoid using private functions in _testcapi which tests the public C
API.
|
|
|
|
| |
C23 standard added nullptr constant:
https://en.wikipedia.org/wiki/C23_(C_standard_revision)
|
|
|
|
|
|
| |
No longer export functions:
* _Py_strhex_bytes()
* _Py_strhex_with_sep()
|
|
|
|
|
|
|
|
|
|
|
| |
* Add missing includes.
* Remove unused includes.
* Update old include/symbol names to newer names.
* Mention at least one included symbol.
* Sort includes.
* Update Tools/cases_generator/generate_cases.py used to generated
pycore_opcode_metadata.h.
* Update Parser/asdl_c.py used to generate pycore_ast.h.
* Cleanup also includes in _testcapimodule.c and _testinternalcapi.c.
|
|
|
|
|
|
|
|
|
| |
* pycore_intrinsics.h does nothing if included twice
(add #ifndef and #define).
* Update Tools/cases_generator/generate_cases.py to generate the
Py_BUILD_CORE test.
* _bz2, _lzma, _opcode and zlib extensions now define the
Py_BUILD_CORE_MODULE macro to use internal headers
(pycore_code.h, pycore_intrinsics.h and pycore_blocks_output_buffer.h).
|
| |
|
|
|
|
| |
[from ...]' markers (GH-108132)
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
arguments (#107969)
|
|
|
|
| |
This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.
|
| |
|
|
|
|
| |
performance. (GH-108036)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Split `CALL_PY_EXACT_ARGS` into uops
This is only the first step for doing `CALL` in Tier 2.
The next step involves tracing into the called code object and back.
After that we'll have to do the remaining `CALL` specialization.
Finally we'll have to deal with `KW_NAMES`.
Note: this moves setting `frame->return_offset` directly in front of
`DISPATCH_INLINED()`, to make it easier to move it into `_PUSH_FRAME`.
|
|
|
|
| |
opcode.py (#107971)
|
|
|
|
| |
Export the internal _Py_open() and _Py_write() functions for Solaris:
the select shared extension uses them.
|
|
|
|
| |
of Py_None (#107993)
|
|
|
|
| |
Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com>
Co-authored-by: Jules <57632293+juliapoo@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
separately (#107866)
|
|
|
|
| |
functions (GH-107794)
|
|
|
|
| |
(GH-107837)
|
|
|
|
| |
opaque types in compile.c (#107639)
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
This finishes fixing the crashes in Py_TRACE_REFS builds. We missed this part in gh-107567.
|
|
|
| |
Executors are now more like tuples.
|
| |
|
|
|
|
|
| |
(#107564)
Introducing a new file, stacking.py, that takes over several responsibilities related to symbolic evaluation of push/pop operations, with more generality.
|
| |
|
|
|
|
|
|
| |
`_PyEval_EvalFrameDefault()` (GH-107535)
* Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2.
|
|
|
| |
The linked list of objects was a global variable, which broke isolation between interpreters, causing crashes. To solve this, we've moved the linked list to each interpreter.
|
| |
|
|
|
|
| |
the build script, or exposed in opcode.py (#107534)
|
|
|
|
|
|
| |
There's no need to use a dummy uop to skip unused cache entries. The macro syntax lets you write `unused/1` instead.
Similarly, move `unused/5` from op `_LOAD_ATTR_INSTANCE_VALUE` to macro `LOAD_ATTR_INSTANCE_VALUE`.
|
|
|
|
|
|
|
| |
This fixes a crasher due to a race condition, triggered infrequently when two isolated (own GIL) subinterpreters simultaneously initialize their sys or builtins modules. The crash happened due the combination of the "detached" thread state we were using and the "last holder" logic we use for the GIL. It turns out it's tricky to use the same thread state for different threads. Who could have guessed?
We solve the problem by eliminating the one object we were still sharing between interpreters. We replace it with a low-level hashtable, using the "raw" allocator to avoid tying it to the main interpreter.
We also remove the accommodations for "detached" thread states, which were a dubious idea to start with.
|
|
|
|
| |
(GH-107383)
|
|
|
| |
The _xxsubinterpreters module should not rely on internal API. Some of the functions it uses were recently moved there however. Here we move them back (and expose them properly).
|
|
|
|
|
| |
We tried this before with a dict and for all interned strings. That ran into problems due to interpreter isolation. However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning. Here we circle back to using a global cache, but only for statically allocated strings. We also use a more-basic _Py_hashtable_t for that global cache instead of a dict.
Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter. Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter.
|