-
Notifications
You must be signed in to change notification settings - Fork 948
Opaque Object Layout (take 2) #5728
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
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a6035b7
Provide basicsize from PyClassObject instead of directly using size_of
mbway 5b0d2a6
Hide PyClassObject details incompatible with variable sizing.
mbway bc4f4ae
specify absolute or relative offsets.
mbway a5a0f6f
use trait for accessing object layout
mbway 26d13f9
classes specify their structure rather than hard coding the static la…
mbway 04208df
types specify their layouts
mbway 7ec3697
variable size class layout using PEP-697
mbway f91548c
make class initialization not dependent on the static layout
mbway 8907442
handle deallocation for variable layout
mbway cf70d26
finish implementation of Offset handling
mbway b3f550d
rename layout traits
mbway 1026240
small fixes and tidying
mbway 8087cef
fix some tests and linting errors
mbway 70a1748
improved docs
mbway c0aa4f1
update ui tests
Icxolu aed1853
move more functions into const
Icxolu 4d5b220
rename `contents_uninitialised` to `contents_uninit`
Icxolu 2487af1
move `Layout<T>` GAT from `PyTypeInfo` to `PyClassBaseType`
Icxolu 75cd432
reorganize code
Icxolu 89f4636
remove transmute by restricting trait bound
Icxolu 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| //! Externally-accessible implementation of pycell | ||
| pub use crate::pycell::impl_::{ | ||
| GetBorrowChecker, PyClassMutability, PyClassObject, PyClassObjectBase, PyClassObjectLayout, | ||
| GetBorrowChecker, PyClassMutability, PyClassObjectBase, PyClassObjectBaseLayout, | ||
| PyStaticClassObject, PyVariableClassObject, PyVariableClassObjectBase, | ||
| }; |
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.
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.
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.
Should this be using
PyStaticClassObject?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 is redefined here, because the fields of
PyStaticClassObjectare intentionally private, so we can't compute the offset here without loosening that.