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

compact encoding of union variants #87

Open
soc opened this issue Oct 4, 2023 · 0 comments
Open

compact encoding of union variants #87

soc opened this issue Oct 4, 2023 · 0 comments

Comments

@soc
Copy link
Collaborator

soc commented Oct 4, 2023

Make unions more space-efficient after #8 is implemented, ideally avoiding the need for additional space to store bits that denote the variant of a union value.

For class-based unions:

  • consider the lower bits of the reference itself
  • figure out what to do with union variants that are themselves unions

For value-based unions:

  • employ niche-oriented encoding
  • investigate passing variant info out-of-band (status flags (Swift appears doing something like that), additional reg, ...)

For mixed unions:

  • figure out what the actual rules and requirements are
@soc soc added this to the 1.0 – polishing milestone Oct 4, 2023
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

No branches or pull requests

1 participant