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 support for enum & serializable enum types #65

Merged
merged 3 commits into from
Feb 24, 2025
Merged

Add support for enum & serializable enum types #65

merged 3 commits into from
Feb 24, 2025

Conversation

asl
Copy link
Collaborator

@asl asl commented Feb 11, 2025

No description provided.

@asl asl requested a review from qobilidop February 11, 2025 23:47
This was linked to issues Feb 11, 2025
@asl asl force-pushed the mlir-enum branch 2 times, most recently from b07eaf9 to a21c356 Compare February 12, 2025 02:57
@asl asl requested a review from fruffy February 18, 2025 21:17
Base automatically changed from mlir-struct to main February 23, 2025 23:52
asl added 2 commits February 23, 2025 15:54
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
let summary = "serializable enum type";
let description = [{
Represents an enumeration of values backed by some integer value
!p4hir.ser.enum<"name", !p4hir.bit<32>, Case1 : 42, Case2 : 0>
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This could be discussed later (not blocking merging of this PR). Personally I'd prefer !p4hir.ser_enum over !p4hir.ser.enum.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, right. Let's rename it right now, so we won't need to update lots of tests later on :)

Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
@asl asl enabled auto-merge (squash) February 24, 2025 00:19
@asl asl merged commit 08697ad into main Feb 24, 2025
2 checks passed
@asl asl deleted the mlir-enum branch February 24, 2025 00:22
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.

Add serializable enum type Add ordinary enum type Implement enum type
2 participants