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

Specify that value_set's size is compile-time known #1352

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

jaehyun1ee
Copy link
Contributor

Following the discussion #1347, this specifies that the size argument of a value_set must be a compile-time known value.

Although the spec already implies it by mentioning:

Parser Value Sets support a size argument to provide hints to the compiler to reserve hardware resources to implement the value set.

This revision makes it more explicit.

Signed-off-by: Jaehyun Lee <99jaehyunlee@gmail.com>
@vlstill vlstill self-requested a review January 13, 2025 21:34
@jafingerhut jafingerhut self-requested a review January 13, 2025 21:35
Copy link
Contributor

@vlstill vlstill left a comment

Choose a reason for hiding this comment

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

Looks good to me. I can't see a way in which this could be runtime defined.

Copy link
Collaborator

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

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

LGTM

@jafingerhut
Copy link
Collaborator

@jonathan-dilorenzo @rcgoodfellow We have two positive reviews on this change, and no verbal objections from LDWG meeting of 2025-Jan-13 from several others. Looks good to us for merging, but leaving it to one of your for final approval/merging.

@jonathan-dilorenzo
Copy link
Collaborator

LGTM! Merging, but should this also be mentioned in the compile-time known values section?

@jonathan-dilorenzo jonathan-dilorenzo merged commit cd94d75 into p4lang:main Jan 24, 2025
1 check passed
@jafingerhut
Copy link
Collaborator

LGTM! Merging, but should this also be mentioned in the compile-time known values section?

My belief is that the section on compile-time known values primarily lists what kinds of expression are compile-time known values, but does not attempt to enumerate where such values are required. Where they are required is sprinkled thorughout the document.

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.

4 participants