jli  Linuxx86_641.10.3v1.10.30b4590a5507d3f3046e5bafc007cacbbfc9b310bryyTricksOIMK Au7{qmcg3/6V./opt/julia/packages/Tricks/ZwtB2/src/Tricks.jl7AUCoremуJ5Basemу]J5MainmуJ5ArgToolsBń x(mуF K5 Artifactsmr-V3|mу K5Base64UlD*_mу> K5CRC32c\y.jmуj K5 FileWatchingXzsy`{,zmуh& K5LibdluVW59˗,mу-" K5LoggingT{VhUXM=mуrU" K5MmapP~:xg,Omу|' K5NetworkOptionsC0YW,mуʠ, K5SHAQ<$!<%mу1 K5 Serialization [)*k1mу-G K5Sockets1V$ bdސݗmуYBY K5UnicodeP>I>Nrmуeszo K5 LinearAlgebraSm7̏mуuux K5 OpenBLAS_jll[(Śb6EcQ FmуDux K5libblastrampoline_jllLSۆ }lxӠmу^} K5MarkdownZPn7z`smу/Ed~ K5Printfg^cX׸QDmу;h K5Random_ɢ?\Ymу? K5TarOi>աmу!t, K5DatesEY8pj2 mуX K5FuturebS;3{I xVMmуsD K5InteractiveUtilsWL ~@'ZmуVg K5LibGit2Z[&RPTv3EКRmу8J K5 LibGit2_jll YXg}]$mуD K5 MbedTLS_jllAX 3ȡ_mу- K5 LibSSH2_jlloTZk)߆= v"1.10.0-DEV.609" # Feature is now part of julia itself hasmethod else _static_hasmethod end function create_codeinfo_with_returnvalue(argnames, spnames, sp, value) expr = Expr(:lambda, argnames, Expr(Symbol("scope-block"), Expr(:block, Expr(:return, value), ) ) ) if spnames !== nothing expr = Expr(Symbol("with-static-parameters"), expr, spnames...) end ci = ccall(:jl_expand, Any, (Any, Any), expr, @__MODULE__) return ci end """ static_methods(f, [type_tuple::Type{<:Tuple]) static_methods(@nospecialize(f)) = _static_methods(Main, f, Tuple{Vararg{Any}}) Like `methods` but runs at compile-time (and does not accept a worldage argument). """ static_methods(@nospecialize(f)) = static_methods(f, Tuple{Vararg{Any}}) if VERSION >= v"1.10.0-DEV.609" function __static_methods(world, source, T, self, f, _T) list_of_methods = _methods(f, T, nothing, world) ci = create_codeinfo_with_returnvalue([Symbol("#self#"), :f, :_T], [:T], (:T,), :($list_of_methods)) # Now we add the edges so if a method is defined this recompiles ci.edges = _method_table_all_edges_all_methods(f, T, world) return ci end @eval function static_methods(@nospecialize(f) , @nospecialize(_T::Type{T})) where {T <: Tuple} $(Expr(:meta, :generated, __static_methods)) $(Expr(:meta, :generated_only)) end else @generated function static_methods(@nospecialize(f) , @nospecialize(_T::Type{T})) where {T <: Tuple} world = typemax(UInt) list_of_methods = _methods(f, T, nothing, world) ci = create_codeinfo_with_returnvalue([Symbol("#self#"), :f, :_T], [:T], (:T,), :($list_of_methods)) # Now we add the edges so if a method is defined this recompiles ci.edges = _method_table_all_edges_all_methods(f, T, world) return ci end end function _method_table_all_edges_all_methods(f, T, world = Base.get_world_counter()) mt = f.name.mt # We add an edge to the MethodTable itself so that when any new methods # are defined, it recompiles the function. mt_edges = Core.Compiler.vect(mt, Tuple{Vararg{Any}}) # We want to add an edge to _every existing method instance_, so that # the deletion of any one of them will trigger recompilation of the function. method_insts = _method_instances(f, T, world) covering_method_insts = method_insts return vcat(mt_edges, covering_method_insts) end """ static_method_count(f, [type_tuple::Type{<:Tuple]) static_method_count(@nospecialize(f)) = _static_methods(Main, f, Tuple{Vararg{Any}}) Returns `length(methods(f, tt))` but runs at compile-time (and does not accept a worldage argument). """ static_method_count(@nospecialize(f)) = static_method_count(f, Tuple{Vararg{Any}}) if VERSION >= v"1.10.0-DEV.609" function __static_method_count(world, source, T, self, f, _T) method_count = length(_methods(f, T, nothing, world)) ci = create_codeinfo_with_returnvalue([Symbol("#self#"), :f, :_T], [:T], (:T,), :($method_count)) # Now we add the edges so if a method is defined this recompiles ci.edges = _method_table_all_edges_all_methods(f, T, world) return ci end @eval function static_method_count(@nospecialize(f) , @nospecialize(_T::Type{T})) where {T <: Tuple} $(Expr(:meta, :generated, __static_method_count)) $(Expr(:meta, :generated_only)) end else @generated function static_method_count(@nospecialize(f) , @nospecialize(_T::Type{T})) where {T <: Tuple} world = typemax(UInt) method_count = length(_methods(f, T, nothing, world)) ci = create_codeinfo_with_returnvalue([Symbol("#self#"), :f, :_T], [:T], (:T,), :($method_count)) # Now we add the edges so if a method is defined this recompiles ci.edges = _method_table_all_edges_all_methods(f, T, world) return ci end end @static if VERSION < v"1.3" const compat_hasmethod = hasmethod else const compat_hasmethod = static_hasmethod end Base.@pure static_fieldnames(t::Type) = Base.fieldnames(t) Base.@pure static_fieldtypes(t::Type) = Base.fieldtypes(t) Base.@pure static_fieldcount(t::Type) = Base.fieldcount(t) # The below methods are copied and adapted from Julia Base: # - https://github.com/JuliaLang/julia/blob/4931faa34a8a1c98b39fb52ed4eb277729120128/base/reflection.jl#L952-L966 # - https://github.com/JuliaLang/julia/blob/4931faa34a8a1c98b39fb52ed4eb277729120128/base/reflection.jl#L893-L896 # - https://github.com/JuliaLang/julia/blob/4931faa34a8a1c98b39fb52ed4eb277729120128/base/reflection.jl#L1047-L1055 # Like Base.methods, but accepts f as a _type_ instead of an instance. function _methods(@nospecialize(f_type), @nospecialize(t_type), mod::Union{Tuple{Module},AbstractArray{Module},Nothing}=nothing, world = Base.get_world_counter()) tt = _combine_signature_type(f_type, t_type) lim = -1 mft = Core.Compiler._methods_by_ftype(tt, lim, world) if mft === nothing ms = Base.Method[] else ms = Base.Method[_get_method(m) for m in mft if (mod === nothing || m.method.module ∈ mod)] end return Base.MethodList(ms, f_type.name.mt) end # Like Core.Compiler.method_instances, but accepts f as a _type_ instead of an instance. function _method_instances(@nospecialize(f_type), @nospecialize(t_type), world = Base.get_world_counter()) tt = _combine_signature_type(f_type, t_type) lim = -1 mft = Core.Compiler._methods_by_ftype(tt, lim, world) if mft === nothing return Core.MethodInstance[] else return Core.MethodInstance[_specialize_method(match) for match in mft] end end # Like Base.signature_type, but starts with a type for f_type already. function _combine_signature_type(@nospecialize(f_type::Type), @nospecialize(args::Type)) u = unwrap_unionall(args) return rewrap_unionall(Tuple{f_type, u.parameters...}, args) end # MethodMatch is only defined in v1.6+, so the values returned from _methods_by_ftype need # a bit of massaging here. if VERSION < v"1.6" # _methods_by_ftype returns a triple _get_method((mtypes, msp, method)) = method # Core.Compiler.specialize_method(::MethodMatch) is only defined on v1.6+ function _specialize_method(method_data) mtypes, msp, m = method_data instance = ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, (Any, Any, Any), m, mtypes, msp) return instance end else # _methods_by_ftype returns a MethodMatch _get_method(method_match) = method_match.method _specialize_method = Core.Compiler.specialize_method end end # module ᦏ0U?h