Skip to content

Commit b3f081a

Browse files
authored
Merge pull request #14 from timholy/teh/fixpath
Try harder to find the true path of a method
2 parents 2880ce0 + 038f404 commit b3f081a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/CodeTracking.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ is the first line of the method's body.
3030
"""
3131
function whereis(method::Method)
3232
lin = get(method_info, method.sig, nothing)
33+
if lin === nothing
34+
f = method_lookup_callback[]
35+
if f !== nothing
36+
Base.invokelatest(f, method)
37+
end
38+
lin = get(method_info, method.sig, nothing)
39+
end
3340
if lin === nothing
3441
file, line = String(method.file), method.line
3542
else
@@ -194,4 +201,8 @@ were loaded to define the package that defined `mod`.
194201
"""
195202
pkgfiles(mod::Module) = pkgfiles(PkgId(mod))
196203

204+
if ccall(:jl_generating_output, Cint, ()) == 1
205+
precompile(Tuple{typeof(setindex!), Dict{PkgId,PkgFiles}, PkgFiles, PkgId})
206+
end
207+
197208
end # module

0 commit comments

Comments
 (0)