-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[mypyc] Introduce LoadMem #9211
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
Conversation
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.
Looks good. Most of the comments about naming -- let's think about this carefully.
Update: I've added the assertion on |
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.
Looks good now! Thanks for adding a test case. Just one tiny nit.
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.
Thanks for the final updates, looks good now!
Related to #9211. This PR introduces RStruct to represent C structs. StructInfo is used to hold information about a unique struct-like type. This PR also introduces several functions to compute aligned offsets and size of structure types.
relates mypyc/mypyc#741
Introduce
LoadMem
IR to read a memory address and convert it into a designated-type value. (The address would mostly be inpy_ssize_t
for now)Part of efforts to implement
len
primitives:*(Py_ssize_t*)(ob + size_offset)