Skip to content

Commit 1a92d9a

Browse files
authored
update with #44448 (#521)
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.
1 parent 6ed0a81 commit 1a92d9a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/utils.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ Like `which` except it operates on the complete tuple-type `tt`.
3232
"""
3333
function whichtt(@nospecialize(tt))
3434
# TODO: provide explicit control over world age? In case we ever need to call "old" methods.
35-
m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, get_world_counter())
35+
@static if VERSION v"1.9.0-DEV.149"
36+
# branch on https://github.com/JuliaLang/julia/pull/44448
37+
# for now, actual code execution doesn't ever need to consider overlayed method table
38+
m = ccall(:jl_gf_invoke_lookup, Any, (Any, Any, UInt), tt, nothing, get_world_counter())
39+
else
40+
m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, get_world_counter())
41+
end
3642
m === nothing && return nothing
3743
isa(m, Method) && return m
3844
return m.func::Method

0 commit comments

Comments
 (0)