-
Notifications
You must be signed in to change notification settings - Fork 1.8k
C++: Use the shared type-tracking library for virtual dispatch resolution #20249
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c1b91db
C++: Add more virtual dispatch tests.
MathiasVP 42fcfca
C++: Remove the old virtual dispatch case from 'defaultViableCallable…
MathiasVP fdb9f7b
C++: Move these predicates to make the diff smaller.
MathiasVP caf7464
C++: Prefix with 'DataflowPrivate'.
MathiasVP d4188d5
C++: Instantiate the type tracking module inside a reusable module li…
MathiasVP 383799c
C++: Perform 6 rounds of virtual dispatch resolution like Java.
MathiasVP cca5bd9
C++: Update 'mayBenefitFromCallContext' to not use the old virtual di…
MathiasVP 302d35b
C++: Accept test changes.
MathiasVP 16508b1
C++: Fix off-by-one error in getType on 'FinalGlobalValue' nodes and …
MathiasVP 0631bd7
C++: Add object/flow conflation for unions when resolving function po…
MathiasVP 02bf923
C++: Add change note.
MathiasVP 70d3e69
C++: Rename 'lambda' to 'virtual'.
MathiasVP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
Why is this extra case needed?
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.
This is coming from 42fcfca
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.
defaultViableCallable
should also resolve function pointers.On
main
we essentially have one way of dealing with both function pointer resolution and virtual dispatch resolution. That's the line marked as// Virtual dispatch
here (which uses the old library that we're deleting in this PR). Then in #17788 we added another way of handling function pointer resolution.So on
main
we currently have one way of dealing with virtual functions, and two ways of dealing with function pointers (i.e., the// Virtual dispatch
way and the lambda flow one I added in #17788). Sadly, only one of those function pointer resolutions were exposed indefaultViableCallable
(the one marked as// Virtual dispatch
).This PR totally removes the old library that did both function pointer resolution and virtual dispatch, and instead we now only have one library for virtual dispatch, and one library for function pointers. So in order to continue to resolve function pointers in
defaultViableCallable
we now need to expose the lambda flow resolution since that's the canonical way we now resolve function pointer calls.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.
That's not helping me, as it basically reiterates what is written in the PR description. Might be most effective to have a brief call about this.
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.
Totally fair. Happy to have a chat about it tomorrow (or whenever it fits you)