| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
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
|
|
|
|
| |
Replace calls to the (removed) slow _PyInterpreterState_Get() with
fast inlined _PyInterpreterState_GET() function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the "cpython/pytime.h" header file: it only contained private
functions. Move functions to the internal pycore_time.h header file.
Move tests from _testcapi to _testinternalcapi. Rename also test
methods to have the same name than tested C functions.
No longer export these functions:
* _PyTime_Add()
* _PyTime_As100Nanoseconds()
* _PyTime_FromMicrosecondsClamp()
* _PyTime_FromTimespec()
* _PyTime_FromTimeval()
* _PyTime_GetPerfCounterWithInfo()
* _PyTime_MulDiv()
|
| |
|
| |
|
|
|
| |
Deprecate Py_HasFileSystemDefaultEncoding variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the following private functions of the C API:
* _PyCodecInfo_GetIncrementalDecoder()
* _PyCodecInfo_GetIncrementalEncoder()
* _PyCodec_DecodeText()
* _PyCodec_EncodeText()
* _PyCodec_Forget()
* _PyCodec_Lookup()
* _PyCodec_LookupTextEncoding()
Move these functions to a new pycore_codecs.h internal header file.
These functions are no longer exported.
|
|
|
|
| |
Rename _PyObject_FastCallDictTstate() to
_PyObject_VectorcallDictTstate().
|
|
|
|
| |
Remove _PY_FASTCALL_SMALL_STACK constant from the C API: move it to
the internal C API (pycore_call.h).
|
| |
|
|
|
|
|
|
| |
This enables super-instruction formation,
removal of checks for uninitialized variables,
and frees up an instruction.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyTuple_SET_ITEM() and PyList_SET_ITEM() now check the index argument
with an assertion if Python is built in debug mode or is built with
assertions.
* list_extend() and _PyList_AppendTakeRef() now set the list size
before calling PyList_SET_ITEM().
* PyStructSequence_GetItem() and PyStructSequence_SetItem() now check
the index argument: must be lesser than REAL_SIZE(op).
* PyStructSequence_GET_ITEM() and PyStructSequence_SET_ITEM() are now
aliases to PyStructSequence_GetItem() and
PyStructSequence_SetItem().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the following private functions from the public C API:
* _Py_CheckFunctionResult()
* _PyObject_CallMethod()
* _PyObject_CallMethodId()
* _PyObject_CallMethodIdNoArgs()
* _PyObject_CallMethodIdObjArgs()
* _PyObject_CallMethodIdOneArg()
* _PyObject_MakeTpCall()
* _PyObject_VectorcallMethodId()
* _PyStack_AsDict()
Move these functions to the internal C API (pycore_call.h).
No longer export the following functions:
* _PyObject_Call()
* _PyObject_CallMethod()
* _PyObject_CallMethodId()
* _PyObject_CallMethodIdObjArgs()
* _PyObject_Call_Prepend()
* _PyObject_FastCallDictTstate()
* _PyStack_AsDict()
The following functions are still exported for stdlib shared
extensions:
* _Py_CheckFunctionResult()
* _PyObject_MakeTpCall()
Mark the following internal functions as extern:
* _PyStack_UnpackDict()
* _PyStack_UnpackDict_Free()
* _PyStack_UnpackDict_FreeNoDecRef()
|
| |
|
|
|
|
| |
(#106148)
|