Skip to content

Overlay: Mark RefType.getAStrictAncestor overlay[caller?] #19968

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

kaspersv
Copy link
Contributor

@kaspersv kaspersv commented Jul 3, 2025

This PR marks RefType.getAStrictAncestor overlay[caller?] to ensure that queries that rely on magic to bound getAStrictAncestor can still execute efficiently with overlay compilation enabled.

Queries that rely on magic to ensure efficient bounding of getAStrictAncestor includes java/useless-type-test, java/useless-upcast, java/missing-super-finalize, java/non-final-call-in-constructor, java/incorrect-serial-version-uid, java/non-serializable-field, java/unreachable-catch-clause, java/non-static-nested-class, java/lock-order-inconsistency, java/magic-string, java/confusing-override-name. Without magic bounds, these queries regress significantly for the palatable__lambda DCA test case.

The regressions can also be fixed on the query side by adding suitable overlay[local?] annotations, but given the number of affected queries, it seems likely that custom queries that use getAStrictAncestor would also regress with a solution based on query-side annotations.

Overlay compilation is currently disabled for Java and the annotations therefore have no effect on compilation or evaluation at the moment.

@github-actions github-actions bot added the Java label Jul 3, 2025
@kaspersv kaspersv requested a review from ginsbach July 4, 2025 06:58
@kaspersv kaspersv marked this pull request as ready for review July 4, 2025 06:59
@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 06:59
@kaspersv kaspersv requested a review from a team as a code owner July 4, 2025 06:59
@kaspersv kaspersv added the no-change-note-required This PR does not need a change note label Jul 4, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kaspersv kaspersv merged commit 785e027 into github:main Jul 4, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants