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

Add MethodInstance subtyping #27

Merged
merged 3 commits into from
Feb 2, 2022
Merged

Add MethodInstance subtyping #27

merged 3 commits into from
Feb 2, 2022

Conversation

timholy
Copy link
Owner

@timholy timholy commented Feb 2, 2022

Demo:

julia> methodinstances(convert, (Type{Bool}, Real))
2-element Vector{Core.MethodInstance}:
 MethodInstance for convert(::Type{Bool}, ::Bool)
 MethodInstance for convert(::Type{Bool}, ::Int64)

Demo:

```
julia> methodinstances(convert, (Type{Bool}, Real))
2-element Vector{Core.MethodInstance}:
 MethodInstance for convert(::Type{Bool}, ::Bool)
 MethodInstance for convert(::Type{Bool}, ::Int64)
```
@codecov
Copy link

codecov bot commented Feb 2, 2022

Codecov Report

Merging #27 (4839d35) into master (899ae12) will decrease coverage by 0.14%.
The diff coverage is 94.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   94.11%   93.97%   -0.15%     
==========================================
  Files           4        4              
  Lines         306      332      +26     
==========================================
+ Hits          288      312      +24     
- Misses         18       20       +2     
Impacted Files Coverage Δ
src/MethodAnalysis.jl 94.54% <94.73%> (-1.20%) ⬇️
src/visit.jl 91.37% <0.00%> (-1.08%) ⬇️
src/backedges.jl 100.00% <0.00%> (ø)
src/findcallers.jl 93.57% <0.00%> (+1.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 899ae12...4839d35. Read the comment docs.

As often happens, this discovered a bug on some Julia versions.
@timholy timholy merged commit 9cc926b into master Feb 2, 2022
@timholy timholy deleted the teh/multi_mis branch February 2, 2022 11:50
timholy added a commit to timholy/SnoopCompile.jl that referenced this pull request Feb 15, 2022
Formerly this seemed to return a single MethodInstance, but now it
returns two. The change is may be from improvements to MethodAnalysis,
likely timholy/MethodAnalysis.jl#27.
The new behavior is certainly the correct one (there are two distinct
methods, so there had better be two MethodInstances with that
signature---even though one will never get another CodeInstance).
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.

1 participant