| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Move these private functions to the internal C API (pycore_long.h):
* _PyLong_UnsignedInt_Converter()
* _PyLong_UnsignedLongLong_Converter()
* _PyLong_UnsignedLong_Converter()
* _PyLong_UnsignedShort_Converter()
Argument Clinic now emits #include "pycore_long.h" when these
functions are used.
|
| |
|
|
|
|
| |
* Update Parser/asdl_c.py to regenerate Python/Python-ast.c.
* Remove _PyLong_AsInt() alias to PyLong_AsInt().
|
|
|
| |
Instead of using `GO_TO_INSTRUCTION(CALL_PY_EXACT_ARGS)` we just add the macro elements of the latter to the macro for the former. This requires lengthening the uops array in struct opcode_macro_expansion. (It also required changes to stacking.py that were merged already.)
|
|
|
|
|
|
| |
Move private functions to the internal C API (pycore_traceback.h):
* _Py_DisplaySourceLine()
* _PyTraceback_Add()
|
|
|
|
|
|
| |
* Rename _PyLong_AsInt() to PyLong_AsInt().
* Add documentation.
* Add test.
* For now, keep _PyLong_AsInt() as an alias to PyLong_AsInt().
|
|
|
|
|
|
|
|
|
|
| |
Move private functions to the internal C API (pycore_sysmodule.h):
* _PySys_GetAttr()
* _PySys_GetSizeOf()
No longer export most of these functions.
Fix also a typo in Include/cpython/optimizer.h: add a missing space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move private functions to the internal C API (pycore_dict.h):
* _PyDictView_Intersect()
* _PyDictView_New()
* _PyDict_ContainsId()
* _PyDict_DelItemId()
* _PyDict_DelItem_KnownHash()
* _PyDict_GetItemIdWithError()
* _PyDict_GetItem_KnownHash()
* _PyDict_HasSplitTable()
* _PyDict_NewPresized()
* _PyDict_Next()
* _PyDict_Pop()
* _PyDict_SetItemId()
* _PyDict_SetItem_KnownHash()
* _PyDict_SizeOf()
No longer export most of these functions.
Move also the _PyDictViewObject structure to the internal C API.
Move dict_getitem_knownhash() function from _testcapi to the
_testinternalcapi extension. Update test_capi.test_dict for this
change.
|
|
|
|
|
|
|
|
| |
Move private functions to the internal C API (pycore_list.h):
* _PyList_Extend()
* _PyList_DebugMallocStats()
No longer export these functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move private _PyEval functions to the internal C API
(pycore_ceval.h):
* _PyEval_GetBuiltin()
* _PyEval_GetBuiltinId()
* _PyEval_GetSwitchInterval()
* _PyEval_MakePendingCalls()
* _PyEval_SetProfile()
* _PyEval_SetSwitchInterval()
* _PyEval_SetTrace()
No longer export most of these functions.
|
|
|
|
|
|
|
|
| |
Export these internal functions for test_peg_generator
* _PyArena_AddPyObject()
* _PyArena_Free()
* _PyArena_Malloc()
* _PyArena_New()
|
|
|
| |
Move the function to the internal C API.
|
|
|
|
|
|
|
|
|
|
| |
106320: Remove private float C API functions
Remove private C API functions:
* _Py_parse_inf_or_nan()
* _Py_string_to_number_with_underscores()
Move these functions to the internal C API and no longer export them.
|
|
|
|
| |
Remove private _PyManagedBuffer_Type variable. Move it to the
internal C API and no longer export it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove private PyLong C API functions:
* _PyLong_AsByteArray()
* _PyLong_DivmodNear()
* _PyLong_Format()
* _PyLong_Frexp()
* _PyLong_FromByteArray()
* _PyLong_FromBytes()
* _PyLong_GCD()
* _PyLong_Lshift()
* _PyLong_Rshift()
Move these functions to the internal C API. No longer export
_PyLong_FromBytes() function.
|
|
|
|
|
|
| |
No longer export _PyCompile_AstOptimize() internal C API function.
Change comment style to "// comment" and add comment explaining why
other functions have to be exported.
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|