-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-84436: Implement Immortal Objects #19474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ericsnowcurrently
merged 201 commits into
python:main
from
eduardo-elizondo:immortal-references
Apr 22, 2023
Merged
Changes from all commits
Commits
Show all changes
201 commits
Select commit
Hold shift + click to select a range
0c930b7
Implement Immortal Instances
eduardo-elizondo 7005944
Nits
eduardo-elizondo c6a1bfa
Bypass immortality in NewReference
eduardo-elizondo 51e4879
Add News and Fix MSVC Build
eduardo-elizondo cc2ece3
Formatting Nits
eduardo-elizondo 72d12fa
Typo
eduardo-elizondo f04776e
MSVC Test
eduardo-elizondo fa8d668
Skip test for MSVC
eduardo-elizondo f066633
Skip test for MSVC 32 & 64
eduardo-elizondo 36e0a9a
Skip all tests for Windows
eduardo-elizondo 2f9fa29
Immortalize known immortals
eduardo-elizondo a1bc981
static inits
eduardo-elizondo 0b12a16
Immortalize more known immortals
eduardo-elizondo 1332f03
Change static to define
eduardo-elizondo 17883d7
Nits
eduardo-elizondo bc23d4d
Add parentheses for define
eduardo-elizondo 825f8fa
Fix gc tests
eduardo-elizondo 9a6f4f9
Remove module usage at runtime destruction
8000
eduardo-elizondo 6899f5c
Fix msvc
eduardo-elizondo d285010
Fix refcnt tests
eduardo-elizondo b7d2c21
Fix refcnt tests
eduardo-elizondo 093edae
Merge branch 'immortal-references' of https://github.com/eduardo-eliz…
eduardo-elizondo 54af788
Nits
eduardo-elizondo b29c8ff
Remove immortalize arenas
eduardo-elizondo 701579a
Remove immortalize arenas
eduardo-elizondo a12da60
Merge branch 'immortal-references' of https://github.com/eduardo-eliz…
eduardo-elizondo a99a517
Fix ms
eduardo-elizondo 15ad069
Fix msft
eduardo-elizondo 874248a
Remove profile
eduardo-elizondo 357a084
Make all tests pass
eduardo-elizondo 937d4f6
Added skipUnless arg
eduardo-elizondo d3bcea6
Exclude refcnt tests
eduardo-elizondo b439b7b
Exclude leak tests
eduardo-elizondo ea23b5a
Exclude refleak tests
eduardo-elizondo 07fa840
Pass. Tests.
eduardo-elizondo 6ff9ab2
Merge branch 'master' into immortal-references
eduardo-elizondo 3d6f709
Rebased to latest
eduardo-elizondo 66dc3e4
Make tests pass
eduardo-elizondo 385e075
Simplify Review
eduardo-elizondo b0bb995
Cleanup
eduardo-elizondo 7e26465
Immortalize startup heap
eduardo-elizondo 0c2bc92
Rebase
eduardo-elizondo ce1319a
Fix test
eduardo-elizondo fbb1b12
Branchless add
eduardo-elizondo 61f128a
Branch if
eduardo-elizondo e6bf2e2
Remove branch in none,true,false return
eduardo-elizondo 62ff2c7
Readuce feature set to singleton immortalization only
eduardo-elizondo 0820520
More clenups
eduardo-elizondo 3866ad7
Merge branch 'master' into immortal-references
eduardo-elizondo 65c7e30
Remove exposed C-API
eduardo-elizondo e530f0b
Fixes for refcount tests
eduardo-elizondo 3375cd6
Remove superfluous tests
eduardo-elizondo 570aff4
Remove extra file
eduardo-elizondo e49b58a
Reduce test refcount check ammount
eduardo-elizondo ef478b1
Rerun tests
eduardo-elizondo 7225f3e
Address comments
eduardo-elizondo 0f6ad8e
Small fix
eduardo-elizondo 54c8fe2
Increase initial immortal refcount
eduardo-elizondo e274104
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo c829257
Cleanups
eduardo-elizondo 5949df4
Move immortal bit to 2nd MSB
eduardo-elizondo 2baee89
Improve comments
eduardo-elizondo f7da0f8
Remove extras refcounts inside interpreter loop
eduardo-elizondo 4bea515
immortalize deepfreeze
eduardo-elizondo dfb5863
Remove unused files
eduardo-elizondo f7287b2
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 5af0167
Remove unused refcounts in singletons within CPython/Objects
eduardo-elizondo 02cf9af
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 25fd52a
Revert "Remove unused refcounts in singletons within CPython/Objects"
eduardo-elizondo be86955
Include immortal interned strings
eduardo-elizondo 38a14a9
Regen frozen main
eduardo-elizondo c828369
Properly clean up all immortal interned strings at runtime finalization
eduardo-elizondo ee41af6
Build and test fixes
eduardo-elizondo f835e6d
Temporarily disable single test_embed test
eduardo-elizondo 8573af4
Fix structseq test
eduardo-elizondo ad19ff6
Move nonetype refcount to static refcnt
eduardo-elizondo 66c625f
Remove unneeded reference counts in Cpython/Objects
eduardo-elizondo 1379d50
Mark global instances as static globals
eduardo-elizondo 1c9ee6d
Remove unneeded reference counts in Cpython/Python
eduardo-elizondo 287b57c
Remove unneeded reference counts in gcmodule.c
eduardo-elizondo c736a7c
Cleanup bool and str usage
eduardo-elizondo 60f0760
Merge branch 'main' into immortal-references
eduardo-elizondo 1321ff6
Fix whitespaces
eduardo-elizondo a719b41
Remove static immortal bit in favor of unicode intern state
eduardo-elizondo 9f3ed39
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 8f72afe
Regen frozen
eduardo-elizondo 52d6d78
Fix regrtest
eduardo-elizondo 9fd8a98
Change immortal refcount for PY_SSIZE_T_MAX
eduardo-elizondo 3478467
Introduce saturated adds for increfs
eduardo-elizondo eb5da8c
Add default and msvc intrinsic saturated add
eduardo-elizondo def8da3
Fix msvc saturated add
eduardo-elizondo fe6727e
Fix docs
eduardo-elizondo 38df3ce
Move unicode_is_singleton to Py_DEBUG
eduardo-elizondo 73f6dcd
Skip immortal checks in frame clear
eduardo-elizondo d68efa1
Make code objects immortal
eduardo-elizondo 18cff33
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 168a85c
Refcount fixes
eduardo-elizondo 9ada9fd
Temporarily disable two code tests
eduardo-elizondo 5d3beb9
Disable one more code test
eduardo-elizondo ea342e3
Cleanups
eduardo-elizondo d78a560
Simplify Implementation
eduardo-elizondo 16d59e3
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo f49c13c
Cleanups
eduardo-elizondo 8262e56
More Cleanups
eduardo-elizondo 96c7caa
Regen Frozen
eduardo-elizondo 3493c85
Fix regrtest
eduardo-elizondo 0f38657
Only immortal changes
eduardo-elizondo 401a3c3
Fix C++ compilation issue
eduardo-elizondo 6bd2d94
Fix regen files
eduardo-elizondo 9df1447
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 15f7365
Fix sat add
eduardo-elizondo ea9f01c
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo c39b617
32 bit fixes
eduardo-elizondo 3ae8374
Fix msvc build
eduardo-elizondo ba7cfe1
Add 32 compat
eduardo-elizondo 7a29123
More fixes
eduardo-elizondo 88ede67
Fix inlined refcounts
eduardo-elizondo 34bdf3c
Change refcount strategy for 32bit systems
eduardo-elizondo ab1f6e4
Add guard for saturated add function
eduardo-elizondo c2c228e
Cleanup unneeded port values
eduardo-elizondo 219ebdc
branchless saturated add
eduardo-elizondo cd42e16
Use PY32 bit integers
eduardo-elizondo 99e7549
Cleanups
eduardo-elizondo d7df473
Remove branchless add as it's slower
eduardo-elizondo 00238eb
Immortalize Interned Strings
eduardo-elizondo 9355ca2
Fix structseq test
eduardo-elizondo eedd412
Bring back interned stats
eduardo-elizondo ccf8b61
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo e57910d
Fix msvc ifdef
eduardo-elizondo 6437df7
Only copy lower 32 bits to refcnt
eduardo-elizondo ba75726
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 418b2ff
Merge cleanups
eduardo-elizondo 1468f52
Fixing Test Failures
eduardo-elizondo e30fea4
Addressed static string issue
eduardo-elizondo 5aa8c34
Addressed regrtest failures
eduardo-elizondo d74a4c5
Addressed CI failures
eduardo-elizondo 9be58d4
Addressed CI failures second try
eduardo-elizondo f00f7f8
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 747039d
Remove temporary fixes
eduardo-elizondo 01017e1
Temporary windows fix
eduardo-elizondo 6f0cf32
Remove duplicate immortal initialization
eduardo-elizondo 7997d57
Windows fix
eduardo-elizondo 749680e
Addressed CI failures third try
eduardo-elizondo c71c742
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo bc28cb0
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo c8b694f
Add tp_dealloc suggested changes by steering committee
eduardo-elizondo 6abab4d
Fixed int leak
eduardo-elizondo 1dfe27a
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 7661541
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 59513a7
Cleanup deallocation of immortal objects
eduardo-elizondo 60329b5
Add DeepFreeze types for typle, long, and bytes
eduardo-elizondo a5e29d5
Fix regencode
eduardo-elizondo f88cbb6
Fix stable abi toml
eduardo-elizondo 7efa760
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 8ebb3db
Add DeepFreeze types for float, complex
eduardo-elizondo 2c3d242
Add DeepFreeze types for code and update stable_abi
eduardo-elizondo 5684be7
Remove PyDeepFreezeCode_Type from stable abi
eduardo-elizondo 4529e23
Revert DeepFreeze changes
eduardo-elizondo cfb56b6
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo a748e80
Replace incref memcpy with builtins
eduardo-elizondo 033c86d
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 520fbc3
Rebase fixes
eduardo-elizondo 90e0016
Debug build fixes
eduardo-elizondo bc726b0
Cleanups in prep for review
eduardo-elizondo 5e0cd08
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo f7fbf01
Correct whatsnew
eduardo-elizondo 92fbf96
More cleanups
eduardo-elizondo 1c390cc
Delete _PyType_FixCacheRefcounts
eduardo-elizondo 030016a
Addressed First Round of Comments
eduardo-elizondo 093c405
Address comments
eduardo-elizondo 6c0fdba
Return Py_DEBUG in unicode runtime shutdown
eduardo-elizondo 74b6e7b
Nits
eduardo-elizondo 433d1e3
Use Py_BUILD_CORE to set PyObject_HEAD_INIT as immortal
eduardo-elizondo 069da16
Address Carl's comments
eduardo-elizondo d22a4bf
Use a union to refer to lower 32bits
eduardo-elizondo e04ef7e
Static declarations cleanups
eduardo-elizondo 3b3b142
Only support split refcount in 64bit architectures
eduardo-elizondo ab3f951
Support incref in big-endian machines
eduardo-elizondo 3e55a32
Cleanups and comments
eduardo-elizondo ff69be7
Fix bytes_method compiler error
eduardo-elizondo e6e459c
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo e19f50a
Add Py_ALWAYS_INLINE to Py_DECREF, Py_INCREF, and _Py_IsImmortal
eduardo-elizondo 7c233b0
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 9b2b49c
Fix merge errors
eduardo-elizondo 018be4c
Fix inlining warning
eduardo-elizondo f4aa5b4
Fix build errors with _testcppext.cpp
eduardo-elizondo 1d2ee06
Also set initializers in PyModuleDef_HEAD_INIT
eduardo-elizondo c6a14f2
Revert "Also set initializers in PyModuleDef_HEAD_INIT"
eduardo-elizondo 47819f6
Fix one bug that incorrectly tracks RefTotal
eduardo-elizondo 9423c61
Fix another bug that incorrectly immortalizes non-small ints
eduardo-elizondo a4a9067
Introduce sys.getunicodeinternedsize to correctly track refleaks
eduardo-elizondo 181aedd
Move _Py_SetImmortal to internal
eduardo-elizondo 0a18468
Update whatsnew
eduardo-elizondo 67b1c57
Fix build errors in PC/_wmimodule.cpp
eduardo-elizondo e82b165
Also include m_base in initalizers of cppext and _wmi
eduardo-elizondo d85d9d3
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 9053b22
Fix mixed designated initializer error
eduardo-elizondo a9caa2d
Small cleanups
eduardo-elizondo 56f1d81
Add braces to indicate union initializer in ob_refcnt
eduardo-elizondo bae6195
Merge remote-tracking branch 'upstream/main' into immortal-references
eduardo-elizondo 9cb2c21
Also remove designated initializers from _PyObject_EXTRA_INIT
eduardo-elizondo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.