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

[P4Testgen] Resolve array indices in the interpreter instead of converting them in a compiler pass. #4024

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

fruffy-bfn
Copy link
Contributor

@fruffy-bfn fruffy-bfn commented Jun 9, 2023

This PR adds support for ArrayIndices within P4Testgen. We extend the compare function of state variables to also support indices and add an additional visitor function.

With this change, we can remove some of the conversion passes that caused the P4 IR to not type check after the mid end.

@fruffy-bfn fruffy-bfn force-pushed the fruffy/accept_arrayindex branch 2 times, most recently from 30a91e2 to 670df2c Compare June 9, 2023 16:41
@fruffy-bfn fruffy-bfn changed the title Resolve array indices in the interpreter instead of converting them in a compiler pass. [P4Testgen] Resolve array indices in the interpreter instead of converting them in a compiler pass. Jun 9, 2023
@fruffy-bfn fruffy-bfn force-pushed the fruffy/accept_arrayindex branch 3 times, most recently from 8bb18f1 to b54885d Compare June 9, 2023 17:41
@fruffy fruffy added the p4tools Topics related to the P4Tools back end label Jun 9, 2023
@fruffy-bfn fruffy-bfn marked this pull request as ready for review June 13, 2023 16:51
Copy link
Contributor

@jnfoster jnfoster left a comment

Choose a reason for hiding this comment

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

LGTM

@fruffy fruffy merged commit dff9347 into p4lang:main Jun 13, 2023
@fruffy-bfn fruffy-bfn deleted the fruffy/accept_arrayindex branch June 19, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4tools Topics related to the P4Tools back end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants