You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> methodinstance(foo, (Vector{Int},)) # we haven't called it yet, so it's not compiled
55
-
MethodInstance for foo(::Vector{Int64})
55
+
56
56
57
57
julia> foo([1,2])
58
58
1
@@ -82,7 +82,7 @@ We checked that the length was 2, rather than 1, because the first parameter is
82
82
83
83
```jldoctest findfirst
84
84
julia> mis[1].specTypes
85
-
Tuple{typeof(findfirst),BitVector}
85
+
Tuple{typeof(findfirst),BitVector}
86
86
```
87
87
88
88
There's also a convenience shortcut:
@@ -97,10 +97,13 @@ Let's see all the compiled instances of `Base.setdiff` and their immediate calle
97
97
98
98
```jldoctest; setup=(using MethodAnalysis)
99
99
julia> direct_backedges(setdiff)
100
-
3-element Vector{Any}:
101
-
MethodInstance for setdiff(::Base.KeySet{Any,Dict{Any,Any}}, ::Base.KeySet{Any,Dict{Any,Any}}) => MethodInstance for keymap_merge(::Dict{Char,Any}, ::Dict{Any,Any})
102
-
MethodInstance for setdiff(::Base.KeySet{Any,Dict{Any,Any}}, ::Base.KeySet{Any,Dict{Any,Any}}) => MethodInstance for keymap_merge(::Any, ::Dict{Any,Any})
103
-
MethodInstance for setdiff(::Vector{Base.UUID}, ::Vector{Base.UUID}) => MethodInstance for deps_graph(::Pkg.Types.Context, ::Dict{Base.UUID,String}, ::Dict{Base.UUID,Pkg.Types.VersionSpec}, ::Dict{Base.UUID,Pkg.Resolve.Fixed})
100
+
6-element Vector{Any}:
101
+
MethodInstance for setdiff(::Base.KeySet{Any, Dict{Any, Any}}, ::Base.KeySet{Any, Dict{Any, Any}}) => MethodInstance for keymap_merge(::Dict{Char, Any}, ::Dict{Any, Any})
102
+
MethodInstance for setdiff(::Base.KeySet{Any, Dict{Any, Any}}, ::Base.KeySet{Any, Dict{Any, Any}}) => MethodInstance for keymap_merge(::Dict{Char, Any}, ::Union{Dict{Any, Any}, Dict{Char, Any}})
103
+
MethodInstance for setdiff(::Base.KeySet{Char, Dict{Char, Any}}, ::Base.KeySet{Any, Dict{Any, Any}}) => MethodInstance for keymap_merge(::Dict{Char, Any}, ::Union{Dict{Any, Any}, Dict{Char, Any}})
104
+
MethodInstance for setdiff(::Base.KeySet{Any, Dict{Any, Any}}, ::Base.KeySet{Char, Dict{Char, Any}}) => MethodInstance for keymap_merge(::Dict{Char, Any}, ::Union{Dict{Any, Any}, Dict{Char, Any}})
105
+
MethodInstance for setdiff(::Base.KeySet{Char, Dict{Char, Any}}, ::Base.KeySet{Char, Dict{Char, Any}}) => MethodInstance for keymap_merge(::Dict{Char, Any}, ::Union{Dict{Any, Any}, Dict{Char, Any}})
106
+
MethodInstance for setdiff(::Vector{Base.UUID}, ::Vector{Base.UUID}) => MethodInstance for deps_graph(::Pkg.Types.Context, ::Dict{Base.UUID, String}, ::Dict{Base.UUID, Pkg.Types.VersionSpec}, ::Dict{Base.UUID, Pkg.Resolve.Fixed})
104
107
```
105
108
106
109
### Printing backedges as a tree
@@ -114,9 +117,12 @@ MethodInstance for findfirst(::BitVector)
114
117
julia> MethodAnalysis.print_tree(mi)
115
118
MethodInstance for findfirst(::BitVector)
116
119
├─ MethodInstance for prune_graph!(::Graph)
117
-
│ └─ MethodInstance for #simplify_graph!#111(::Bool, ::typeof(simplify_graph!), ::Graph, ::Set{Int64})
120
+
│ └─ MethodInstance for var"#simplify_graph!#111"(::Bool, ::typeof(simplify_graph!), ::Graph, ::Set{Int64})
118
121
│ └─ MethodInstance for simplify_graph!(::Graph, ::Set{Int64})
119
122
│ └─ MethodInstance for simplify_graph!(::Graph)
123
+
│ ├─ MethodInstance for trigger_failure!(::Graph, ::Vector{Int64}, ::Tuple{Int64, Int64})
124
+
│ │ ⋮
125
+
│ │
120
126
│ └─ MethodInstance for resolve_versions!(::Context, ::Vector{PackageSpec})
121
127
│ ⋮
122
128
│
@@ -136,7 +142,7 @@ MethodInstance for findfirst(::BitVector)
136
142
│
137
143
└─ MethodInstance for maxsum(::Graph)
138
144
└─ MethodInstance for resolve(::Graph)
139
-
├─ MethodInstance for trigger_failure!(::Graph, ::Vector{Int64}, ::Tuple{Int64,Int64})
145
+
├─ MethodInstance for trigger_failure!(::Graph, ::Vector{Int64}, ::Tuple{Int64,Int64})
140
146
│ ⋮
141
147
│
142
148
└─ MethodInstance for resolve_versions!(::Context, ::Vector{PackageSpec})
0 commit comments