-
Notifications
You must be signed in to change notification settings - Fork 452
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
Fixes for issues #355 and #356 #367
Conversation
This change could become somewhat less intrusive if we still allowed parentheses after table declarations.
If there can never be table arguments, why have the parentheses? |
I see that most of our existing examples use |
Yes, and that's why there are so many changed files. |
Overall looks fine, though it causes some issues with overeager copy introduction in our backend, so it may be a bit before I can merge it. |
There are potentially more copied introduced for P4-14 programs, but there should be fewer copies introduced for P4-16 programs. The only change in copy introductions is in sideEffects, where I was never introducing any copies for P4-14 programs, and now I am doing a relatively crude alias analysis. If the crude alias analysis is the problem we can enhance that. Can you produce a test case that exhibits the undesired behavior? Unfortunately I have not used a branch, so I am having now difficulties to create other PR which do not depend on this one. I have one queued for issue #364... |
…e is present to validate json
…m the language and the associated tests
passes.push_back(new TypeChecking(refMap, typeMap)); | ||
passes.push_back(new DoSimplifyExpressions(refMap, typeMap)); | ||
SideEffectOrdering(ReferenceMap* refMap, TypeMap* typeMap, bool skipSideEffectOrdering) { | ||
if (!skipSideEffectOrdering) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done it this way to preserve the pass numbering, used by the testing scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary, as p4test always runs with this flag false, and changing it would change the outputs anyways.
passes.push_back(new TypeChecking(refMap, typeMap)); | ||
passes.push_back(new DoSimplifyExpressions(refMap, typeMap)); | ||
SideEffectOrdering(ReferenceMap* refMap, TypeMap* typeMap, bool skipSideEffectOrdering) { | ||
if (!skipSideEffectOrdering) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary, as p4test always runs with this flag false, and changing it would change the outputs anyways.
This started as a normal attempt to fix some reported bugs; in the process it has ballooned to a complicated PR, because while testing more bugs were found and fixed. Unfortunately it is not easy to break down this PR into multiple smaller ones, because it would be quite difficult to make the tests run correctly in the intermediate stages; you will notice that there are not that many code changes, but there are lots of reference output changes.
Here is a list of the actual modifications made in this PR:
lookahead<T>()
intolookahead<sizeof(T)>
followed by a sequence of Slices; this is pass ExpandLookahead