Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ Like `which` except it operates on the complete tuple-type `tt`.
"""
function whichtt(@nospecialize(tt))
# TODO: provide explicit control over world age? In case we ever need to call "old" methods.
m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, get_world_counter())
@static if VERSION ≥ v"1.9.0-DEV.149"
# branch on https://github.com/JuliaLang/julia/pull/44448
# for now, actual code execution doesn't ever need to consider overlayed method table
m = ccall(:jl_gf_invoke_lookup, Any, (Any, Any, UInt), tt, nothing, get_world_counter())
else
m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, get_world_counter())
end
m === nothing && return nothing
isa(m, Method) && return m
return m.func::Method
Expand Down