cpython/Include/internal
Eddie Elizondo ea2c001650
gh-84436: Implement Immortal Objects (gh-19474)
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.
2023-04-22 13:39:37 -06:00
..
pycore_abstract.h
pycore_asdl.h
pycore_ast.h
pycore_ast_state.h
pycore_atexit.h gh-101659: Add _Py_AtExit() (gh-103298) 2023-04-05 18:42:02 -06:00
pycore_atomic.h
pycore_atomic_funcs.h
pycore_bitutils.h
pycore_blocks_output_buffer.h
pycore_bytes_methods.h
pycore_bytesobject.h
pycore_call.h
pycore_ceval.h GH-91079: Decouple C stack overflow checks from Python recursion checks. (GH-96510) 2022-10-05 01:34:03 +01:00
pycore_ceval_state.h gh-81057: Move Ceval Trampoline Globals to _PyRuntimeState (gh-100083) 2022-12-08 17:17:20 -07:00
pycore_code.h GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083) 2023-04-12 12:04:55 +01:00
pycore_compile.h gh-87092: move assembler related code from compile.c to assemble.c (#103277) 2023-04-11 11:15:09 +01:00
pycore_condvar.h
pycore_context.h gh-81057: Move contextvars-related Globals to _PyRuntimeState (gh-99400) 2022-11-16 09:54:28 -07:00
pycore_descrobject.h
pycore_dict.h gh-100227: Move dict_state.global_version to PyInterpreterState (gh-102338) 2023-03-09 08:16:30 -07:00
pycore_dict_state.h gh-100227: Move dict_state.global_version to PyInterpreterState (gh-102338) 2023-03-09 08:16:30 -07:00
pycore_dtoa.h gh-100227: Move the dtoa State to PyInterpreterState (gh-102331) 2023-02-28 13:14:40 -07:00
pycore_emscripten_signal.h
pycore_exceptions.h
pycore_faulthandler.h gh-81057: Move faulthandler Globals to _PyRuntimeState (gh-100152) 2022-12-12 09:58:46 -07:00
pycore_fileutils.h gh-99726: Improves correctness of stat results for Windows, and uses faster API when available (GH-102149) 2023-03-16 17:27:21 +00:00
pycore_fileutils_windows.h gh-99726: Fix order of recently added fields for FILE_STAT_BASIC_INFORMATION (GH-102976) 2023-03-23 23:27:46 +00:00
pycore_floatobject.h gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516) 2022-11-16 09:37:14 -07:00
pycore_flowgraph.h gh-87092: move assembler related code from compile.c to assemble.c (#103277) 2023-04-11 11:15:09 +01:00
pycore_format.h
pycore_frame.h GH-103488: Use return-offset, not yield-offset. (GH-103502) 2023-04-13 16:19:07 +01:00
pycore_function.h gh-100227: Move func_state.next_version to PyInterpreterState (gh-102334) 2023-03-08 15:56:36 -07:00
pycore_gc.h gh-97922: Run the GC only on eval breaker (#97920) 2022-10-08 07:57:09 -07:00
pycore_genobject.h GH-99005: More intrinsics (GH-100774) 2023-01-06 14:47:57 +00:00
pycore_getopt.h
pycore_gil.h
pycore_global_objects.h gh-100227: Move the Dict of Interned Strings to PyInterpreterState (gh-102339) 2023-03-28 12:52:28 -06:00
pycore_global_objects_fini_generated.h gh-84436: Implement Immortal Objects (gh-19474) 2023-04-22 13:39:37 -06:00
pycore_global_strings.h gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback (#102779) 2023-03-18 11:47:11 +00:00
pycore_hamt.h gh-81057: Move contextvars-related Globals to _PyRuntimeState (gh-99400) 2022-11-16 09:54:28 -07:00
pycore_hashtable.h Use _Py_RVALUE() in macros (#99844) 2022-11-28 17:42:22 +01:00
pycore_import.h gh-100227: Make the Global PyModuleDef Cache Safe for Isolated Interpreters (gh-103084) 2023-03-29 17:15:43 -06:00
pycore_initconfig.h gh-98608: Stop Treating All Errors from _Py_NewInterpreterFromConfig() as Fatal (gh-102657) 2023-03-21 10:49:12 -06:00
pycore_instruments.h GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083) 2023-04-12 12:04:55 +01:00
pycore_interp.h GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083) 2023-04-12 12:04:55 +01:00
pycore_interpreteridobject.h
pycore_intrinsics.h gh-90110: Fix the c-analyzer Tool (#102483) 2023-03-06 19:40:09 -07:00
pycore_list.h gh-100146: Steal references from stack when building a list (#100147) 2023-01-03 10:49:49 -08:00
pycore_long.h gh-84436: Implement Immortal Objects (gh-19474) 2023-04-22 13:39:37 -06:00
pycore_moduleobject.h
pycore_namespace.h
pycore_object.h gh-84436: Implement Immortal Objects (gh-19474) 2023-04-22 13:39:37 -06:00
pycore_object_state.h gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545) 2023-03-21 11:46:09 -06:00
pycore_obmalloc.h gh-81057: Move More Globals to _PyRuntimeState (gh-100092) 2022-12-07 15:56:31 -07:00
pycore_obmalloc_init.h gh-81057: Move More Globals to _PyRuntimeState (gh-100092) 2022-12-07 15:56:31 -07:00
pycore_opcode.h GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083) 2023-04-12 12:04:55 +01:00
pycore_opcode_utils.h gh-91276: remove unused _PyOpcode_RelativeJump (#103156) 2023-04-11 11:20:39 +01:00
pycore_parser.h gh-81057: Move the Cached Parser Dummy Name to _PyRuntimeState (#100277) 2022-12-16 13:48:03 +00:00
pycore_pathconfig.h
pycore_pyarena.h
pycore_pyerrors.h gh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__ (#103402) 2023-04-11 11:53:06 +01:00
pycore_pyhash.h gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516) 2022-11-16 09:37:14 -07:00
pycore_pylifecycle.h gh-102755: Add PyErr_DisplayException(exc) (#102756) 2023-03-16 22:18:04 +00:00
pycore_pymath.h Remove unused internal macros (#102415) 2023-03-04 12:20:14 +00:00
pycore_pymem.h gh-81057: Move tracemalloc Globals to _PyRuntimeState (gh-100151) 2022-12-12 08:44:23 -07:00
pycore_pymem_init.h gh-81057: Move the Allocators to _PyRuntimeState (gh-99217) 2022-11-11 16:30:46 -07:00
pycore_pystate.h GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083) 2023-04-12 12:04:55 +01:00
pycore_pythread.h gh-81057: Fix the wasm32-wasi Buildbot (gh-100139) 2022-12-09 10:17:54 -07:00
pycore_range.h gh-89189: More compact range iterator (GH-27986) 2022-11-30 23:04:30 +02:00
pycore_runtime.h gh-101659: Add _Py_AtExit() (gh-103298) 2023-04-05 18:42:02 -06:00
pycore_runtime_init.h gh-84436: Implement Immortal Objects (gh-19474) 2023-04-22 13:39:37 -06:00
pycore_runtime_init_generated.h gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback (#102779) 2023-03-18 11:47:11 +00:00
pycore_signal.h gh-81057: Move Signal-Related Globals to _PyRuntimeState (gh-100085) 2022-12-12 16:50:19 -07:00
pycore_sliceobject.h
pycore_strhex.h
pycore_structseq.h
pycore_symtable.h gh-102371: move _Py_Mangle from compile.c to symtable.c (#102372) 2023-03-02 18:38:22 +00:00
pycore_sysmodule.h gh-101758: Clean Up Uses of Import State (gh-101919) 2023-02-15 15:32:31 -07:00
pycore_time.h gh-81057: Move time Globals to _PyRuntimeState (gh-100122) 2022-12-08 16:46:09 -07:00
pycore_token.h gh-102856: Initial implementation of PEP 701 (#102855) 2023-04-19 11:18:16 -05:00
pycore_traceback.h
pycore_tracemalloc.h gh-77532: Minor tweaks to allow compiling with PlatformToolset=ClangCL on Windows (GH-101352) 2023-01-27 14:45:08 +00:00
pycore_tuple.h GH-100110: Specialize FOR_ITER for tuples (GH-100109) 2022-12-09 10:27:01 +00:00
pycore_typeobject.h gh-101476: Add _PyType_GetModuleState (GH-101477) 2023-02-23 13:42:15 -08:00
pycore_ucnhash.h
pycore_unicodeobject.h gh-84436: Implement Immortal Objects (gh-19474) 2023-04-22 13:39:37 -06:00
pycore_unicodeobject_generated.h gh-100227: Move the Dict of Interned Strings to PyInterpreterState (gh-102339) 2023-03-28 12:52:28 -06:00
pycore_unionobject.h
pycore_warnings.h