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

Add a FacetValue instruction #4545

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Nov 16, 2024

The new FacetValue instruction represents C as I for some type C and facet type I. It is named FacetValue instead of just Facet to parallel the FacetType instruction.

This PR is limited by the fact that there is no current way to construct concrete facet values in the toolchain. These will be used in the future, though to support things like:

  • C as I where C is a class; and
  • forming a specific for a generic with a T:! I parameter where T has a concrete value.

(Here I is an interface or other non-type facet type.)

Also do some renaming and add some comments to make things a bit more clear.

  • FacetTypeAccess -> FacetAccessType to clarify this is not access of a facet type, but access of the type of a facet
  • .facet_id -> .facet_value_inst_id to parallel the FacetValue instruction

FacetAccessWitness will be in a future PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant