Skip to content

Commit

Permalink
update with #44448 (#521)
Browse files Browse the repository at this point in the history
Now `jl_gf_invoke_lookup` accepts an optional overlayed method table,
but actual code execution (as done by JuliaInterpreter) doesn't need to
care about it at this moment.
  • Loading branch information
aviatesk authored Mar 7, 2022
1 parent 6ed0a81 commit 1a92d9a
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 1a92d9a

Please sign in to comment.