| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
| |
parts (GH-30159)
|
|
|
| |
This reverts commit 2ef06d412531d1163dbc72877c88aedf3ed82a25.
|
| |
|
|
|
|
|
|
|
|
| |
* Do not PUSH/POP traceback or type to the stack as part of exc_info
* Remove exc_traceback and exc_type from _PyErr_StackItem
* Add to what's new, because this change breaks things like Cython
|
|
|
|
|
|
| |
* Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE.
* Remove YIELD_FROM opcode.
|
|
|
|
|
|
|
|
|
|
| |
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW.
* Update specialization to handle new CALL opcodes.
* Specialize call to method descriptors.
* Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
|
| |
|
|
|
|
|
|
|
| |
The array of small PyLong objects has been statically declared. Here I also statically initialize them. Consequently they are no longer initialized dynamically during runtime init.
I've also moved them under a new sub-struct in _PyRuntimeState, in preparation for static allocation and initialization of other global objects.
https://bugs.python.org/issue45953
|
|
|
|
| |
(#29665)
|
|
|
|
| |
PyImport_ImportModule (GH-30046)
|
|
|
|
|
|
|
|
|
|
|
|
| |
consistent. (gh-29998)
This change is strictly renames and moving code around. It helps in the following ways:
* ensures type-related init functions focus strictly on one of the three aspects (state, objects, types)
* passes in PyInterpreterState * to all those functions, simplifying work on moving types/objects/state to the interpreter
* consistent naming conventions help make what's going on more clear
* keeping API related to a type in the corresponding header file makes it more obvious where to look for it
https://bugs.python.org/issue46008
|
|
|
|
|
| |
* bpo-45813: Drop redundant assertion from frame.clear()
* Move assertion to frame_dealloc()
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
before GC header. (GH-29879)
* Place __dict__ immediately before GC header for plain Python objects.
* Fix up lazy dict creation logic to use managed dict pointers.
* Manage values pointer, placing them directly before managed dict pointers.
* Convert hint-based load/store attr specialization target managed dict classes.
* Specialize LOAD_METHOD for managed dict objects.
* Remove unsafe _PyObject_GC_Calloc function.
* Remove unsafe _PyObject_GC_Malloc() function.
* Add comment explaning use of Py_TPFLAGS_MANAGED_DICT.
|
|
|
|
|
|
|
| |
generator. (GH-29891)
* Make generator, coroutine and async gen structs all the same size.
* Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.
|
|
|
|
| |
__note__ field (GH-29880)
|
|
|
|
|
|
|
| |
* Add COMPARE_OP_ADAPTIVE adaptive instruction.
* Add COMPARE_OP_FLOAT_JUMP, COMPARE_OP_INT_JUMP and COMPARE_OP_STR_JUMP specialized instructions.
* Introduce and use _PyUnicode_Equal
|
|
|
|
|
|
|
| |
Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges and
invert the value.
Document -X no_debug_ranges and PYTHONNODEBUGRANGES env var in
PyConfig.code_debug_ranges documentation.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to be specialized (GH-29595)
* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.
* Add reference to function to frame, borrow references to builtins and globals.
* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
|
|
|
|
| |
deallocated. (GH-29700)
|
|
|
|
|
| |
* Specialize STORE_SUBSCR for list[int], and dict[object]
* Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-29366)
|
| |
|
| |
|
|
|
| |
* Rename 'frame' to 'current_frame'
|
|
|
|
|
|
|
|
| |
Keep track of whether unsafe_tuple_compare() calls are resolved by the very
first tuple elements, and adjust strategy accordingly. This can significantly
cut the number of calls made to the full-blown PyObject_RichCompareBool(),
and especially when duplicates are rare.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
| |
(GH-28569)
|
|
|
|
|
| |
* Use Py_EnterRecursiveCall() in issubclass()
Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
|
| |
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
MAP_BOT_LENGTH was incorrectly used to compute MAP_TOP_MASK instead of
MAP_TOP_LENGTH. On 64-bit machines, the error causes the tree to hold
46-bits of virtual addresses, rather than the intended 48-bits.
|
|
|
|
|
|
|
|
| |
Freelists for object structs can now be disabled. A new ``configure``
option ``--without-freelists`` can be used to disable all freelists
except empty tuple singleton. Internal Py*_MAXFREELIST macros can now
be defined as 0 without causing compiler warnings and segfaults.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
| |
for its name (GH-29103)
|
|
|
|
|
|
|
|
|
|
| |
Move Include/longobject.h non-limited API to a new
Include/cpython/longobject.h header file.
Move the following definitions to the internal C API:
* _PyLong_DigitValue
* _PyLong_FormatAdvancedWriter()
* _PyLong_FormatWriter()
|
|
|
|
|
|
| |
* Avoid making C calls for most calls to Python functions.
* Change initialize_locals(steal=true) and _PyTuple_FromArraySteal to consume the argument references regardless of whether they succeed or fail.
|
|
|
|
|
|
|
|
|
| |
Rename Include/namespaceobject.h to
Include/internal/pycore_namespace.h.
The _testmultiphase extension is now built with the
Py_BUILD_CORE_MODULE macro defined to access _PyNamespace_Type.
object.c: remove unused "pycore_context.h" include.
|
|
|
|
| |
Move the interpreteridobject.h header file from Include/ to
Include/internal/. It only provides private functions.
|
|
|
|
|
|
|
|
|
| |
Move classobject.h, context.h, genobject.h and longintrepr.h header
files from Include/ to Include/cpython/.
Remove redundant "#ifndef Py_LIMITED_API" in context.h.
Remove explicit #include "longintrepr.h" in C files. It's not needed,
Python.h already includes it.
|
|
|
| |
Thank you to Eryk Sun for the suggestions in https://github.com/python/cpython/pull/28965#discussion_r729527143.
|
|
|
| |
Remove dead variables and control flow.
|