summaryrefslogtreecommitdiffstats
path: root/Tools/build
Commit message (Collapse)AuthorAgeFilesLines
* gh-108494: Argument Clinic partial supports of Limited C API (#108495)Victor Stinner2023-08-251-0/+1
| | | | | | | | | | Argument Clinic now has a partial support of the Limited API: * Add --limited option to clinic.c. * Add '_testclinic_limited' extension which is built with the limited C API version 3.13. * For now, hardcode in clinic.py that "_testclinic_limited.c" targets the limited C API.
* gh-107211: No longer export internal functions (7) (#108425)Victor Stinner2023-08-241-2/+2
| | | | | | | | | 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.
* gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. ↵Irit Katriel2023-08-231-67/+0
| | | | (#108367)
* gh-105481: opcode.h is no longer generated during the build (#108080)Irit Katriel2023-08-171-34/+3
|
* gh-105481: fix out of date comment (#108079)Irit Katriel2023-08-171-1/+1
|
* gh-105481: generate op IDs from bytecode.c instead of hard coding them in ↵Irit Katriel2023-08-162-108/+6
| | | | opcode.py (#107971)
* Attempt to speed up deepfreeze.py (#107887)Guido van Rossum2023-08-141-12/+23
| | | | | | * Instead of calling get_identifiers_and_strings(), extract identifiers and strings from pycore_global_strings.h. * Avoid ast.literal_eval(), it's very slow.
* gh-105481: split opcode_ids.h out of opcode.h so that it can be generated ↵Irit Katriel2023-08-111-15/+46
| | | | separately (#107866)
* Fix the long64 reader in umarshal.py (GH-107828)Martin DeMello2023-08-101-4/+4
|
* gh-105481: simplify definition of pseudo ops in Lib/opcode.py (#107561)Irit Katriel2023-08-021-9/+1
|
* gh-105481: combine regen-opcode-targets with regen-opcode to avoid ↵Irit Katriel2023-08-011-1/+11
| | | | calculating the specialized opcodes in two places (#107540)
* gh-105481: the ENABLE_SPECIALIZATION flag does not need to be generated by ↵Irit Katriel2023-08-011-5/+0
| | | | the build script, or exposed in opcode.py (#107534)
* gh-106931: Intern Statically Allocated Strings Globally (gh-107272)Eric Snow2023-07-271-0/+2
| | | | | 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.
* gh-105481: remove dependency of _inline_cache_entries on opname (#107339)Irit Katriel2023-07-271-3/+2
|
* gh-105481: do not auto-generate pycore_intrinsics.h (#106913)Irit Katriel2023-07-201-34/+3
|
* gh-105481: Generate the opcode lists in dis from data extracted from ↵Irit Katriel2023-07-181-6/+0
| | | | bytecodes.c (#106758)
* GH-106360: Support very basic superblock introspection (#106422)Mark Shannon2023-07-041-3/+4
| | | * Add len() and indexing support to uop superblocks.
* gh-106316: Remove pytime.h header file (#106317)Victor Stinner2023-07-011-1/+0
| | | | | | | | | | | | | | | | | 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()
* make regen-stdlib-module-names rejects test modules (#105921)Victor Stinner2023-06-201-2/+17
| | | Make sure that sys.stdlib_module_names doesn't contain test modules.
* gh-105481: generate _specializations and _specialized_instructions from ↵Irit Katriel2023-06-191-12/+17
| | | | bytecodes.c (#105913)
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-30/+0
| | | | replace by their new versions (#105865)
* gh-105407: Remove unused imports in tools (#105409)Victor Stinner2023-06-061-2/+0
|
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)Victor Stinner2023-06-061-4/+4
| | | | | | | | | * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c
* gh-105091: stable_abi.py: Remove "Unixy" check from --all on other platforms ↵Petr Viktorin2023-05-301-1/+2
| | | | (GH-105092)
* gh-104773: Remove the msilib package (GH-104911)Zachary Ware2023-05-251-1/+0
|
* gh-103963: fix 'make regen-opcode' in out-of-tree builds (#104177)Carl Meyer2023-05-041-1/+1
|
* gh-102500: Implement PEP 688 (#102521)Jelle Zijlstra2023-05-041-0/+2
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* GH-103963: Make dis display names of args for intrinsics opcodes (#104029)Juhi Chandalia2023-05-031-2/+34
|
* gh-98040: Remove just the `imp` module (#98573)Barry Warsaw2023-04-281-1/+1
|
* gh-103875: Use ascii and latin1 singletons in deepfreeze (#103876)Yichen Yan2023-04-261-0/+6
|
* gh-84436: Implement Immortal Objects (gh-19474)Eddie Elizondo2023-04-221-1/+1
| | | | | | | | | This is the implementation of PEP683 Motivation: The PR introduces the ability to immortalize instances in CPython which bypasses reference counting. Tagging objects as immortal allows up to skip certain operations when we know that the object will be around for the entire execution of the runtime. Note that this by itself will bring a performance regression to the runtime due to the extra reference count checks. However, this brings the ability of having truly immutable objects that are useful in other contexts such as immutable data sharing between sub-interpreters.
* gh-102856: Initial implementation of PEP 701 (#102855)Pablo Galindo Salgado2023-04-191-0/+2
| | | | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
* gh-95299: Stop installing setuptools as a part of ensurepip and venv (#101039)Pradyun Gedam2023-04-181-1/+1
| | | | | | | Remove the bundled setuptools wheel from ensurepip, and stop installing setuptools in environments created by venv. Co-Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-122-5/+3
| | | | | | | | | | (GH-103083) * The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
* gh-91276: remove unused _PyOpcode_RelativeJump (#103156)Irit Katriel2023-04-111-2/+0
|
* gh-87092: move CFG related code from compile.c to flowgraph.c (#103021)Irit Katriel2023-03-311-1/+3
|
* gh-100227: Move the Dict of Interned Strings to PyInterpreterState (gh-102339)Eric Snow2023-03-281-2/+2
| | | | | We can revisit the options for keeping it global later, if desired. For now the approach seems quite complex, so we've gone with the simpler isolation solution in the meantime. https://github.com/python/cpython/issues/100227
* GH-101291: Rearrange the size bits in PyLongObject (GH-102464)Mark Shannon2023-03-221-4/+6
| | | | | | | | | | * Eliminate all remaining uses of Py_SIZE and Py_SET_SIZE on PyLongObject, adding asserts. * Change layout of size/sign bits in longobject to support future addition of immortal ints and tagged medium ints. * Add functions to hide some internals of long object, and for setting sign and digit count. * Replace uses of IS_MEDIUM_VALUE macro with _PyLong_IsCompact().
* GH-94851: check unicode consistency of static strings in debug mode (#102684)Kumar Aditya2023-03-141-0/+1
|
* gh-101524: Split Up the _xxsubinterpreters Module (gh-101526)Eric Snow2023-02-041-0/+1
| | | | | This is step 1 in potentially dropping all the "channel"-related code. Channels have already been removed from PEP 554. https://github.com/python/cpython/issues/101524
* Add advice how to freeze fewer modules (#101298)Guido van Rossum2023-01-251-1/+6
| | | (And fix a bug that only occurs when you follow the advice.)
* gh-100712: make it possible to disable specialization (for debugging) (#100713)Irit Katriel2023-01-191-0/+5
|
* GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)Mark Shannon2023-01-041-6/+2
|
* gh-100720: refactor calculation of number of frame slots for a code object ↵Irit Katriel2023-01-041-0/+1
| | | | into the new function _PyFrame_NumSlotsForCodeObject (#100722)
* GH-98522: Add version number to code objects. (GH-98525)Mark Shannon2022-12-091-0/+5
| | | | | | * Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
* gh-96002: Add functional test for Argument Clinic (#96178)colorfulappl2022-11-211-0/+1
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-81057: Move contextvars-related Globals to _PyRuntimeState (gh-99400)Eric Snow2022-11-161-0/+3
| | | | | This is part of the effort to consolidate global variables, to make them easier to manage (and make it easier to later move some of them to PyInterpreterState). https://github.com/python/cpython/issues/81057
* gh-81057: Add PyInterpreterState.static_objects (gh-99397)Eric Snow2022-11-111-2/+4
| | | | | As we consolidate global variables, we find some objects that are almost suitable to add to _PyRuntimeState.global_objects, but have some small/sneaky bit of per-interpreter state (e.g. a weakref list). We're adding PyInterpreterState.static_objects so we can move such objects there. (We'll removed the _not_used field once we've added others.) https://github.com/python/cpython/issues/81057
* gh-81057: Generate a Separate Initializer For Each Part of the Global ↵Eric Snow2022-11-111-48/+49
| | | | | | | Objects Initializer (gh-99389) Up until now we had a single generated initializer macro for all the statically declared global objects in _PyRuntimeState, including several one-offs (e.g. the empty tuple). The one-offs don't need to be generated, but were because we had one big initializer. Having separate initializers for set of generated global objects allows us to generate only the ones we need to. This allows us to add initializers for one-off global objects without having to generate them. https://github.com/python/cpython/issues/81057
* gh-90868: Add _PyStaticObject_CheckRefcnt() function (#99261)Victor Stinner2022-11-091-5/+2
| | | | | | Add _PyStaticObject_CheckRefcnt() function to make _PyStaticObjects_CheckRefcnt() shorter. Use _PyObject_ASSERT_FAILED_MSG() to log the object causing the fatal error.