Skip to content
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

reflection: use CC.findall instead of _methods_by_ftype #54212

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Conversation

aviatesk
Copy link
Sponsor Member

Some of reflection functions use _methods_by_ftype, which doesn't account for the overlay method table, leading to the issues reported in #54189.
With this commit, these problems are addressed by switching these reflection functions to use CC.findall, aligning them with the other ones.

Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

Sgtm

base/reflection.jl Outdated Show resolved Hide resolved
base/reflection.jl Outdated Show resolved Hide resolved
base/reflection.jl Outdated Show resolved Hide resolved
base/reflection.jl Outdated Show resolved Hide resolved
@vchuravy
Copy link
Sponsor Member

Other locations to look at

By looking for _methods_by_ftype usage in a function that also takes interp

Some of reflection functions use `_methods_by_ftype`, which doesn't
account for the overlay method table, leading to the issues reported
in #54189.
With this commit, these problems are addressed by switching these
reflection functions to use `CC.findall`, aligning them with the other
ones.

- closes #54189
@aviatesk
Copy link
Sponsor Member Author

Core.Compiler._return_type is very internal to Core.Compiler and is currently supposed to be used by NativeInterpreter only, so I left it as is.

@vchuravy
Copy link
Sponsor Member

Core.Compiler._return_type is very internal to Core.Compiler and is currently supposed to be used by NativeInterpreter only, so I left it as is.

Should the signature reflect that? E.g. AbstractInterpreter to NativeInterpreter?

@aviatesk aviatesk merged commit bff57fc into master Apr 25, 2024
4 of 7 checks passed
@aviatesk aviatesk deleted the avi/54189 branch April 25, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OverlayMethodTables "top-level" inference
4 participants