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

Always insert instantiation statement at the end of the local statement list #3962

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

qobilidop
Copy link
Member

This fixes #3955. Many test outputs need to be updated after this change.

@qobilidop
Copy link
Member Author

I used P4TEST_REPLACE=True make check to update all test outputs. I'm still in the process of manually reading and checking these changes.

@qobilidop
Copy link
Member Author

Ahh, I just see #821 that does the opposite change.

@mihaibudiu
Copy link
Contributor

I used P4TEST_REPLACE=True make check to update all test outputs. I'm still in the process of manually reading and checking these changes.

The gauntlet tool does some of that, by I am not sure whether it will check such early passes.
(It performs translation validation, making sure that the program at two specific program points has the same semantics.)

@fruffy
Copy link
Collaborator

fruffy commented Apr 4, 2023

The gauntlet tool does some of that, by I am not sure whether it will check such early passes.

Gauntlet checks all passes of the front and mid end of p4test. That also includes type checking etc. So the inlining pass is checked. We actually have an issue open for that #2470.

The only thing it relies on is the parser. An unfortunate side effect of this design is that Gauntlet is hard to maintain 😞.

@qobilidop
Copy link
Member Author

Just wonder if this PR needs more reviews or is it ready to be merged? I would appreciate it a lot if it could be merged soon, because I have some P4 code at work pending on this to compile. Thanks a lot for all reviewers' time!

@mihaibudiu mihaibudiu merged commit dbc4125 into p4lang:main Apr 10, 2023
@qobilidop qobilidop deleted the direct-call-inst-order branch April 10, 2023 21:35
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.

Problematic inline code ordering causes use before declaration error
3 participants