-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
bpo-45947: Place dict and values pointer at fixed (negative) offset just before GC header. #29879
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
markshannon
merged 21 commits into
python:main
from
faster-cpython:regular-dict-placement
Dec 7, 2021
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ee59772
Remove unsafe _PyObject_GC_Calloc function.
markshannon 72b71cc
Place __dict__ immediately before GC header for variable sized object…
markshannon cd22dac
Restore documented behavior of tp_dictoffset.
markshannon 4c83f77
Merge branch 'main' into regular-dict-placement
markshannon 8a8593c
Fix up lazy dict creation logic to use managed dict pointers.
markshannon 34b5cea
Manage values pointer, placing them directly before managed dict poin…
markshannon e8c74ab
Refactor a bit.
markshannon 1bf13b0
Fix specialization of managed values.
markshannon a025dfb
Convert hint-based load/store attr specialization target managed dict…
markshannon 5a012a8
Specialize LOAD_METHOD for managed dict objects.
markshannon e7734b8
Merge branch 'main' into regular-dict-placement
markshannon 14d41ab
Use newer API internally.
markshannon 123171a
Add NEWS.
markshannon 48d6a58
Use inline functions instead of magic constants.
markshannon 79e61bf
Remove unsafe _PyObject_GC_Malloc() function.
markshannon ce0f65b
Remove invalid assert.
markshannon 98ddaed
Add comment explaning use of Py_TPFLAGS_MANAGED_DICT.
markshannon 0f376b5
Use inline function, not magic constant.
markshannon d724812
Tidy up struct layout a bit.
markshannon 9435bae
Tidy up gdb/libpython.py.
markshannon 302f46f
Fix whitespace.
markshannon 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_PyObject_GC_Mallocis part of stable ABI. AFAIK the function cannot be removed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not part of the stable ABI. It starts with an underscore.
https://www.python.org/dev/peps/pep-0384/#excluded-functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misc/stable_abi.txtdefine it as stable ABI.On the other hand, no public macro in Python/C API use it. So I doubt it is actually stable abi.
As far as this repo, only one package in top4000 packages uses it.
https://github.com/hpyproject/top4000-pypi-packages/search?q=_PyObject_GC_Malloc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sent an email to python-dev asking for clarification of the status of this functions and others that start with _ but are listed in Misc/stable_abi.txt. (It is not listed in Doc/data/stable_abi.dat.)