-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SSA: Replace the Guards interface in the SSA data flow integration. #18934
Conversation
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.
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
Dca is completely uneventful. |
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.
One minor suggestion, otherwise LGTM.
@@ -421,7 +421,7 @@ import Cached | |||
* | |||
* Only intended for internal use. | |||
*/ | |||
class DefinitionExt extends Impl::DefinitionExt { | |||
deprecated class DefinitionExt extends Impl::DefinitionExt { |
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.
Since these are inside an internal
folder, and has the Only intended for internal use
comment, it should be fine to simply delete.
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.
They're actually used in a couple of deprecated predicates that ultimately end up in the public getALastRead
member predicate on Definition
in the outwards-facing SSA.qll
, so it's less clear cut. That's why I left them in for now.
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.
We can make it private, though, and possibly push in enough casts from DefinitionExt
to Definition
that we might be able to eliminate it. Let me check.
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.
Right. All the uses of DefinitionExt
here were actually in contexts for which we could push a context with a cast to Definition
. So I'll be able to delete this. Commit incoming.
One small cleanup commit for Ruby, and then the primary commit, which updates the Guards-related part of the SSA data flow integration module interface. This should be equivalent, but removes the implicit assumption that guards coincide with the CFG node where the branching happens, this is e.g. false if we want to support indirect guards through a local boolean variable in the SSA interface.