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

Clean direct ccalls to jl_specializations_get_linfo #39490

Merged
merged 1 commit into from
Feb 3, 2021
Merged

Clean direct ccalls to jl_specializations_get_linfo #39490

merged 1 commit into from
Feb 3, 2021

Conversation

Keno
Copy link
Member

@Keno Keno commented Feb 2, 2021

Many of these were using an incorrect (outdated) signature for this ccall.
We now wrap this method in Core.Compiler.specialize_method, so
clean up all the places that were using it directly.

@@ -148,12 +148,8 @@ function _dump_function(@nospecialize(f), @nospecialize(t), native::Bool, wrappe
end
# get the MethodInstance for the method match
world = typemax(UInt)
meth = which(f, t)
Copy link
Sponsor Member

@vtjnash vtjnash Feb 2, 2021

Choose a reason for hiding this comment

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

This isn't quite the same query, as this was subtyping (aka invoke), while the other is type-intersection:

julia> which(+, (Integer, Integer))
+(a::Integer, b::Integer) in Base at int.jl:921

julia> methods(+, (Integer, Integer))
# 8 methods for generic function "+":
[1] +(x::T, y::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} in Base at int.jl:87
[2] +(c::Union{UInt16, UInt32, UInt64, UInt8}, x::BigInt) in Base.GMP at gmp.jl:528
[3] +(c::Union{Int16, Int32, Int64, Int8}, x::BigInt) in Base.GMP at gmp.jl:534
[4] +(x::BigInt, y::BigInt) in Base.GMP at gmp.jl:479
[5] +(x::BigInt, c::Union{UInt16, UInt32, UInt64, UInt8}) in Base.GMP at gmp.jl:527
[6] +(x::BigInt, c::Union{Int16, Int32, Int64, Int8}) in Base.GMP at gmp.jl:533
[7] +(x::Bool, y::Bool) in Base at bool.jl:92
[8] +(a::Integer, b::Integer) in Base at int.jl:921

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

Many of these were using an incorrect (outdated) signature for this ccall.
We now wrap this method in Core.Compiler.specialize_method, so
clean up all the places that were using it directly.
@Keno Keno merged commit 7b19e09 into master Feb 3, 2021
@Keno Keno deleted the kf/jlsgl branch February 3, 2021 23:43
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
Many of these were using an incorrect (outdated) signature for this ccall.
We now wrap this method in Core.Compiler.specialize_method, so
clean up all the places that were using it directly.
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
Many of these were using an incorrect (outdated) signature for this ccall.
We now wrap this method in Core.Compiler.specialize_method, so
clean up all the places that were using it directly.
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.

2 participants