-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Hide C header implementation details related to actor pad size. #3960
Conversation
Hi @jemc, The changelog - changed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do. Release notes are added by creating a uniquely named file in the The basic format of the release notes (using markdown) should be:
Thanks. |
typedef struct pony_actor_pad_t | ||
{ | ||
pony_type_t* type; | ||
char pad[PONY_ACTOR_PAD_SIZE]; | ||
} pony_actor_pad_t; |
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.
why kill off the struct? you are "using it" now in two different locations. seems reasonable to move this into actor.h and then still use it as it was before in cycle.c and actor.c.
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 plan to kill both uses of it in a future PR. Having this type exist whose memory layout is dependent on that pad size is antithetical with the goal we discussed of making the pad size be variable based on configuration settings at LLVM link/optimization time.
If you want me to, I can revert that part of the change in this PR, but even if so, I'm just going to remove it in a future PR.
What is your preference about how to proceed?
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.
Leave now remove later. Feels more contained and easier to understand.
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.
@SeanTAllen - The PR has been updated accordingly.
…he Pony runtime, information about the size of an actor struct was published as public information. This change removes that from the public header into a private header, to hide implementation details that may be subject to change in future versions of the Pony runtime. This change does not impact Pony programs - only C programs using the `pony.h` header to use the Pony runtime in some other way than inside of a Pony program, or to create custom actors written in C. --- This commit moves the `PONY_ACTOR_PAD_SIZE` preprocessor value and `pony_actor_pad_t` struct into `actor.h`.
Previously, in the
pony.h
header that exposes the "public API" of the Pony runtime, information about the size of an actor struct was published as public information.This change removes that from the public header into a private header, to hide
implementation details that may be subject to change in future versions of the Pony runtime.
This change does not impact Pony programs - only C programs using the
pony.h
header to use the Pony runtime in some other way than inside of a Pony program, or to create custom actors written in C.This commit moves the
PONY_ACTOR_PAD_SIZE
preprocessor value andpony_actor_pad_t
struct intoactor.h
.