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

#132: Virtual Serialization: Spare need for self-class type macro arguments #133

Merged
merged 6 commits into from
Oct 8, 2020

Conversation

PhilMiller
Copy link
Member

No description provided.

@PhilMiller PhilMiller requested a review from lifflander October 7, 2020 00:44
@PhilMiller PhilMiller changed the title #132: Virtual Serialization: Spare need for DERIVED class type macro argument #132: Virtual Serialization: Spare need for self-class type macro arguments Oct 7, 2020
@PhilMiller
Copy link
Member Author

Handling for the PARENT class of derived classes will require a different kind of cleverness. I think one possible line of attack would be to take advantage of the fact that during execution of a derived class constructor, its vtable pointer is set to that of its parent class. We could maybe use a hidden member variable inside the derived class declaration macro whose own constructor could do something clever with querying the registry.

Copy link
Contributor

@lifflander lifflander left a comment

Choose a reason for hiding this comment

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

This looks good to me. We could do this in two steps starting with this to remove one of the parameters. We will need to time this with an update to EMPIRE when we merge this.

@PhilMiller
Copy link
Member Author

Both modified macros are under new names, with the old names that take the existing arguments kept for backwards compatibility. So, we can merge into EMPIRE whenever, update it at leisure, and then drop out the old ones.

@PhilMiller
Copy link
Member Author

Also, I went looking and saw that until vt#1013, nothing there uses the virtual serialization machinery at all.

@PhilMiller
Copy link
Member Author

So, if we adopt this sooner rather than later, footprinting code can just use the new form from day one.

Anyway, given you're happy with this, I'll do the clean-up on formatting and whatnot, and we can merge this.

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.

Virtual serialization: Eliminate need to name self class in macro arguments
2 participants