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
11 changes: 11 additions & 0 deletions src/CodeTracking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ is the first line of the method's body.
"""
function whereis(method::Method)
lin = get(method_info, method.sig, nothing)
if lin === nothing
f = method_lookup_callback[]
if f !== nothing
Base.invokelatest(f, method)
end
lin = get(method_info, method.sig, nothing)
end
if lin === nothing
file, line = String(method.file), method.line
else
Expand Down Expand Up @@ -194,4 +201,8 @@ were loaded to define the package that defined `mod`.
"""
pkgfiles(mod::Module) = pkgfiles(PkgId(mod))

if ccall(:jl_generating_output, Cint, ()) == 1
precompile(Tuple{typeof(setindex!), Dict{PkgId,PkgFiles}, PkgFiles, PkgId})
end

end # module