Skip to content
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

Make actor pad automagically calculated #4528

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

dipinhora
Copy link
Contributor

Prior to this commit, we had to manually update the actor pad size if the size of pony_actor_t changed.

This commit makes it so that the actor pad size is now automagically calculated by the compiler so it doesn't have to be manually maintained any longer.

Prior to this commit, we had to manually update the actor pad size
if the size of pony_actor_t changed.

This commit makes it so that the actor pad size is now automagically
calculated by the compiler so it doesn't have to be manually maintained
any longer.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Oct 9, 2024
Copy link
Member

@jemc jemc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially approved because it is correct, but on the sync call we discussed that it might add some safety to add after the last member of pony_actor_t (that is, between line 70 and 71) a comment that says something like "if you add more members here, you need to update the PONY_ACTOR_PAD_SIZE calculation below, to reference the final member, its offset, and size)"

This will help prevent future subtle mistakes

@dipinhora
Copy link
Contributor Author

added the warning

@jemc jemc merged commit e1f9e64 into ponylang:main Oct 15, 2024
21 checks passed
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants