| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Remove _PyOS_ReadlineTState variable from the public C API.
The symbol is still exported for the readline shared extension.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move private _PyGen API to internal C API:
* _PyAsyncGenAThrow_Type
* _PyAsyncGenWrappedValue_Type
* _PyCoroWrapper_Type
* _PyGen_FetchStopIterationValue()
* _PyGen_Finalize()
* _PyGen_SetStopIterationValue()
No longer these symbols, except of the ones by the _asyncio shared
extensions.
|
|
|
|
| |
Move private types _PyNone_Type and _PyNotImplemented_Type to
internal C API.
|
|
|
|
|
| |
* No longer export most private _PyHash symbols, only export the ones
which are needed by shared extensions.
* Modules/_xxtestfuzz/fuzzer.c now uses the internal C API.
|
|
|
|
|
|
|
|
| |
Remove private _PyUnicode_AsString() alias to PyUnicode_AsUTF8(). It
was kept for backward compatibility with Python 3.0 - 3.2.
The PyUnicode_AsUTF8() is available since Python
3.3. The PyUnicode_AsUTF8String() function can be used to keep
compatibility with Python 3.2 and older.
|
|
|
|
|
| |
* Add PyDict_GetItemRef() and PyDict_GetItemStringRef() functions.
Add these functions to the stable ABI version 3.13.
* Add unit tests on the PyDict C API in test_capi.
|
| |
|
| |
|
| |
|
|
|
|
| |
bytecodes.c (#106758)
|
|
|
|
|
| |
It is a fixed implementation of PyModule_AddObject() which consistently
steals reference both on success and on failure.
|
|
|
|
| |
These repair nits I found in PR gh-106798 (issue gh-106797) and in PR gh-106716 (issue gh-106706).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By turning `assert(kwnames == NULL)` into a macro that is not in the "forbidden" list, many instructions that formerly were skipped because they contained such an assert (but no other mention of `kwnames`) are now supported in Tier 2. This covers 10 instructions in total (all specializations of `CALL` that invoke some C code):
- `CALL_NO_KW_TYPE_1`
- `CALL_NO_KW_STR_1`
- `CALL_NO_KW_TUPLE_1`
- `CALL_NO_KW_BUILTIN_O`
- `CALL_NO_KW_BUILTIN_FAST`
- `CALL_NO_KW_LEN`
- `CALL_NO_KW_ISINSTANCE`
- `CALL_NO_KW_METHOD_DESCRIPTOR_O`
- `CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS`
- `CALL_NO_KW_METHOD_DESCRIPTOR_FAST`
|
| |
|
|
|
| |
Co-authored-by: Éric <merwok@netwok.org>
|
| |
|
|
|
|
| |
Also rename `_ITER_EXHAUSTED_XXX` to `_IS_ITER_EXHAUSTED_XXX` to make it clear this is a test.
|
|
|
|
|
|
|
| |
This moves EXIT_TRACE, SAVE_IP, JUMP_TO_TOP, and
_POP_JUMP_IF_{FALSE,TRUE} from ceval.c to bytecodes.c.
They are no less special than before, but this way
they are discoverable o the copy-and-patch tooling.
|
| |
|
|
|
|
| |
For an example of what this does for Tier 1 and Tier 2, see
https://github.com/python/cpython/issues/106529#issuecomment-1631649920
|
| |
|
|
|
|
| |
Include/internal/pycore_opcode_metadata.h (#106673)
|
| |
|
|
|
|
| |
Also add PyMapping_GetOptionalItemString() function.
|
| |
|
|
|
|
|
|
| |
It is a new name of former _PyObject_LookupAttr().
Add also PyObject_GetOptionalAttrString().
|
|
|
|
|
|
|
|
| |
* Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to
functions.
* Add PyObject_DelAttr() and PyObject_DelAttrString() functions to
the stable ABI.
* Replace PyObject_SetAttr(obj, name, NULL) with
PyObject_DelAttr(obj, name).
|
|
|
|
|
| |
This compensates for static builtin types having `tp_dict` set to `NULL`.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
| |
* Add two more specializations of LOAD_ATTR.
|
|
|
|
| |
It simplifies and speed up the code.
|
|
|
| |
* gh-105340: include hidden fast-locals in locals()
|
|
|
|
|
| |
Remove the _PyInterpreterState_HasFeature() function from the C API:
move it to the internal C API (pycore_interp.h). No longer export
the function.
|
|
|
| |
* Add len() and indexing support to uop superblocks.
|
|
|
|
|
|
|
| |
Remove private pylifecycle.h functions: move them to the internal C
API ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). No
longer export most of these functions.
Move _testcapi.test_atexit() to _testinternalcapi.
|
|
|
|
|
|
|
|
| |
Remove private _PyUnicode_TransformDecimalAndSpaceToASCII() and other
private _PyUnicode C API functions: move them to the internal C API
(pycore_unicodeobject.h). No longer most of these functions.
Replace _testcapi.unicode_transformdecimalandspacetoascii() with
_testinternal._PyUnicode_TransformDecimalAndSpaceToASCII().
|
|
|
|
| |
Remove the _PyBytesWriter C API: move it to the internal C API
(pycore_bytesobject.h).
|
|
|
|
|
| |
Remove private _PyUnicode codecs C API functions: move them to the
internal C API (pycore_unicodeobject.h). No longer export most of
these functions.
|
|
|
| |
Replace PyAPI_DATA() with PyAPI_FUNC().
|
|
|
|
|
|
| |
* Remove private _PyImport C API functions: move them to the internal
C API (pycore_import.h).
* No longer export most of these private functions.
* _testcapi avoids private _PyImport_GetModuleAttrString().
|
|
|
|
| |
The code was already removed by:
commit c9f696cb96d1c362d5cad871f61da520572d9b08.
|
|
|
|
|
|
| |
Remove more private _PyUnicode C API functions:
move them to the internal C API (pycore_unicodeobject.h).
No longer export most pycore_unicodeobject.h functions.
|
|
|
|
|
|
| |
* Check eval-breaker in ENTER_EXECUTOR.
* Make sure that frame->prev_instr is set before entering executor.
|
|
|
|
|
|
|
|
|
|
| |
- Tweak uops debugging output
- Fix the bug from gh-106290
- Rename `SET_IP` to `SAVE_IP` (per https://github.com/faster-cpython/ideas/issues/558)
- Add a `SAVE_IP` uop at the start of the trace (ditto)
- Allow `unbound_local_error`; this gives us uops for `LOAD_FAST_CHECK`, `LOAD_CLOSURE`, and `DELETE_FAST`
- Longer traces
- Support `STORE_FAST_LOAD_FAST`, `STORE_FAST_STORE_FAST`
- Add deps on pycore_uops.h to Makefile(.pre.in)
|
|
|
|
| |
Remove private _PyErr C API functions: move them to the internal
C API (pycore_pyerrors.h).
|
|
|
|
|
|
|
|
|
|
| |
Remove the following functions from the C API, move them to the internal C
API: add a new pycore_modsupport.h internal header file:
* PyModule_CreateInitialized()
* _PyArg_NoKwnames()
* _Py_VaBuildStack()
No longer export these functions.
|
|
|
|
|
|
| |
Move also _PyUnicode_FormatAdvancedWriter().
CJK codecs and multibytecodec.c now define the Py_BUILD_CORE_MODULE
macro.
|
|
|
|
|
|
| |
Add internal pycore_complexobject.h header file.
Move _Py_c_xxx() functions and _PyComplex_FormatAdvancedWriter()
function to this new header file.
|
|
|
|
|
|
|
|
|
| |
Remove private _PyThreadState and _PyInterpreterState C API
functions: move them to the internal C API (pycore_pystate.h and
pycore_interp.h). Don't export most of these functions anymore, but
still export functions used by tests.
Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C
API, but keep it in the stable API.
|
|
|
|
|
|
|
| |
* Remove private _PyTraceMalloc C API functions: move them to the
internal C API.
* Don't export most of these functions anymore, but still export
_PyTraceMalloc_GetTraceback() used by tests.
* Rename Include/tracemalloc.h to Include/cpython/tracemalloc.h
|