Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Instability #160

Closed
skygering opened this issue Mar 9, 2023 · 2 comments · Fixed by #161
Closed

Type Instability #160

skygering opened this issue Mar 9, 2023 · 2 comments · Fixed by #161

Comments

@skygering
Copy link
Contributor

I have been checking over my code with JET.jl and I am finding some type instability with LibGEOS/GeoInterface.

For example,

using LibGEOS, JET
coords = [[0.0, 0.0], [0.0, 100.0], [100.0, 100.0], [100.0, 0.0], [0.0, 0.0]]
poly = LibGEOS.Polygon(coords)
@report_opt LibGEOS.GeoInterface.coordinates(poly)

returns a huge amount of warnings (see below).

The interesting thing is that this is not a problem for LinearRings, but I get the same issues with MultiPolygons.
I am getting around the issue for Polygons for now by using

LG.GeoInterface.coordinates(LG.exteriorRing(poly))

which does not cause warnings, and since I don't need to keep holes, isn't terrible for now.

However, this strategy fails on me with MultiPolygons since the following code also creates a lot of warnings:

 multipoly = LibGEOS.MultiPolygon([coords])
LibGEOS.getGeometries(multipoly)

So I can't apply my polygon strategy on each of the polygons in the multipolygon.

Warnings from LG.GeoInterface.coordinates:

┌ @ /Users/skylargering/.julia/packages/GeoInterface/246K4/src/interface.jl:622 GeoInterface.coordinates(trait(obj), obj)
│┌ @ /Users/skylargering/.julia/packages/GeoInterface/246K4/src/fallbacks.jl:104 Base.materialize(Base.broadcasted(GeoInterface.coordinates, getgeom(t, geom)))
││┌ @ broadcast.jl:860 Base.Broadcast.copy(Base.Broadcast.instantiate(bc))
│││┌ @ broadcast.jl:882 ElType = Base.Broadcast.combine_eltypes(bc.f, bc.args)
││││┌ @ broadcast.jl:717 Base.Broadcast.promote_typejoin_union(Base._return_type(f, Base.Broadcast.eltypes(args)))
│││││┌ @ promotion.jl:173 Base.promote_typejoin(Base.promote_typejoin_union(T.a), Base.promote_typejoin_union(T.b))
││││││┌ @ promotion.jl:162 c = typejoin(Base._promote_typesubtract(a), Base._promote_typesubtract(b))
│││││││┌ @ promotion.jl:25 typejoin(a.body, b)
││││││││┌ @ promotion.jl:27 typejoin(a, b.body)
│││││││││┌ @ promotion.jl:54 Base.unwrapva(%125)
││││││││││ runtime dispatch detected: Base.unwrapva(%125::Any)::Any
│││││││││└───────────────────
│││││││││┌ @ promotion.jl:64 Base.unwrapva(%195)
││││││││││ runtime dispatch detected: Base.unwrapva(%195::Any)::Any
│││││││││└───────────────────
│││││││││┌ @ promotion.jl:77 Base.unwrapva(%266)
││││││││││ runtime dispatch detected: Base.unwrapva(%266::Any)::Any
│││││││││└───────────────────
│││││││││┌ @ promotion.jl:77 Base.unwrapva(%285)
││││││││││ runtime dispatch detected: Base.unwrapva(%285::Any)::Any
│││││││││└───────────────────
│││││││││┌ @ promotion.jl:112 %453.var
││││││││││ runtime dispatch detected: (%453::Any).var::Any
│││││││││└────────────────────
│││││││││┌ @ promotion.jl:113 %453.body
││││││││││ runtime dispatch detected: (%453::Any).body::Any
│││││││││└────────────────────
│││││││││┌ @ promotion.jl:117 Base.UnionAll(%567, %569)
││││││││││ runtime dispatch detected: Base.UnionAll(%567::Any, %569::Any)::Any
│││││││││└────────────────────
││││││││┌ @ promotion.jl:44 Base.tailjoin(bp, 1)
│││││││││┌ @ promotion.jl:229 Base.unwrapva(%19)
││││││││││ runtime dispatch detected: Base.unwrapva(%19::Any)::Any
│││││││││└────────────────────
│││││││││┌ @ promotion.jl:233 Base.unwrapva(%73)
││││││││││ runtime dispatch detected: Base.unwrapva(%73::Any)::Any
│││││││││└────────────────────
││││││││┌ @ promotion.jl:54 Base.unwrapva(%120)
│││││││││ runtime dispatch detected: Base.unwrapva(%120::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:64 Base.unwrapva(%190)
│││││││││ runtime dispatch detected: Base.unwrapva(%190::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:77 Base.unwrapva(%261)
│││││││││ runtime dispatch detected: Base.unwrapva(%261::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:77 Base.unwrapva(%280)
│││││││││ runtime dispatch detected: Base.unwrapva(%280::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:112 %448.var
│││││││││ runtime dispatch detected: (%448::Any).var::Any
││││││││└────────────────────
││││││││┌ @ promotion.jl:113 %448.body
│││││││││ runtime dispatch detected: (%448::Any).body::Any
││││││││└────────────────────
││││││││┌ @ promotion.jl:117 Base.UnionAll(%562, %564)
│││││││││ runtime dispatch detected: Base.UnionAll(%562::Any, %564::Any)::Any
││││││││└────────────────────
│││││││┌ @ promotion.jl:54 Base.unwrapva(%115)
││││││││ runtime dispatch detected: Base.unwrapva(%115::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:64 Base.unwrapva(%185)
││││││││ runtime dispatch detected: Base.unwrapva(%185::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:77 Base.unwrapva(%256)
││││││││ runtime dispatch detected: Base.unwrapva(%256::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:77 Base.unwrapva(%275)
││││││││ runtime dispatch detected: Base.unwrapva(%275::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:112 %443.var
││││││││ runtime dispatch detected: (%443::Any).var::Any
│││││││└────────────────────
│││││││┌ @ promotion.jl:113 %443.body
││││││││ runtime dispatch detected: (%443::Any).body::Any
│││││││└────────────────────
│││││││┌ @ promotion.jl:117 Base.UnionAll(%557, %559)
││││││││ runtime dispatch detected: Base.UnionAll(%557::Any, %559::Any)::Any
│││││││└────────────────────
│││││┌ @ promotion.jl:193 unwrapva(%40)
││││││ runtime dispatch detected: unwrapva(%40::Any)::Any
│││││└────────────────────
│││││┌ @ promotion.jl:201 Base.promote_typejoin_union(%55)
││││││ runtime dispatch detected: Base.promote_typejoin_union(%55::Any)::Type
│││││└────────────────────
││││┌ @ broadcast.jl:717 Base.Broadcast.combine_eltypes(::typeof(GeoInterface.coordinates), ::Tuple{Vector{LibGEOS.LinearRing}})
│││││ failed to optimize due to recursion: Base.Broadcast.combine_eltypes(::typeof(GeoInterface.coordinates), ::Tuple{Vector{LibGEOS.LinearRing}})
││││└────────────────────
│││┌ @ broadcast.jl:885 Base.Broadcast.copyto!(Base.Broadcast.similar(bc, ElType), bc)
││││┌ @ broadcast.jl:913 Base.Broadcast.copyto!(dest, Base.Broadcast.convert(Base.Broadcast.Broadcasted{Nothing}, bc))
│││││┌ @ broadcast.jl:971 Base.Broadcast.invoke(Base.Broadcast.copyto!, Tuple{AbstractArray, Base.Broadcast.Broadcasted{Nothing}}, dest, bc)
││││││┌ @ broadcast.jl:961 bc′[I]
│││││││┌ @ broadcast.jl:597 val = Base.Broadcast._broadcast_getindex(bc, I)
││││││││┌ @ broadcast.jl:643 Base.Broadcast._broadcast_getindex_evalf(tuple(bc.f), args...)
│││││││││┌ @ broadcast.jl:670 f(args...)
││││││││││┌ @ /Users/skylargering/.julia/packages/GeoInterface/246K4/src/interface.jl:622 GeoInterface.coordinates(trait(obj), obj)
│││││││││││┌ @ /Users/skylargering/.julia/packages/GeoInterface/246K4/src/fallbacks.jl:104 GeoInterface.coordinates(::LinearRingTrait, ::LibGEOS.LinearRing)
││││││││││││ failed to optimize due to recursion: GeoInterface.coordinates(::LinearRingTrait, ::LibGEOS.LinearRing)
│││││││││││└───────────────────────────────────────────────────────────────────────────────
││││││││││┌ @ /Users/skylargering/.julia/packages/GeoInterface/246K4/src/interface.jl:622 GeoInterface.coordinates(::LibGEOS.LinearRing)
│││││││││││ failed to optimize due to recursion: GeoInterface.coordinates(::LibGEOS.LinearRing)
││││││││││└───────────────────────────────────────────────────────────────────────────────
│││││││││┌ @ broadcast.jl:670 Base.Broadcast._broadcast_getindex_evalf(::typeof(GeoInterface.coordinates), ::LibGEOS.LinearRing)
││││││││││ failed to optimize due to recursion: Base.Broadcast._broadcast_getindex_evalf(::typeof(GeoInterface.coordinates), ::LibGEOS.LinearRing)
│││││││││└────────────────────
││││││││┌ @ broadcast.jl:641 Base.Broadcast._broadcast_getindex(::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
│││││││││ failed to optimize due to recursion: Base.Broadcast._broadcast_getindex(::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
││││││││└────────────────────
│││││││┌ @ broadcast.jl:595 getindex(::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
││││││││ failed to optimize due to recursion: getindex(::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
│││││││└────────────────────
││││││┌ @ broadcast.jl:948 copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
│││││││ failed to optimize due to recursion: copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
││││││└────────────────────
│││││┌ @ broadcast.jl:968 copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
││││││ failed to optimize due to recursion: copyto!(::BitVector, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
│││││└────────────────────
││││┌ @ broadcast.jl:913 Base.Broadcast.copyto!(dest, Base.Broadcast.convert(Base.Broadcast.Broadcasted{Nothing}, bc))
│││││┌ @ broadcast.jl:957 bc′ = Base.Broadcast.preprocess(dest, bc)
││││││┌ @ broadcast.jl:940 Base.Broadcast.preprocess_args(dest, bc.args)
│││││││┌ @ broadcast.jl:944 Base.Broadcast.preprocess(dest, args[1])
││││││││┌ @ broadcast.jl:941 Base.Broadcast.broadcast_unalias(dest, x)
│││││││││┌ @ broadcast.jl:934 Base.Broadcast.unalias(dest, src)
││││││││││┌ @ abstractarray.jl:1427 Base.mightalias(dest, A)
│││││││││││┌ @ abstractarray.jl:1462 isbits(A)
││││││││││││┌ @ reflection.jl:593 %2 & 8
│││││││││││││ runtime dispatch detected: (%2::Any & 8)::Any
││││││││││││└─────────────────────
││││││││││││┌ @ reflection.jl:593 %3 == 8
│││││││││││││ runtime dispatch detected: (%3::Any == 8)::Any
││││││││││││└─────────────────────
│││┌ @ broadcast.jl:899 bc′[I]
││││┌ @ broadcast.jl:597 val = Base.Broadcast._broadcast_getindex(bc, I)
│││││┌ @ broadcast.jl:641 Base.Broadcast._broadcast_getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
││││││ failed to optimize due to recursion: Base.Broadcast._broadcast_getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
│││││└────────────────────
││││┌ @ broadcast.jl:595 getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
│││││ failed to optimize due to recursion: getindex(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
││││└────────────────────
│││┌ @ broadcast.jl:907 Base.Broadcast.copyto_nonleaf!(dest, bc′, iter, state, 1)
││││┌ @ broadcast.jl:1061 Base.Broadcast.promote_typejoin(T, Base.Broadcast.typeof(val))
│││││┌ @ promotion.jl:162 c = typejoin(Base._promote_typesubtract(a), Base._promote_typesubtract(b))
││││││┌ @ promotion.jl:54 Base.unwrapva(%79)
│││││││ runtime dispatch detected: Base.unwrapva(%79::Any)::Any
││││││└───────────────────
││││││┌ @ promotion.jl:64 Base.unwrapva(%149)
│││││││ runtime dispatch detected: Base.unwrapva(%149::Any)::Any
││││││└───────────────────
││││││┌ @ promotion.jl:77 Base.unwrapva(%220)
│││││││ runtime dispatch detected: Base.unwrapva(%220::Any)::Any
││││││└───────────────────
││││││┌ @ promotion.jl:77 Base.unwrapva(%239)
│││││││ runtime dispatch detected: Base.unwrapva(%239::Any)::Any
││││││└───────────────────
││││││┌ @ promotion.jl:112 %407.var
│││││││ runtime dispatch detected: (%407::Any).var::Any
││││││└────────────────────
││││││┌ @ promotion.jl:113 %407.body
│││││││ runtime dispatch detected: (%407::Any).body::Any
││││││└────────────────────
││││││┌ @ promotion.jl:117 Base.UnionAll(%521, %523)
│││││││ runtime dispatch detected: Base.UnionAll(%521::Any, %523::Any)::Any
││││││└────────────────────
│││││┌ @ promotion.jl:162 typejoin(, %6)
││││││ runtime dispatch detected: typejoin(::Bool, %6::Union{DataType, Type{Union{}}})::Any
│││││└────────────────────
││││┌ @ broadcast.jl:1062 Base.Broadcast.restart_copyto_nonleaf!(newdest, dest, bc, val, I, iter, state, count)
│││││┌ @ broadcast.jl:1042 Base.Broadcast.Iterators.take(iter, count)
││││││┌ @ iterators.jl:695 Base.Iterators.Take(xs, Base.Iterators.Int(n))
│││││││┌ @ iterators.jl:663 convert(I, xs)
││││││││┌ @ range.jl:256 T(r)
│││││││││┌ @ range.jl:454 Core.apply_type(Base.OneTo, T)(r)
││││││││││┌ @ range.jl:1281 Core.apply_type(Base.OneTo, T)(r.stop)
│││││││││││┌ @ range.jl:439 throwbool(stop)
││││││││││││┌ @ range.jl:438 string("invalid index: ", r, " of type Bool")
│││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
││││││││││││││┌ @ strings/io.jl:144 print(s, x)
│││││││││││││││┌ @ show.jl:1063 string(n)
││││││││││││││││┌ @ intfuncs.jl:791 Base.:(var"#string#427")(10, 1, #self#, n)
│││││││││││││││││┌ @ intfuncs.jl:801 Base.dec(n_positive, pad, neg)
││││││││││││││││││┌ @ intfuncs.jl:707 Core.kwfunc(ndigits)(NamedTuple{(:pad,)}(tuple(pad)), ndigits, x)
│││││││││││││││││││┌ @ intfuncs.jl:658 Base.:(var"#ndigits#426")(base, pad, _3, x)
││││││││││││││││││││┌ @ intfuncs.jl:658 Base.ndigits0z(x, base)
│││││││││││││││││││││┌ @ intfuncs.jl:623 Base.ndigits0znb(x, b)
││││││││││││││││││││││┌ @ intfuncs.jl:542 x != 0
│││││││││││││││││││││││┌ @ operators.jl:282 x == y
││││││││││││││││││││││││┌ @ promotion.jl:427 promote(x, y)
│││││││││││││││││││││││││┌ @ promotion.jl:359 Base._promote(x, y)
││││││││││││││││││││││││││┌ @ promotion.jl:335 R = promote_type(T, S)
│││││││││││││││││││││││││││┌ @ promotion.jl:298 Base.promote_result(T, S, promote_rule(T, S), promote_rule(S, T))
││││││││││││││││││││││││││││┌ @ promotion.jl:315 typejoin(T, S)
│││││││││││││││││││││││││││││┌ @ promotion.jl:25 typejoin(a.body, b)
││││││││││││││││││││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%102)
│││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%102::Any)::Any
││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%172)
│││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%172::Any)::Any
││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%243)
│││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%243::Any)::Any
││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%262)
│││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%262::Any)::Any
││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:112 %430.var
│││││││││││││││││││││││││││││││ runtime dispatch detected: (%430::Any).var::Any
││││││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:113 %430.body
│││││││││││││││││││││││││││││││ runtime dispatch detected: (%430::Any).body::Any
││││││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%544, %546)
│││││││││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%544::Any, %546::Any)::Any
││││││││││││││││││││││││││││││└────────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:25 Base.UnionAll(%7, %9)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%7::Any, %9::Any)::Any
│││││││││││││││││││││││││││││└───────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%89)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%89::Any)::Any
│││││││││││││││││││││││││││││└───────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%159)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%159::Any)::Any
│││││││││││││││││││││││││││││└───────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%230)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%230::Any)::Any
│││││││││││││││││││││││││││││└───────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%249)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%249::Any)::Any
│││││││││││││││││││││││││││││└───────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:112 %417.var
││││││││││││││││││││││││││││││ runtime dispatch detected: (%417::Any).var::Any
│││││││││││││││││││││││││││││└────────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:113 %417.body
││││││││││││││││││││││││││││││ runtime dispatch detected: (%417::Any).body::Any
│││││││││││││││││││││││││││││└────────────────────
│││││││││││││││││││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%531, %533)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%531::Any, %533::Any)::Any
│││││││││││││││││││││││││││││└────────────────────
│││││││││││││││││││││││││┌ @ promotion.jl:360 Base.not_sametype(tuple(x, y), tuple(px, py))
││││││││││││││││││││││││││┌ @ promotion.jl:377 Base.sametype_error(x)
│││││││││││││││││││││││││││┌ @ promotion.jl:383 map(#43, input)
││││││││││││││││││││││││││││┌ @ tuple.jl:222 f(t[1])
│││││││││││││││││││││││││││││┌ @ promotion.jl:384 string(Base.typeof(x))
││││││││││││││││││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││││││││││││││││││┌ @ strings/io.jl:144 print(s, x)
││││││││││││││││││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
│││││││││││││││││││││││││││││││││┌ @ show.jl:881 Base._show_type(io, Base.inferencebarrier(x))
││││││││││││││││││││││││││││││││││┌ @ show.jl:884 Base.show_type_name(io, typeassert(Base.unwrap_unionall(x), Base.DataType).name)
│││││││││││││││││││││││││││││││││││┌ @ show.jl:971 show(io, tn.module)
││││││││││││││││││││││││││││││││││││┌ @ show.jl:1103 Base.is_root_module(m)
│││││││││││││││││││││││││││││││││││││┌ @ lock.jl:221 lock(temp)
││││││││││││││││││││││││││││││││││││││┌ @ lock.jl:103 slowlock(rl)
│││││││││││││││││││││││││││││││││││││││┌ @ lock.jl:112 wait(c)
││││││││││││││││││││││││││││││││││││││││┌ @ condition.jl:126 Base.list_deletefirst!(ct.queue, ct)
│││││││││││││││││││││││││││││││││││││││││┌ @ linked_list.jl:145 isequal(h.value, val)
││││││││││││││││││││││││││││││││││││││││││┌ @ gcutils.jl:4 isequal(%1, v)
│││││││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: isequal(%1::Any, v::Task)::Bool
││││││││││││││││││││││││││││││││││││││││││└────────────────
││││││││││││││││││││││││││││││││││││││││┌ @ condition.jl:126 Base.list_deletefirst!(%45, %39)
│││││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.list_deletefirst!(%45::Any, %39::Task)::Any
││││││││││││││││││││││││││││││││││││││││└────────────────────
│││││││││││││││││││││││││││││││││││││┌ @ lock.jl:225 unlock(temp)
││││││││││││││││││││││││││││││││││││││┌ @ lock.jl:133 _unlock(rl)
│││││││││││││││││││││││││││││││││││││││┌ @ lock.jl:139 notifywaiters(rl)
││││││││││││││││││││││││││││││││││││││││┌ @ lock.jl:143 = notify(cond_wait)
│││││││││││││││││││││││││││││││││││││││││┌ @ condition.jl:142 #self#(c, Base.nothing)
││││││││││││││││││││││││││││││││││││││││││┌ @ condition.jl:142 Base.:(var"#notify#586")(true, false, #self#, c, arg)
│││││││││││││││││││││││││││││││││││││││││││┌ @ condition.jl:142 notify(c, arg, all, error)
││││││││││││││││││││││││││││││││││││││││││││┌ @ condition.jl:148 Core.kwfunc(schedule)(NamedTuple{(:error,)}(tuple(error)), schedule, t, arg)
│││││││││││││││││││││││││││││││││││││││││││││┌ @ task.jl:789 Base.:(var"#schedule#613")(error, _3, t, arg)
││││││││││││││││││││││││││││││││││││││││││││││┌ @ task.jl:793 %10(%11, t)
│││││││││││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: %10::typeof(Base.list_deletefirst!)(%11::Any, t::Task)::Any
││││││││││││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││┌ @ show.jl:886 Base.show_typealias(io, x)
│││││││││││││││││││││││││││││││││││┌ @ show.jl:721 alias = Base.make_typealias(properx)
││││││││││││││││││││││││││││││││││││┌ @ show.jl:531 mods = Base.modulesof!(Set{Module}(), x)
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, %20)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %20::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:507 Base.modulesof!(s, %30)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %30::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:535 Base.uniontypes(Base.unwrap_unionall(x))
│││││││││││││││││││││││││││││││││││││┌ @ reflection.jl:931 Base._uniontypes(x, Base.Any[])
││││││││││││││││││││││││││││││││││││││┌ @ reflection.jl:929 Base._uniontypes(%1, ts)
│││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(%1::Any, ts::Vector{Any})::Any
││││││││││││││││││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││││││││││││││││││┌ @ reflection.jl:929 Base._uniontypes(%3, ts)
│││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(%3::Any, ts::Vector{Any})::Any
││││││││││││││││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││││││││││││││││┌ @ reflection.jl:931 Base._uniontypes(x, %1)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(x::Any, %1::Vector{Any})::Vector{Any}
│││││││││││││││││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:566 applied = Base.rewrap_unionall(applied, p)
│││││││││││││││││││││││││││││││││││││┌ @ essentials.jl:273 Base.rewrap_unionall(%5, u)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%5::Any, u::UnionAll)::Any
│││││││││││││││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││││││││││││││││┌ @ essentials.jl:273 Base.rewrap_unionall(%8, %9)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%8::Any, %9::UnionAll)::Any
│││││││││││││││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││││││││││││││││┌ @ essentials.jl:265 Base.rewrap_unionall(t, %3)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(t::Any, %3::Any)::Any
│││││││││││││││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││││││││││││││││┌ @ essentials.jl:265 Base.rewrap_unionall(t, %8)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(t::Any, %8::Any)::Any
│││││││││││││││││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:566 Base.rewrap_unionall(%373, %371)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%373::Any, %371::UnionAll)::Any
││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:724 Base.show_typealias(io, alias[1], x, alias[2], wheres)
││││││││││││││││││││││││││││││││││││┌ @ show.jl:671 Base.show_typeparams(io, env, Core.svec(vars...), wheres)
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:635 show(io, p)
││││││││││││││││││││││││││││││││││││││┌ @ show.jl:2458 show_bound(io, lb)
│││││││││││││││││││││││││││││││││││││││┌ @ show.jl:2450 show(io, b)
││││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, b::Any)::Any
│││││││││││││││││││││││││││││││││││││││└────────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:630 show(io, %262)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %262::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:633 show(io, %319)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %319::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:638 show(io, %204)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %204::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││┌ @ show.jl:889 Base.show_datatype(io, x)
│││││││││││││││││││││││││││││││││││┌ @ show.jl:989 #self#(io, x, Base.TypeVar[])
││││││││││││││││││││││││││││││││││││┌ @ show.jl:1011 Base.show_typeparams(io, parameters, typeassert(Base.unwrap_unionall(x.name.wrapper), Base.DataType).parameters, wheres)
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:635 show(io, p)
││││││││││││││││││││││││││││││││││││││┌ @ show.jl:2458 show_bound(io, lb)
│││││││││││││││││││││││││││││││││││││││┌ @ show.jl:2450 show(io, b)
││││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, b::Any)::Any
│││││││││││││││││││││││││││││││││││││││└────────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:630 show(io, %260)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %260::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:633 show(io, %316)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %316::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:638 show(io, %203)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %203::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:997 show(io, %22)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %22::Any)::Any
││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:1005 show(io, %64)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %64::Any)::Any
││││││││││││││││││││││││││││││││││││└────────────────
││││││││││││││││││││││││││││││││││┌ @ show.jl:892 Base.show_unionaliases(io, x)
│││││││││││││││││││││││││││││││││││┌ @ show.jl:812 Base.make_typealiases(properx)
││││││││││││││││││││││││││││││││││││┌ @ show.jl:733 mods = Base.modulesof!(Set{Module}(), x)
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, x.a)
││││││││││││││││││││││││││││││││││││││┌ @ show.jl:500 Base.modulesof!(s, %1)
│││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %1::Any)::Set{Module}
││││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, %3)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %3::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││││┌ @ show.jl:507 Base.modulesof!(s, %12)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %12::Any)::Any
│││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:768 ul = Base.unionlen(applied)
│││││││││││││││││││││││││││││││││││││┌ @ reflection.jl:926 Base.unionlen(%1)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%1::Any)::Int64
│││││││││││││││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││││││││││││││││┌ @ reflection.jl:926 Base.unionlen(%3)
││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%3::Any)::Int64
│││││││││││││││││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:740 Base.rewrap_unionall(%42, x)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%42::Any, x::Union)::Any
││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:768 Base.unionlen(%390)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%390::Any)::Int64
││││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││││┌ @ show.jl:770 Base.rewrap_unionall(%414, %412)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%414::Any, %412::UnionAll)::Any
││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:812 Base.make_typealiases(%10)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.make_typealiases(%10::Union{Type{Any}, Union})::Tuple{Vector{Core.SimpleVector}, Type}
│││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:820 Base.rewrap_unionall(%47, %10)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%47::Any, %10::Union{Type{Any}, Union})::Any
│││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:825 show(io, %47)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %47::Any)::Any
│││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:831 Base.show_typealias(io, %137, x, %127, %128)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %137::Any, x::Union, %127::Core.SimpleVector, %128::Vector{TypeVar})::Any
│││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:839 Base.show_typealias(io, %205, x, %195, %196)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %205::Any, x::Union, %195::Core.SimpleVector, %196::Vector{TypeVar})::Any
│││││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││││┌ @ show.jl:896 Base.show_delim_array(io, Base.uniontypes(x), {, ,, }, false)
│││││││││││││││││││││││││││││││││││┌ @ show.jl:1201 #self#(io, itr, op, delim, cl, delim_one, first(LinearIndices(itr)), last(LinearIndices(itr)))
││││││││││││││││││││││││││││││││││││┌ @ show.jl:1212 show(%5, %42)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(%5::IOContext{IOBuffer}, %42::Any)::Any
││││││││││││││││││││││││││││││││││││└────────────────
││││││││││││││││││││││││││││││││││┌ @ show.jl:923 Base.show_datatype(io, x, wheres)
│││││││││││││││││││││││││││││││││││┌ @ show.jl:1010 Base.show_type_name(io, x.name)
││││││││││││││││││││││││││││││││││││┌ @ show.jl:970 Base.isvisible(%36, %84, %78)
│││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.isvisible(%36::Symbol, %84::Module, %78::Any)::Bool
││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:997 show(io, %22)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %22::Any)::Any
│││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││││┌ @ show.jl:1005 show(io, %66)
││││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %66::Any)::Any
│││││││││││││││││││││││││││││││││││└────────────────
││││││││││││││││││││││││││││││││││┌ @ show.jl:925 show(%254, %80)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: show(%254::IOContext{IOBuffer}, %80::Any)::Any
││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││││││││││││││┌ @ show.jl:881 Base._show_type(io, x)
││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._show_type(io::IOBuffer, x::Type)::Nothing
│││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
│││││││││││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, x::Type)::Any
││││││││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││││││││││┌ @ tuple.jl:222 f(t[2])
│││││││││││││││││││││││││││││┌ @ promotion.jl:384 string(Base.typeof(x))
││││││││││││││││││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││││││││││││││││││┌ @ strings/io.jl:144 print(s, x)
││││││││││││││││││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
│││││││││││││││││││││││││││││││││┌ @ show.jl:881 Base._show_type(io, )
││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._show_type(io::IOBuffer, ::Int64)::Nothing
│││││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││││││┌ @ intfuncs.jl:543 fld(x, -(b))
│││││││││││││││││││││││┌ @ div.jl:305 div(x, y, RoundDown)
││││││││││││││││││││││││┌ @ div.jl:260 divrem(x, y)
│││││││││││││││││││││││││┌ @ int.jl:234 divrem(x, unsigned(abs(y)))
││││││││││││││││││││││││││┌ @ div.jl:161 divrem(x, y, RoundToZero)
│││││││││││││││││││││││││││┌ @ div.jl:182 d = div(a, b)
││││││││││││││││││││││││││││┌ @ div.jl:40 div(a, b, RoundToZero)
│││││││││││││││││││││││││││││┌ @ div.jl:316 promote(x, y)
││││││││││││││││││││││││││││││┌ @ promotion.jl:359 Base._promote(x, y)
│││││││││││││││││││││││││││││││┌ @ promotion.jl:335 R = promote_type(T, S)
││││││││││││││││││││││││││││││││┌ @ promotion.jl:298 Base.promote_result(T, S, promote_rule(T, S), promote_rule(S, T))
│││││││││││││││││││││││││││││││││┌ @ promotion.jl:315 typejoin(T, S)
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:25 Base.UnionAll(%11, %13)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%11::Any, %13::Any)::Any
││││││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%93)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%93::Any)::Any
││││││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%163)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%163::Any)::Any
││││││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%234)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%234::Any)::Any
││││││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%253)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%253::Any)::Any
││││││││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:112 %421.var
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: (%421::Any).var::Any
││││││││││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:113 %421.body
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: (%421::Any).body::Any
││││││││││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%535, %537)
│││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%535::Any, %537::Any)::Any
││││││││││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││││││││││││┌ @ promotion.jl:360 Base.not_sametype(tuple(x, y), tuple(px, py))
│││││││││││││││││││││││││││││││┌ @ promotion.jl:377 Base.sametype_error(x)
││││││││││││││││││││││││││││││││┌ @ promotion.jl:383 map(#43, input)
│││││││││││││││││││││││││││││││││┌ @ tuple.jl:222 f(t[2])
││││││││││││││││││││││││││││││││││┌ @ promotion.jl:384 string(Base.typeof(x))
│││││││││││││││││││││││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
││││││││││││││││││││││││││││││││││││┌ @ strings/io.jl:144 print(s, x)
│││││││││││││││││││││││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
││││││││││││││││││││││││││││││││││││││┌ @ show.jl:881 Base._show_type(io, )
│││││││││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._show_type(io::IOBuffer, ::UInt64)::Nothing
││││││││││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ intfuncs.jl:625 Base.ndigits0zpb(x, b)
││││││││││││││││││││││┌ @ intfuncs.jl:575 x > typemax(Base.Int)
│││││││││││││││││││││││┌ @ operators.jl:382 y < x
││││││││││││││││││││││││┌ @ promotion.jl:428 promote(x, y)
│││││││││││││││││││││││││┌ @ promotion.jl:359 Base._promote(x, y)
││││││││││││││││││││││││││┌ @ promotion.jl:335 R = promote_type(T, S)
│││││││││││││││││││││││││││┌ @ promotion.jl:298 Base.promote_result(T, S, promote_rule(T, S), promote_rule(S, T))
││││││││││││││││││││││││││││┌ @ promotion.jl:315 typejoin(T, S)
│││││││││││││││││││││││││││││┌ @ promotion.jl:27 Base.UnionAll(%8, %10)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%8::Any, %10::Any)::Any
│││││││││││││││││││││││││││││└───────────────────
││││││││││││││││││┌ @ intfuncs.jl:711 divrem(x, 100)
│││││││││││││││││││┌ @ div.jl:161 divrem(x, y, RoundToZero)
││││││││││││││││││││┌ @ div.jl:182 d = div(a, b)
│││││││││││││││││││││┌ @ div.jl:40 div(a, b, RoundToZero)
││││││││││││││││││││││┌ @ div.jl:316 promote(x, y)
│││││││││││││││││││││││┌ @ promotion.jl:360 Base.not_sametype(tuple(x, y), tuple(px, py))
││││││││││││││││││││││││┌ @ promotion.jl:377 Base.sametype_error(x)
│││││││││││││││││││││││││┌ @ promotion.jl:383 map(#43, input)
││││││││││││││││││││││││││┌ @ tuple.jl:222 f(t[2])
│││││││││││││││││││││││││││┌ @ promotion.jl:384 string(Base.typeof(x))
││││││││││││││││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││││││││││││││││┌ @ strings/io.jl:144 print(s, x)
││││││││││││││││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
│││││││││││││││││││││││││││││││┌ @ show.jl:881 Base._show_type(io, )
││││││││││││││││││││││││││││││││ runtime dispatch detected: Base._show_type(io::IOBuffer, ::UInt8)::Nothing
│││││││││││││││││││││││││││││││└───────────────
│││││││││││││││││┌ @ intfuncs.jl:806 Base._base(base, _13, pad, base > 0 & n < 0)
││││││││││││││││││┌ @ intfuncs.jl:754 Core.kwfunc(ndigits)(NamedTuple{(:base, :pad)}(tuple(b, pad)), ndigits, x)
│││││││││││││││││││┌ @ intfuncs.jl:658 Base.:(var"#ndigits#426")(base, pad, _3, x)
││││││││││││││││││││┌ @ intfuncs.jl:658 Base.ndigits0z(x, base)
│││││││││││││││││││││┌ @ intfuncs.jl:625 Base.ndigits0zpb(x, b)
││││││││││││││││││││││┌ @ gmp.jl:769 Base.GMP.big(b) Base.GMP.:^ iq
│││││││││││││││││││││││┌ @ gmp.jl:628 Base.GMP.bigint_pow(x, y)
││││││││││││││││││││││││┌ @ gmp.jl:621 throw1(y)
│││││││││││││││││││││││││┌ @ gmp.jl:606 string("exponent ", y, " is too large and computation will overflow")
││││││││││││││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││││││││││││││┌ @ strings/io.jl:144 print(%95, %109)
││││││││││││││││││││││││││││ runtime dispatch detected: print(%95::IOBuffer, %109::Any)::Any
│││││││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││││││┌ @ strings/io.jl:185 string(::String, ::Int64, ::String)
│││││││││││││││││││││││││││ failed to optimize due to recursion: string(::String, ::Int64, ::String)
││││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││││┌ @ gmp.jl:606 (::Base.GMP.var"#throw1#3")(::Int64)
││││││││││││││││││││││││││ failed to optimize due to recursion: (::Base.GMP.var"#throw1#3")(::Int64)
│││││││││││││││││││││││││└──────────────
││││││││││││││┌ @ strings/io.jl:139 Base._str_sizehint(%4)
│││││││││││││││ runtime dispatch detected: Base._str_sizehint(%4::Union{Integer, String})::Int64
││││││││││││││└─────────────────────
││││││││││││││┌ @ strings/io.jl:144 print(%39, %42)
│││││││││││││││ runtime dispatch detected: print(%39::IOBuffer, %42::Union{Integer, String})::Any
││││││││││││││└─────────────────────
│││││┌ @ broadcast.jl:1046 Base.Broadcast.copyto_nonleaf!(newdest, bc, iter, state, count Base.Broadcast.:+ 1)
││││││┌ @ broadcast.jl:1055 bc[I]
│││││││┌ @ broadcast.jl:596 Base.Broadcast.checkbounds(bc, I)
││││││││┌ @ broadcast.jl:608 Base.checkbounds_indices(Base.Broadcast.Bool, Base.Broadcast.axes(bc), tuple(I))
│││││││││┌ @ multidimensional.jl:664 Base.checkbounds_indices(Base.Bool, IA, tuple(I[1].I, Base.tail(I)...))
││││││││││┌ @ abstractarray.jl:694 checkindex(Base.Bool, IA[1], I[1])
│││││││││││┌ @ /Users/skylargering/.julia/packages/OffsetArrays/TcCEq/src/axes.jl:281 i OffsetArrays.:- inds.offset
││││││││││││┌ @ int.jl:988 T = Base.promote_typeof(a, b)
│││││││││││││┌ @ promotion.jl:339 promote_type(Base.typeof(x), Base.promote_typeof(xs...))
││││││││││││││┌ @ promotion.jl:298 Base.promote_result(T, S, promote_rule(T, S), promote_rule(S, T))
│││││││││││││││┌ @ promotion.jl:312 promote_type(T, S)
││││││││││││││││┌ @ promotion.jl:298 Base.promote_result(T, S, promote_rule(T, S), promote_rule(S, T))
│││││││││││││││││┌ @ promotion.jl:315 typejoin(T, S)
││││││││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%97)
│││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%97::Any)::Any
││││││││││││││││││└───────────────────
││││││││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%167)
│││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%167::Any)::Any
││││││││││││││││││└───────────────────
││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%238)
│││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%238::Any)::Any
││││││││││││││││││└───────────────────
││││││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%257)
│││││││││││││││││││ runtime dispatch detected: Base.unwrapva(%257::Any)::Any
││││││││││││││││││└───────────────────
││││││││││││││││││┌ @ promotion.jl:112 %425.var
│││││││││││││││││││ runtime dispatch detected: (%425::Any).var::Any
││││││││││││││││││└────────────────────
││││││││││││││││││┌ @ promotion.jl:113 %425.body
│││││││││││││││││││ runtime dispatch detected: (%425::Any).body::Any
││││││││││││││││││└────────────────────
││││││││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%539, %541)
│││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%539::Any, %541::Any)::Any
││││││││││││││││││└────────────────────
││││┌ @ broadcast.jl:1049 Base.Broadcast.copyto_nonleaf!(::BitVector, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Base.OneTo{Int64}, ::Int64, ::Int64)
│││││ failed to optimize due to recursion: Base.Broadcast.copyto_nonleaf!(::BitVector, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Base.Broadcast.Extruded{Vector{LibGEOS.LinearRing}, Tuple{Bool}, Tuple{Int64}}}}, ::Base.OneTo{Int64}, ::Int64, ::Int64)
││││└─────────────────────
│││┌ @ broadcast.jl:881 copy(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
││││ failed to optimize due to recursion: copy(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
│││└────────────────────
││┌ @ broadcast.jl:860 Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
│││ failed to optimize due to recursion: Base.Broadcast.materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(GeoInterface.coordinates), Tuple{Vector{LibGEOS.LinearRing}}})
││└────────────────────
│┌ @ /Users/skylargering/.julia/packages/GeoInterface/246K4/src/fallbacks.jl:104 GeoInterface.collect(%38)
││ runtime dispatch detected: GeoInterface.collect(%38::Any)::Any
│└───────────────────────────────────────────────────────────────────────────────

Warnings from LibGEOS.getGeometries

┌ @ /Users/skylargering/.julia/packages/LibGEOS/Wbmhr/src/geos_operations.jl:286 #self#(obj, LibGEOS.get_context(obj))
│┌ @ /Users/skylargering/.julia/packages/LibGEOS/Wbmhr/src/geos_operations.jl:286 collect(Base.Generator(#15, getGeometries(obj.ptr, context)))
││┌ @ array.jl:797 Base.collect_to_with_first!(dest, v1, itr, st)
│││┌ @ array.jl:823 Base.collect_to!(dest, itr, i1 + 1, st)
││││┌ @ array.jl:852 new = Base.setindex_widen_up_to(dest, el, i)
│││││┌ @ array.jl:833 Base.promote_typejoin(T, Base.typeof(el))
││││││┌ @ promotion.jl:162 c = typejoin(Base._promote_typesubtract(a), Base._promote_typesubtract(b))
│││││││┌ @ promotion.jl:29 typejoin(a.a, a.b)
││││││││┌ @ promotion.jl:54 Base.unwrapva(%125)
│││││││││ runtime dispatch detected: Base.unwrapva(%125::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:64 Base.unwrapva(%195)
│││││││││ runtime dispatch detected: Base.unwrapva(%195::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:77 Base.unwrapva(%266)
│││││││││ runtime dispatch detected: Base.unwrapva(%266::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:77 Base.unwrapva(%285)
│││││││││ runtime dispatch detected: Base.unwrapva(%285::Any)::Any
││││││││└───────────────────
││││││││┌ @ promotion.jl:112 %453.var
│││││││││ runtime dispatch detected: (%453::Any).var::Any
││││││││└────────────────────
││││││││┌ @ promotion.jl:113 %453.body
│││││││││ runtime dispatch detected: (%453::Any).body::Any
││││││││└────────────────────
││││││││┌ @ promotion.jl:117 Base.UnionAll(%567, %569)
│││││││││ runtime dispatch detected: Base.UnionAll(%567::Any, %569::Any)::Any
││││││││└────────────────────
│││││││┌ @ promotion.jl:44 Base.tailjoin(bp, 1)
││││││││┌ @ promotion.jl:229 Base.unwrapva(%19)
│││││││││ runtime dispatch detected: Base.unwrapva(%19::Any)::Any
││││││││└────────────────────
││││││││┌ @ promotion.jl:233 Base.unwrapva(%73)
│││││││││ runtime dispatch detected: Base.unwrapva(%73::Any)::Any
││││││││└────────────────────
│││││││┌ @ promotion.jl:54 Base.unwrapva(%102)
││││││││ runtime dispatch detected: Base.unwrapva(%102::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:64 Base.unwrapva(%172)
││││││││ runtime dispatch detected: Base.unwrapva(%172::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:77 Base.unwrapva(%243)
││││││││ runtime dispatch detected: Base.unwrapva(%243::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:77 Base.unwrapva(%262)
││││││││ runtime dispatch detected: Base.unwrapva(%262::Any)::Any
│││││││└───────────────────
│││││││┌ @ promotion.jl:112 %430.var
││││││││ runtime dispatch detected: (%430::Any).var::Any
│││││││└────────────────────
│││││││┌ @ promotion.jl:113 %430.body
││││││││ runtime dispatch detected: (%430::Any).body::Any
│││││││└────────────────────
│││││││┌ @ promotion.jl:117 Base.UnionAll(%544, %546)
││││││││ runtime dispatch detected: Base.UnionAll(%544::Any, %546::Any)::Any
│││││││└────────────────────
││┌ @ array.jl:792 Base._array_for(%43, [quote], %10)
│││ runtime dispatch detected: Base._array_for(%43::DataType, [quote]::Base.HasShape{1}, %10::Tuple{Base.OneTo{Int64}})::Vector
││└────────────────
││┌ @ array.jl:796 ndims(%44)
│││ runtime dispatch detected: ndims(%44::Vector)::Int64
││└────────────────
││┌ @ array.jl:797 Base.collect_to_with_first!(%44, %38, itr, %39)
│││ runtime dispatch detected: Base.collect_to_with_first!(%44::Vector, %38::Any, itr::Base.Generator{Vector{Ptr{Nothing}}, LibGEOS.var"#15#16"{LibGEOS.GEOSContext}}, %39::Int64)::Vector
││└────────────────

@evetion
Copy link
Member

evetion commented Mar 12, 2023

I've made some PRs that should improve the type stability, mostly getting @code_warntype green for these kind of calls. However, some things reported by JET can't be fixed. Most things will be runtime dispatch, as we don't store geometry information in the type, and it warns it

failed to optimize due to recursion

which is inherit to the coordinates method.

@skygering
Copy link
Contributor Author

Thank you so much for your quick response and working on this! I really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants