-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #10573: Devirtualize member selection when matching #10576
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
Conversation
test performance with #quotes please |
performance test scheduled: 4 job(s) in queue, 1 running. |
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.
Otherwise, LGTM
|
||
devirtualizedScrutinee == pattern | ||
|| summon[Env].get(devirtualizedScrutinee).contains(pattern) | ||
|| devirtualizedScrutinee.allOverriddenSymbols.contains(pattern) |
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.
The documentation of the method needs to be updated. The following code might be faster:
scrutinee.overridingSymbol(pattern.owner) == pattern
|| pattern.overridingSymbol(scrutinee.owner) == scrutinee
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.
Will try that. The current performance is unaccepable.
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.
overridingSymbol
worked, but not there.
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.
If the check is whether the two symbols override each other, can we simply replace the body of the method with the following:
scrutinee.overridingSymbol(pattern.owner) == pattern
|| pattern.overridingSymbol(scrutinee.owner) == scrutinee
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 version had some false positives involving modules.
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/10576/ to see the changes. Benchmarks is based on merging with master (90f44d4) |
7b15934
to
96d5073
Compare
test performance with #quotes please |
performance test scheduled: 6 job(s) in queue, 0 running. |
test performance with #quotes please |
performance test scheduled: 11 job(s) in queue, 0 running. |
@liufengyun the benchmarks might be stuck |
Yes, I stopped it, I am investigating the latest failures. |
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/10576/ to see the changes. Benchmarks is based on merging with master (bbdbdf2) |
Now performance is fine |
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.
The document for symbolMatch
needs to be updated. Otherwise, LGTM
No description provided.