Conversation
asgerf
force-pushed
the
unified/binary-expr-assignment
branch
2 times, most recently
from
September 17, 2026 11:16
769cc55 to
ee8bcd7
Compare
There are some spurious flows explained by the added TODO comment.
asgerf
force-pushed
the
unified/binary-expr-assignment
branch
from
September 17, 2026 11:33
8feb94d to
e167281
Compare
asgerf
marked this pull request as ready for review
September 17, 2026 11:38
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performs some cross-cutting changes to assignments, ultimately improving data flow:
BinaryExprin the raw AST schema.AssignExprandCompoundAssignExpremulate the original AST nodes on the QL side.BinaryExpr.The last point is perhaps worth elaborating on. Most languages have a known issue with false flow in this case
where the post-update for
xon the left-hand side flows into thexon the right-hand side. This fixes the issue by inserting a synthetic read ofxafter the assignment and essentially using that as the post-update node.This does require a bit of follow-up work in case
xis re-assigned inside the RHS expression, but since Swift assignments are not expressions, this can't happen in Swift, and we can't even write a test case for it. But the fix would be to block the post-update node if the two reads don't have the same SSA definition.