aviatesk / JET.jl

An experimental code analyzer for Julia. No need for additional type annotations.
https://aviatesk.github.io/JET.jl/dev/
MIT License
738 stars 30 forks source link

Real-world stress test #105

Open timholy opened 3 years ago

timholy commented 3 years ago

If you want a real-world test case, I got #104 from attempting to use JET on the PaddedViews.jl runtest.jl file. I comment out the ambiguity and doctest portions, and then with SnoopCompile I get this:

tim@diva:~/.julia/dev/PaddedViews$ juliam --project
┌ Warning: no Manifest.toml file found, static paths used
└ @ Revise ~/.julia/dev/Revise/src/packagedef.jl:1361
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-rc1 (2021-02-06)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

shell> cd test
/home/tim/.julia/dev/PaddedViews/test

julia> using SnoopCompile

julia> tinf = @snoopi_deep include("runtests.jl")
Test Summary: | Pass  Total
PaddedView    |   74     74
Test Summary: | Pass  Total
paddedviews   |   24     24
Test Summary:   | Pass  Total
sym_paddedviews |   31     31
Test Summary: | Pass  Total
showarg       |    1      1
Test Summary: | Pass  Total
similar       |   60     60
Test Summary:   | Pass  Total
nothing/missing |   38     38
InferenceTimingNode: 4.723019/6.625027 on InferenceFrameInfo for Core.Compiler.Timings.ROOT() with 265 direct children

julia> itrigs = inference_triggers(tinf);

julia> length(itrigs)   # how many inference failures were there while the test suite was run? This tries to exclude things that obviously come from the tests themselves (though I'm a little nervous about whether it's really accurate)
30

julia> mtrigs = accumulate_by_source(Method, itrigs)   # group them by Method
17-element Vector{SnoopCompile.TaggedTriggers{Method}}:
 merge(a::NamedTuple, itr) in Base at namedtuple.jl:277 (1 callees from 1 callers)
 show(io::IO, ::MIME{Symbol("text/plain")}, X::AbstractArray) in Base at arrayshow.jl:332 (1 callees from 1 callers)
 alignment(io::IO, X::AbstractVecOrMat{T} where T, rows::AbstractVector{T}, cols::AbstractVector{V}, cols_if_complete::Integer, cols_otherwise::Integer, sep::Integer) where {T, V} in Base at arrayshow.jl:60 (1 callees from 1 callers)
 var"#any#698"(dims, ::typeof(any), f::Function, a::AbstractArray) in Base at reducedim.jl:883 (1 callees from 1 callers)
 var"#printstyled#820"(bold::Bool, color::Union{Int64, Symbol}, ::typeof(printstyled), msg...) in Base at util.jl:107 (1 callees from 1 callers)
 print_matrix_row(io::IO, X::AbstractVecOrMat{T} where T, A::Vector{T} where T, i::Integer, cols::AbstractVector{T} where T, sep::AbstractString) in Base at arrayshow.jl:96 (1 callees from 1 callers)
 any(f::Function, a::AbstractArray; dims) in Base at reducedim.jl:883 (1 callees from 1 callers)
 sym_paddedviews_itr(fillvalue, itr) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:324 (1 callees from 1 callers)
 print(io::IO, x) in Base at strings/io.jl:32 (2 callees from 1 callers)
 OffsetArray(A::AbstractArray, inds...) in OffsetArrays at /home/tim/.julia/dev/OffsetArrays/src/OffsetArrays.jl:195 (2 callees from 2 callers)
 _print_matrix(io, X::AbstractVecOrMat{T} where T, pre, sep, post, hdots, vdots, ddots, hmod, vmod, rowsA, colsA) in Base at arrayshow.jl:173 (2 callees from 1 callers)
 showarg(io::IO, A::PaddedView, toplevel) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:338 (2 callees from 1 callers)
 (::Base.var"#printstyled##kw")(::Any, ::typeof(printstyled), msg...) in Base at util.jl:107 (2 callees from 2 callers)
 collect_to!(dest::AbstractArray{T, N} where N, itr, offs, st) where T in Base at array.jl:719 (3 callees from 1 callers)
 paddedviews_itr(fillvalue, itr) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:241 (3 callees from 1 callers)
 collect(itr::Base.Generator) in Base at array.jl:672 (3 callees from 1 callers)
 vect(X...) in Base at array.jl:125 (3 callees from 1 callers)

julia> mtrigs = filter(mtrigs) do mtrig     # skip the ones that can probably big ignored (again, a bit scary---is my analysis correct?)
           !all(isignorable ∘ suggest, mtrig.itrigs)
       end
11-element Vector{SnoopCompile.TaggedTriggers{Method}}:
 merge(a::NamedTuple, itr) in Base at namedtuple.jl:277 (1 callees from 1 callers)
 var"#any#698"(dims, ::typeof(any), f::Function, a::AbstractArray) in Base at reducedim.jl:883 (1 callees from 1 callers)
 var"#printstyled#820"(bold::Bool, color::Union{Int64, Symbol}, ::typeof(printstyled), msg...) in Base at util.jl:107 (1 callees from 1 callers)
 sym_paddedviews_itr(fillvalue, itr) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:324 (1 callees from 1 callers)
 OffsetArray(A::AbstractArray, inds...) in OffsetArrays at /home/tim/.julia/dev/OffsetArrays/src/OffsetArrays.jl:195 (2 callees from 2 callers)
 _print_matrix(io, X::AbstractVecOrMat{T} where T, pre, sep, post, hdots, vdots, ddots, hmod, vmod, rowsA, colsA) in Base at arrayshow.jl:173 (2 callees from 1 callers)
 (::Base.var"#printstyled##kw")(::Any, ::typeof(printstyled), msg...) in Base at util.jl:107 (2 callees from 2 callers)
 collect_to!(dest::AbstractArray{T, N} where N, itr, offs, st) where T in Base at array.jl:719 (3 callees from 1 callers)
 paddedviews_itr(fillvalue, itr) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:241 (3 callees from 1 callers)
 collect(itr::Base.Generator) in Base at array.jl:672 (3 callees from 1 callers)
 vect(X...) in Base at array.jl:125 (3 callees from 1 callers)

julia> for (i, mtrig) in enumerate(mtrigs)
           println(i, ": ", mtrig)
           display(suggest(mtrig.itrigs[1]))
           println()
       end
1: merge(a::NamedTuple, itr) in Base at namedtuple.jl:277 (1 callees from 1 callers)
./namedtuple.jl:291: partial type call, perhaps annotate merge(a::NamedTuple{(), Tuple{}}, itr::Dict{Symbol, Any}) at namedtuple.jl:291 with type MethodInstance for (NamedTuple{(), T} where T<:Tuple)(::Tuple{})
If a noninferrable argument is a type or function, Julia's specialization heuristics may be responsible.

2: var"#any#698"(dims, ::typeof(any), f::Function, a::AbstractArray) in Base at reducedim.jl:883 (1 callees from 1 callers)
./reducedim.jl:883: non-inferrable or unspecialized call, perhaps annotate any(f::Function, a::Vector{Any}; dims::Function) at reducedim.jl:883 with type MethodInstance for _any(::Test.var"#27#29", ::Vector{Any}, ::Colon)
If a noninferrable argument is a type or function, Julia's specialization heuristics may be responsible.

3: var"#printstyled#820"(bold::Bool, color::Union{Int64, Symbol}, ::typeof(printstyled), msg...) in Base at util.jl:107 (1 callees from 1 callers)
./util.jl:107: vararg caller and callee (uninferred) (options: ignore, homogenize the arguments, declare an umbrella type, or force-specialize the callee MethodInstance for (::Base.var"#printstyled##kw")(::NamedTuple{(:bold, :color), Tuple{Bool, Symbol}}, ::typeof(printstyled), ::Base.TTY, ::String, ::Vararg{String, N} where N) in the caller)

4: sym_paddedviews_itr(fillvalue, itr) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:324 (1 callees from 1 callers)
/home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:325: non-inferrable or unspecialized call with vararg callee, perhaps annotate sym_paddedviews_itr(fillvalue::Int64, itr::Vector{Matrix{Int64}}) at PaddedViews.jl:325 with type MethodInstance for outerinds(::Matrix{Int64}, ::Matrix{Int64})
If a noninferrable argument is a type or function, Julia's specialization heuristics may be responsible.

5: OffsetArray(A::AbstractArray, inds...) in OffsetArrays at /home/tim/.julia/dev/OffsetArrays/src/OffsetArrays.jl:195 (2 callees from 2 callers)
/home/tim/.julia/dev/OffsetArrays/src/OffsetArrays.jl:195: uninferred inlineable vararg caller (options: add relevant specialization, ignore)

6: _print_matrix(io, X::AbstractVecOrMat{T} where T, pre, sep, post, hdots, vdots, ddots, hmod, vmod, rowsA, colsA) in Base at arrayshow.jl:173 (2 callees from 1 callers)
./arrayshow.jl:201: non-inferrable or unspecialized call, perhaps annotate _print_matrix(io::IOContext{IOBuffer}, X::AbstractVecOrMat{T} where T, pre::String, sep::String, post::String, hdots::String, vdots::String, ddots::String, hmod::Int64, vmod::Int64, rowsA::UnitRange{Int64}, colsA::UnitRange{Int64}) at arrayshow.jl:201 with type MethodInstance for alignment(::IOContext{IOBuffer}, ::PaddedView{Int64, 2, Tuple{UnitRange{Int64}, UnitRange{Int64}}, Matrix{Int64}}, ::UnitRange{Int64}, ::UnitRange{Int64}, ::Int64, ::Int64, ::Int64)
If a noninferrable argument is a type or function, Julia's specialization heuristics may be responsible.

7: (::Base.var"#printstyled##kw")(::Any, ::typeof(printstyled), msg...) in Base at util.jl:107 (2 callees from 2 callers)
./util.jl:107: vararg caller and callee (uninferred) (options: ignore, homogenize the arguments, declare an umbrella type, or force-specialize the callee MethodInstance for var"#printstyled#820"(::Bool, ::Symbol, ::typeof(printstyled), ::String, ::Vararg{String, N} where N) in the caller)

8: collect_to!(dest::AbstractArray{T, N} where N, itr, offs, st) where T in Base at array.jl:719 (3 callees from 1 callers)
./generator.jl:47: Unspecialized or unknown for MethodInstance for (::PaddedViews.var"#5#6"{Int64, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}})(::LinearAlgebra.Adjoint{Float64, Vector{Float64}}) consider `stacktrace(itrig)` or `ascend(itrig)` to investigate more deeply

9: paddedviews_itr(fillvalue, itr) in PaddedViews at /home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:241 (3 callees from 1 callers)
/home/tim/.julia/dev/PaddedViews/src/PaddedViews.jl:242: non-inferrable or unspecialized call with vararg callee, perhaps annotate paddedviews_itr(fillvalue::Int64, itr::Vector{AbstractMatrix{T} where T}) at PaddedViews.jl:242 with type MethodInstance for outerinds(::Matrix{Int64}, ::LinearAlgebra.Adjoint{Float64, Vector{Float64}}, ::Vararg{Any, N} where N)
If a noninferrable argument is a type or function, Julia's specialization heuristics may be responsible.

10: collect(itr::Base.Generator) in Base at array.jl:672 (3 callees from 1 callers)
./generator.jl:47: Unspecialized or unknown for MethodInstance for (::PaddedViews.var"#5#6"{Int64, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}})(::Matrix{Int64}) consider `stacktrace(itrig)` or `ascend(itrig)` to investigate more deeply

11: vect(X...) in Base at array.jl:125 (3 callees from 1 callers)
./array.jl:126: vararg caller and callee (uninferred) (options: ignore, homogenize the arguments, declare an umbrella type, or force-specialize the callee MethodInstance for promote_typeof(::Matrix{Int64}, ::LinearAlgebra.Adjoint{Float64, Vector{Float64}}) in the caller)

Once #104 is addressed, this is basically what I'd try next until one gets to the state where JET can run this same example. Even with everything I've added (e.g., the isignorable stuff), I think most of the remainder is unfixable in the context of this package itself (Base might be a different story). SnoopCompile is only going to be able to catch a subset of what JET can detect, and even then SNR is a bit of a problem. (Still, 11 out of an initial 264 potential issues is a nice reduction.)

I'm suggesting PaddedViews simply because it's a package that has already gotten "the treatment" with SnoopCompile so it would be especially rewarding if JET discovered additional improvements. Obviously, it would be good to compare on packages that do have fixable issues; your README demo has examples of things that SnoopCompile can't catch.

aviatesk commented 3 years ago

I'm really glad to know you gave a try on this package ! I've always wanted to make more collaboration with other "code-analysis" tools, and yes, making a comparison would be the valuable first step. I'll definitely try to address #104 this weekend.

SnoopCompile is only going to be able to catch a subset of what JET can detect

I think JET won't cover all the code quality issues that SnoopCompile can detect, as far as SnoopCompile interacts with the actual runtime (at least in the near future). JET is "almost-static" code analyzer and it's supposed to only concretize toplevel definitions and such, and so if toplevel call signatures are hard to be inferred, then there will be many things that JET will miss while SnoopCompile can know without any problem. One of my ambitious goal of JET is to make it configurable so that users can specify "how much JET should concretize my code" and can use JET for various kinds of code (I'm thinking something like what explained in https://dl.acm.org/doi/10.1145/3290356). Once we can realize it, then we may be able to say "JET subsumes SnoopCompile's analysis features", but I think it won't be the very near future; my current highest priority lies in improving analysis accuracy and robustness for now..

timholy commented 3 years ago

Yeah, I agree, it's really interesting to look at both. Having SnoopCompile with access to the runtime has made me realize that even tools like Cthulhu are partially handicapped in terms of replicating what would actually happen in real-world usage. So you're right that there's stuff SnoopCompile can do that JET can't, though the converse is also true. I definitely would enjoy looking for any chances to collaborate, though of course since the modes of operation and data sources are quite different there may be fewer of those than one might hope.

Bottom line, if you see anything in SnoopCompile's code that you'd like factored out for use in JET, don't be shy about asking. And I'll keep playing with JET and getting to know its code base (time permitting) and do the same.

aviatesk commented 3 years ago

So now I believe #104 is fixed, and I got JET analysis result against the test file:

julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); using JET; @time JET.profile_file("test/runtests.jl")'

JET analysis result ``` ═════ 56 possible errors found ═════ ┌ @ test/runtests.jl:3 detect_ambiguities(Base, Core) │┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1468 Test.#detect_ambiguities#35(Core.tuple(false, false, #self#::typeof(Test.detect_ambiguities))::Tuple{Bool, Bool, typeof(Test.detect_ambiguities)}, mods::Tuple{Module, Module}...) ││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1511 examine::Test.var"#examine#37"{Bool, Bool, Vector{Module}, Test.var"#sortdefs#36", Set{Tuple{Method, Method}}}(Base.getproperty(Base.getproperty(Test.DataType, :name::Symbol)::Core.TypeName, :mt::Symbol)::Core.MethodTable) │││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1487 Base.iterate(ms::Union{Bool, Vector{Any}}, Core.getfield(_4::Tuple{Any, Union{Nothing, Int64}}, 2)::Union{Nothing, Int64}) ││││┌ @ array.jl:778 Base.%(i::Nothing, Base.UInt) │││││ no matching method found for call signature: Base.%(i::Nothing, Base.UInt) ││││└──────────────── ┌ @ test/runtests.jl:7 Test.do_test(_11::Union{Test.Returned, Test.Threw}, $(QuoteNode(:(isempty(setdiff(detect_ambiguities(PaddedViews, Base, Core), ambs)))))::Expr) │┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:557 Test.record(Test.get_testset()::Any, testres::Union{Test.Error, Test.Fail, Test.Pass}) ││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:811 Base.show_backtrace::typeof(Base.show_backtrace)(Test.stdout, Test.scrub_backtrace(Test.backtrace()::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}) │││┌ @ errorshow.jl:763 Base.process_backtrace(t::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}) ││││┌ @ errorshow.jl:830 #self#::typeof(Base.process_backtrace)(t::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}, Base.typemax(Base.Int)::Int64) │││││┌ @ errorshow.jl:830 Base.#process_backtrace#820(true, #self#::typeof(Base.process_backtrace), t::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}, limit::Int64) ││││││┌ @ errorshow.jl:869 Base._simplify_include_frames(ret::Vector{Any}) │││││││┌ @ errorshow.jl:801 Base.parentmodule(frame::Base.StackTraces.StackFrame) ││││││││┌ @ stacktraces.jl:273 Base.getproperty(Base.getproperty(frame::Base.StackTraces.StackFrame, :linfo::Symbol)::Union{Nothing, Core.CodeInfo, Core.MethodInstance}, :def::Symbol) │││││││││┌ @ Base.jl:33 Base.getfield(x::Nothing, f::Symbol) ││││││││││ invalid builtin function call: Base.getfield(x::Nothing, f::Symbol) │││││││││└────────────── │││┌ @ errorshow.jl:776 Base.show_reduced_backtrace(Base.IOContext(io::IO, Base.=>(:backtrace::Symbol, true)::Pair{Symbol, Bool})::IOContext, filtered::Vector{Any}) ││││┌ @ errorshow.jl:650 Base.print_stackframe(io::IOContext, frame_counter::Int64, frame::Any, n::Any, ndigits_max::Int64, modulecolordict::Dict{Module, Symbol}, modulecolorcycler::Base.Iterators.Stateful{Base.Iterators.Cycle{Vector{Symbol}}, Union{Nothing, Tuple{Symbol, Int64}}}) │││││┌ @ errorshow.jl:693 Base.print_stackframe(io::IOContext, i::Int64, frame::Base.StackTraces.StackFrame, n::Int64, digit_align_width::Int64, modulecolor::Symbol) ││││││┌ @ errorshow.jl:716 Base.StackTraces.show_spec_linfo::typeof(Base.StackTraces.show_spec_linfo)(Base.IOContext(io::IOContext, Base.=>(:backtrace::Symbol, true)::Pair{Symbol, Bool})::IOContext, frame::Base.StackTraces.StackFrame) │││││││┌ @ stacktraces.jl:239 Core.kwfunc(Base.show_tuple_as_call::typeof(Base.show_tuple_as_call))::Base.var"#show_tuple_as_call##kw"(Core.apply_type(Core.NamedTuple, (:demangle, :kwargs, :argnames)::Tuple{Symbol, Symbol, Symbol})::Type{NamedTuple{(:demangle, :kwargs, :argnames), T} where T<:Tuple}(Core.tuple(true, Base.StackTraces.zip(kwnames::Vector{Symbol}, kwarg_types::Vector{Any})::Base.Iterators.Zip{Tuple{Vector{Symbol}, Vector{Any}}}, Base.getindex(argnames::Vector{Symbol}, Base.StackTraces.:(Base.StackTraces.+(Base.getproperty(def::Method, :nkw::Symbol)::Int32, 2)::Int64, Base.lastindex(argnames::Vector{Symbol})::Int64)::UnitRange{Int64})::Vector{Symbol})::Tuple{Bool, Base.Iterators.Zip{Tuple{Vector{Symbol}, Vector{Any}}}, Vector{Symbol}})::NamedTuple{(:demangle, :kwargs, :argnames), Tuple{Bool, Base.Iterators.Zip{Tuple{Vector{Symbol}, Vector{Any}}}, Vector{Symbol}}}, Base.show_tuple_as_call::typeof(Base.show_tuple_as_call), io::IOContext, Base.getproperty(def::Method, :name::Symbol)::Symbol, pos_sig::Any) ││││││││┌ @ show.jl:2253 Base.#show_tuple_as_call#464(demangle::Bool, kwargs::Base.Iterators.Zip{Tuple{Vector{Symbol}, Vector{Any}}}, argnames::Vector{Symbol}, qualified::Bool, hasfirst::Bool, _3::typeof(Base.show_tuple_as_call), io::IOContext, name::Symbol, sig::Type) │││││││││┌ @ show.jl:2280 Base.print_type_stacktrace(env_io::IOContext, Base.getindex(sig::Core.SimpleVector, i::Int64)::Any) ││││││││││┌ @ show.jl:2299 Base.#print_type_stacktrace#465(:normal::Symbol, #self#::typeof(Base.print_type_stacktrace), io::IOContext, type::Any) │││││││││││┌ @ show.jl:2304 Base.prevind(str::String, i::Union{Nothing, Int64}) ││││││││││││ for one of the union split cases, no matching method found for signature: Base.prevind(str::String, i::Union{Nothing, Int64}) │││││││││││└──────────────── │││││││││││┌ @ show.jl:2305 Base.:(i::Union{Nothing, Int64}, Base.lastindex(str::String)::Int64) ││││││││││││ for one of the union split cases, no matching method found for signature: Base.:(i::Union{Nothing, Int64}, Base.lastindex(str::String)::Int64) │││││││││││└──────────────── │┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:554 Test.Error(:test_error::Symbol, orig_expr::Expr, Base.getproperty(result::Test.Threw, :exception::Symbol)::Any, Base.getproperty(result::Test.Threw, :backtrace::Symbol)::Any, Base.getproperty(result::Test.Threw, :source::Symbol)::LineNumberNode) ││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:166 Test.scrub_exc_stack(bt::Any) │││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:63 Test.scrub_backtrace(Base.getindex(x::Any, 2)::Any) ││││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:51 Test.findfirst(#3::Test.var"#3#5", bt::Any) │││││┌ @ array.jl:1911 Base.findnext(testf::Test.var"#3#5", A::Union{AbstractString, AbstractArray}, Base.first(Base.keys(A::Union{AbstractString, AbstractArray})::Any)::Any) ││││││┌ @ bitarray.jl:1471 Base._findnext_int(testf::Test.var"#3#5", B::BitArray, Base.Int(start::Integer)::Int64) │││││││┌ @ bitarray.jl:1473 testf::Test.var"#3#5"(false) ││││││││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:51 Test.ip_has_file_and_func(ip::Bool, "/Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl", (:do_test, :do_test_throws)::Tuple{Symbol, Symbol}) │││││││││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:47 Base.getproperty(Test.StackTraces, :lookup::Symbol)::typeof(Base.StackTraces.lookup)(ip::Bool) ││││││││││ no matching method found for call signature: Base.getproperty(Test.StackTraces, :lookup::Symbol)::typeof(Base.StackTraces.lookup)(ip::Bool) │││││││││└─────────────────────────────────────────────────────────────────────────────── ││││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:55 Test.findfirst(#4::Test.var"#4#6", bt::Any) │││││┌ @ array.jl:1911 Base.findnext(testf::Test.var"#4#6", A::Union{AbstractString, AbstractArray}, Base.first(Base.keys(A::Union{AbstractString, AbstractArray})::Any)::Any) ││││││┌ @ bitarray.jl:1471 Base._findnext_int(testf::Test.var"#4#6", B::BitArray, Base.Int(start::Integer)::Int64) │││││││┌ @ bitarray.jl:1473 testf::Test.var"#4#6"(false) ││││││││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:55 Test.ip_has_file_and_func(ip::Bool, "/Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl", Core.tuple(Test.Symbol("macro expansion")::Symbol)::Tuple{Symbol}) │││││││││┌ @ /Users/aviatesk/julia/julia/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:47 Base.getproperty(Test.StackTraces, :lookup::Symbol)::typeof(Base.StackTraces.lookup)(ip::Bool) ││││││││││ no matching method found for call signature: Base.getproperty(Test.StackTraces, :lookup::Symbol)::typeof(Base.StackTraces.lookup)(ip::Bool) │││││││││└─────────────────────────────────────────────────────────────────────────────── ┌ @ test/runtests.jl:129 Base.getproperty(Test.Base, :return_types::Symbol)::typeof(Base.return_types)(paddedviews, Base.getproperty(Test.Base, :typesof::Symbol)::typeof(Base.typesof)(args::Tuple{Int64, Matrix{Int64}, LinearAlgebra.Adjoint{Float64, Vector{Float64}}}...)::Type) │┌ @ reflection.jl:1214 #self#::typeof(Base.return_types)(f::typeof(PaddedViews.paddedviews), types::Type, Base.getproperty(Core.Compiler::Module, :NativeInterpreter::Symbol)::Type{Core.Compiler.NativeInterpreter}()::Core.Compiler.NativeInterpreter) ││┌ @ reflection.jl:1223 Base.getproperty(Core.Compiler::Module, :typeinf_type::Symbol)::typeof(Core.Compiler.typeinf_type)(interp::Core.Compiler.NativeInterpreter, meth::Method, Base.getproperty(match::Any, :spec_types::Symbol)::Any, Base.getproperty(match::Any, :sparams::Symbol)::Any) │││┌ @ compiler/typeinfer.jl:919 Core.Compiler.typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceResult, true) ││││┌ @ compiler/typeinfer.jl:8 Core.Compiler.typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState) │││││┌ @ compiler/typeinfer.jl:209 Core.Compiler._typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState) ││││││┌ @ compiler/typeinfer.jl:244 Core.Compiler.optimize(interp::Core.Compiler.NativeInterpreter, opt::Core.Compiler.OptimizationState, Core.Compiler.OptimizationParams(interp::Core.Compiler.NativeInterpreter)::Core.Compiler.OptimizationParams, result_type::Any) │││││││┌ @ compiler/optimize.jl:272 Core.Compiler.run_passes(Core.Compiler.getproperty(opt::Core.Compiler.OptimizationState, :src::Symbol)::Core.CodeInfo, nargs::Int64, opt::Core.Compiler.OptimizationState) ││││││││┌ @ compiler/ssair/driver.jl:129 Core.Compiler.ssa_inlining_pass!(ir::Core.Compiler.IRCode, Core.Compiler.getproperty(ir::Core.Compiler.IRCode, :linetable::Symbol)::Vector{Core.LineInfoNode}, Core.Compiler.getproperty(sv::Core.Compiler.OptimizationState, :inlining::Symbol)::Core.Compiler.InliningState, Core.Compiler.getproperty(ci::Core.CodeInfo, :propagate_inbounds::Symbol)::Bool) │││││││││┌ @ compiler/ssair/inlining.jl:72 Core.Compiler.assemble_inline_todo!(ir::Core.Compiler.IRCode, state::Core.Compiler.InliningState) ││││││││││┌ @ compiler/ssair/inlining.jl:1262 Core.Compiler.UnionSplitSignature(Core.Compiler.getproperty(sig::Core.Compiler.Signature, :atypes::Symbol)::Vector{Any}) │││││││││││┌ @ compiler/ssair/inlining.jl:844 Core.Compiler.setindex!(_11::Vector{Core.Compiler.UnitRange{Int64}}, Core.Compiler.:(1, Core.Compiler.length(Core.Compiler.getindex(typs::Vector{Any}, i::Int64)::Any)::Any)::Any, _10::Int64) ││││││││││││┌ @ array.jl:840 Core.Compiler.convert(_::Type{Core.Compiler.UnitRange{Int64}}, x::Any) │││││││││││││┌ @ range.jl:215 _::Type{Core.Compiler.UnitRange{Int64}}(r::Core.Compiler.AbstractRange) ││││││││││││││┌ @ range.jl:1026 Core.apply_type(Core.Compiler.UnitRange, _::Type{Int64})::Type{Core.Compiler.UnitRange{Int64}}(Core.Compiler.getproperty(r::Core.Compiler.UnitRange, :start::Symbol)::Real, Core.Compiler.getproperty(r::Core.Compiler.UnitRange, :stop::Symbol)::Real) │││││││││││││││┌ @ range.jl:354 Core.Compiler.unitrange_last(start::Real, stop::Real) ││││││││││││││││┌ @ range.jl:359 Core.Compiler.-(stop::Integer, start::Integer) │││││││││││││││││┌ @ int.jl:924 Core.Compiler.not_sametype(Core.tuple(a::Integer, b::Integer)::Tuple{Integer, Integer}, Core.tuple(aT::Any, bT::Any)::Tuple{Any, Any}) ││││││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Integer, Integer}) │││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, Integer})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, Integer})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││││││└──────────────────── ││││││││││┌ @ compiler/ssair/inlining.jl:1213 Core.Compiler.process_simple!(ir::Core.Compiler.IRCode, todo::Vector{Core.Compiler.Pair{Int64, Any}}, idx::Int64, state::Core.Compiler.InliningState) │││││││││││┌ @ compiler/ssair/inlining.jl:1053 Core.Compiler.inline_apply!(ir::Core.Compiler.IRCode, todo::Vector{Core.Compiler.Pair{Int64, Any}}, idx::Int64, sig::Core.Compiler.Signature, Core.Compiler.getproperty(state::Core.Compiler.InliningState, :et::Symbol)::Union{Nothing, Core.Compiler.EdgeTracker}, Core.Compiler.getproperty(state::Core.Compiler.InliningState, :caches::Symbol)::Union{Nothing, Core.Compiler.InferenceCaches}, Core.Compiler.getproperty(state::Core.Compiler.InliningState, :params::Symbol)::Core.Compiler.OptimizationParams) ││││││││││││┌ @ compiler/ssair/inlining.jl:1003 Core.Compiler.rewrite_apply_exprargs!(ir::Core.Compiler.IRCode, todo::Vector{Core.Compiler.Pair{Int64, Any}}, idx::Int64, Core.Compiler.getproperty(stmt::Any, :args::Symbol)::Any, atypes::Vector{Any}, infos::Vector{Any}, arg_start::Int64, et::Nothing, caches::Core.Compiler.InferenceCaches, params::Core.Compiler.OptimizationParams) │││││││││││││┌ @ compiler/ssair/inlining.jl:639 Core.Compiler.handle_const_call!(ir::Core.Compiler.IRCode, Core.Compiler.getproperty(state1::Core.SSAValue, :id::Symbol)::Int64, new_stmt::Expr, Core.Compiler.getproperty(call::Any, :info::Symbol)::Any, new_sig::Core.Compiler.Signature, Core.Compiler.getproperty(call::Any, :rt::Symbol)::Any, et::Nothing, caches::Core.Compiler.InferenceCaches, false, todo::Vector{Core.Compiler.Pair{Int64, Any}}) ││││││││││││││┌ @ compiler/ssair/inlining.jl:1193 Core.Compiler.resolve_todo(item::Core.Compiler.InliningTodo, et::Nothing, caches::Core.Compiler.InferenceCaches) │││││││││││││││┌ @ compiler/ssair/inlining.jl:704 Core.Compiler.compileable_specialization(et::Nothing, Core.Compiler.getproperty(spec::Core.Compiler.DelayedInliningSpec, :match::Symbol)::Union{Core.Compiler.InferenceResult, Core.MethodMatch}) ││││││││││││││││┌ @ compiler/ssair/inlining.jl:687 Core.Compiler.specialize_method(Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :def::Symbol)::Union{Method, Module}, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :specTypes::Symbol)::Any, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :sparam_vals::Symbol)::Core.SimpleVector, false, true) │││││││││││││││││ for one of the union split cases, no matching method found for signature: Core.Compiler.specialize_method(Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :def::Symbol)::Union{Method, Module}, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :specTypes::Symbol)::Any, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :sparam_vals::Symbol)::Core.SimpleVector, false, true) ││││││││││││││││└────────────────────────────────── ││││││││││││││││┌ @ range.jl:359 Core.Compiler.oneunit(Core.Compiler.-(stop::Integer, start::Integer)::Any) │││││││││││││││││┌ @ array.jl:528 Core.Compiler._one(Core.Compiler.oneunit(_::Any)::Any, x::AbstractMatrix{T} where T) ││││││││││││││││││┌ @ array.jl:522 Core.Compiler.setindex!(I::Array, unit::Any, i::Any, i::Any) │││││││││││││││││││┌ @ abstractarray.jl:1267 Core.Compiler._setindex!(Core.tuple(Core.Compiler.IndexStyle(A::Array)::Core.Compiler.IndexLinear, A::Array, v::Any)::Tuple{Core.Compiler.IndexLinear, Array, Any}, Core.Compiler.to_indices(A::Array, I::Tuple{Any, Any})::Tuple{Any, Any}...) ││││││││││││││││││││┌ @ abstractarray.jl:1282 Core.Compiler.string("setindex! for ", Core.Compiler.typeof(A::Array)::Type{Array{T, N}} where {T, N}, " with types ", Core.Compiler.typeof(I::Tuple{Any, Any})::Type{var"#s459"} where var"#s459"<:Tuple{Any, Any}, " is not supported") │││││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("setindex! for ", Core.Compiler.typeof(A::Array)::Type{Array{T, N}} where {T, N}, " with types ", Core.Compiler.typeof(I::Tuple{Any, Any})::Type{var"#s459"} where var"#s459"<:Tuple{Any, Any}, " is not supported") ││││││││││││││││││││└───────────────────────── ││││┌ @ compiler/typeinfer.jl:5 Core.Compiler.InferenceState(result::Core.Compiler.InferenceResult, cached::Bool, interp::Core.Compiler.NativeInterpreter) │││││┌ @ compiler/inferencestate.jl:133 Core.Compiler.validate_code_in_debug_mode(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, src::Core.CodeInfo, "lowered") ││││││┌ @ compiler/validation.jl:62 Core.Compiler.validate_code(linfo::Core.MethodInstance, src::Core.CodeInfo) │││││││┌ @ compiler/validation.jl:220 Core.Compiler.validate_code!(Core.tuple(Core.apply_type(Core.Compiler.Vector, Core.Compiler.InvalidCodeError)::Type{Vector{Core.Compiler.InvalidCodeError}}()::Vector{Core.Compiler.InvalidCodeError})::Tuple{Vector{Core.Compiler.InvalidCodeError}}, args::Tuple{Core.MethodInstance, Core.CodeInfo}...) ││││││││┌ @ compiler/validation.jl:215 Core.Compiler.validate_code!(errors::Vector{Core.Compiler.InvalidCodeError}, c::Core.CodeInfo, is_top_level::Bool) │││││││││┌ @ compiler/validation.jl:122 Core.Compiler.==(narg_bounds::Core.Compiler.UnitRange, Core.Compiler.:(-1, -1)::Core.Compiler.UnitRange{Int64}) ││││││││││┌ @ range.jl:869 Core.Compiler.==(Core.Compiler.first(r::Core.Compiler.UnitRange)::Any, Core.Compiler.first(s::Core.Compiler.UnitRange{Int64})::Int64) │││││││││││┌ @ promotion.jl:359 Core.Compiler.promote(x::Number, y::Int64) ││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Number, y::Int64)::Tuple{Number, Int64}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) │││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Number, Int64}) ││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Number, Int64})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Number, Int64})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││└──────────────────── ││││││││││┌ @ range.jl:869 Core.Compiler.&(Core.Compiler._has_length_one(s::Core.Compiler.UnitRange{Int64})::Bool, Core.Compiler.==(Core.Compiler.first(r::Core.Compiler.UnitRange)::Any, Core.Compiler.first(s::Core.Compiler.UnitRange{Int64})::Int64)::Any) │││││││││││┌ @ int.jl:924 Core.Compiler.not_sametype(Core.tuple(a::Bool, b::Integer)::Tuple{Bool, Integer}, Core.tuple(aT::Any, bT::Any)::Tuple{Any, Any}) ││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Bool, Integer}) │││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Bool, Integer})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Bool, Integer})::Tuple{Any, Any}, ", ", " and ") │││││││││││││└──────────────────── ││││││││┌ @ compiler/ssair/driver.jl:125 Core.Compiler.slot2reg(ir::Core.Compiler.IRCode, ci::Core.CodeInfo, nargs::Int64, sv::Core.Compiler.OptimizationState) │││││││││┌ @ compiler/ssair/driver.jl:116 Core.Compiler.construct_domtree(Core.Compiler.getproperty(Core.Compiler.getproperty(ir::Core.Compiler.IRCode, :cfg::Symbol)::Core.Compiler.CFG, :blocks::Symbol)::Vector{Core.Compiler.BasicBlock}) ││││││││││┌ @ compiler/ssair/domtree.jl:204 Core.Compiler.update_domtree!(blocks::Vector{Core.Compiler.BasicBlock}, Core.Compiler.DomTree()::Core.Compiler.DomTree, true, 0) │││││││││││┌ @ compiler/ssair/domtree.jl:210 Core.Compiler.DFS!(Core.Compiler.getproperty(domtree::Core.Compiler.DomTree, :dfs_tree::Symbol)::Core.Compiler.DFSTree, blocks::Vector{Core.Compiler.BasicBlock}) ││││││││││││┌ @ compiler/ssair/domtree.jl:113 Core.Compiler.copy!(D::Core.Compiler.DFSTree, Core.Compiler.DFSTree(Core.Compiler.length(blocks::Vector{Core.Compiler.BasicBlock})::Int64)::Core.Compiler.DFSTree) │││││││││││││┌ @ compiler/ssair/domtree.jl:102 Core.Compiler.copy!(Core.Compiler.getproperty(dst::Core.Compiler.DFSTree, :to_pre::Symbol)::Vector{Int64}, Core.Compiler.getproperty(src::Core.Compiler.DFSTree, :to_pre::Symbol)::Vector{Int64}) ││││││││││││││┌ @ abstractarray.jl:826 Core.Compiler.eachindex(dst::Vector{Int64}, src::Vector{Int64}) │││││││││││││││┌ @ abstractarray.jl:305 Core.Compiler.eachindex(Core.Compiler.IndexStyle(A::Vector{Int64}, B::Vector{Int64})::Core.Compiler.IndexLinear, A::Vector{Int64}, B::Vector{Int64}) ││││││││││││││││┌ @ abstractarray.jl:316 Core.Compiler.throw_eachindex_mismatch_indices(Core.tuple(Core.Compiler.IndexLinear()::Core.Compiler.IndexLinear, Core.Compiler.eachindex(A::Vector{Int64})::Core.Compiler.OneTo{Int64})::Tuple{Core.Compiler.IndexLinear, Core.Compiler.OneTo{Int64}}, Core.Compiler.materialize(Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Int64}})::Any)::Any...) │││││││││││││││││┌ @ abstractarray.jl:260 Core.Compiler.string("all inputs to eachindex must have the same indices, got ", Core.Compiler.join(inds::Tuple{Core.Compiler.OneTo{Int64}, Vararg{Any}}, ", ", " and ")::Any) ││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("all inputs to eachindex must have the same indices, got ", Core.Compiler.join(inds::Tuple{Core.Compiler.OneTo{Int64}, Vararg{Any}}, ", ", " and ")::Any) │││││││││││││││││└──────────────────────── │││┌ @ compiler/typeinfer.jl:918 Core.Compiler.InferenceResult(mi::Core.MethodInstance) ││││┌ @ compiler/types.jl:33 #self#::Type{Core.Compiler.InferenceResult}(linfo::Core.MethodInstance, Core.Compiler.nothing) │││││┌ @ compiler/types.jl:33 Core.Compiler.matching_cache_argtypes(linfo::Core.MethodInstance, given_argtypes::Nothing) ││││││┌ @ compiler/inferenceresult.jl:141 Core.Compiler.falses(Core.Compiler.length(cache_argtypes::Vector{Any})::Int64) │││││││┌ @ bitarray.jl:403 Core.Compiler.falses(dims::Tuple{Int64}) ││││││││┌ @ bitarray.jl:405 Core.Compiler.BitArray(Core.Compiler.undef, dims::Tuple{Int64}) │││││││││┌ @ bitarray.jl:71 Core.apply_type(Core.Compiler.BitArray, _::Int64)::Type{Core.Compiler.BitArray{1}}(Core.tuple(Core.Compiler.undef)::Tuple{UndefInitializer}, Core.Compiler.map(Core.Compiler.Int, dims::Tuple{Int64})::Tuple{Int64}...) ││││││││││┌ @ bitarray.jl:32 Core.Compiler.string("dimension size must be ≥ 0, got ", d::Int64, " for dimension ", i::Int64) │││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("dimension size must be ≥ 0, got ", d::Int64, " for dimension ", i::Int64) ││││││││││└────────────────── │││││┌ @ compiler/inferencestate.jl:131 Core.Compiler.retrieve_code_info(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance) ││││││┌ @ compiler/utilities.jl:131 Core.Compiler.get_staged(linfo::Core.MethodInstance) │││││││┌ @ compiler/utilities.jl:116 Core.Compiler.may_invoke_generator(mi::Core.MethodInstance) ││││││││┌ @ reflection.jl:1082 Core.Compiler.may_invoke_generator(Core.typeassert(Core.Compiler.getproperty(method::Core.MethodInstance, :def::Symbol)::Union{Method, Module}, Core.Compiler.Method)::Method, Core.Compiler.getproperty(method::Core.MethodInstance, :specTypes::Symbol)::Any, Core.Compiler.getproperty(method::Core.MethodInstance, :sparam_vals::Symbol)::Core.SimpleVector) │││││││││┌ @ reflection.jl:1096 Core.Compiler.methods(Core.Compiler.getproperty(generator::Core.GeneratedFunctionStub, :gen::Symbol)::Any) ││││││││││┌ @ reflection.jl:963 #self#::typeof(Core.Compiler.methods)(f::Any, Core.Compiler.nothing) │││││││││││┌ @ reflection.jl:963 Core.Compiler.methods(f::Any, Core.apply_type(Core.Compiler.Tuple, Core.apply_type(Core.Compiler.Vararg, Core.Compiler.Any)::Core.TypeofVararg)::Type{Tuple}, mod::Nothing) ││││││││││││┌ @ reflection.jl:942 Core.Compiler.iterate(Core.Compiler._methods(f::Any, t::Type{Tuple}, -1, world::UInt64)::Union{Bool, Vector{Any}}, Core.getfield(_5::Tuple{Any, Union{Nothing, Int64}}, 2)::Union{Nothing, Int64}) │││││││││││││┌ @ array.jl:778 Core.Compiler.%(i::Nothing, Core.Compiler.UInt) ││││││││││││││ no matching method found for call signature: Core.Compiler.%(i::Nothing, Core.Compiler.UInt) │││││││││││││└──────────────── │││││││││┌ @ compiler/ssair/driver.jl:118 Core.Compiler.construct_ssa!(ci::Core.CodeInfo, ir::Core.Compiler.IRCode, domtree::Core.Compiler.DomTree, defuse_insts::Vector{Core.Compiler.SlotInfo}, nargs::Int64, Core.Compiler.getproperty(sv::Core.Compiler.OptimizationState, :slottypes::Symbol)::Vector{Any}) ││││││││││┌ @ compiler/ssair/slot2ssa.jl:898 Core.Compiler.domsort_ssa!(ir::Core.Compiler.IRCode, domtree::Core.Compiler.DomTree) │││││││││││┌ @ compiler/ssair/slot2ssa.jl:396 Core.Compiler.sort(Core.Compiler.filter(#326::Core.Compiler.var"#326#333"{Int64}, cs::Vector{Int64})::Vector{Int64}) ││││││││││││┌ @ sort.jl:794 Core.Compiler.Sort.#sort#9(Core.Compiler.pairs(Core.NamedTuple()::NamedTuple{(), Tuple{}})::Core.Compiler.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, #self#::typeof(Core.Compiler.sort), v::Vector{Int64}) │││││││││││││┌ @ sort.jl:794 Core.Compiler.Sort.sort!(Core.Compiler.Sort.copymutable(v::Vector{Int64})::Vector{Int64}) ││││││││││││││┌ @ sort.jl:735 Core.Compiler.Sort.#sort!#8(Core.Compiler.Sort.defalg(v::Vector{Int64})::Core.Compiler.Sort.QuickSortAlg, Core.Compiler.Sort.isless, Core.Compiler.Sort.identity, Core.Compiler.Sort.nothing, Core.Compiler.Sort.Forward, #self#::typeof(Core.Compiler.sort!), v::Vector{Int64}) │││││││││││││││┌ @ sort.jl:743 Core.Compiler.Sort.sort_int_range!(v::Vector{Int64}, rangelen::Int64, min::Int64, _21::typeof(Core.Compiler.identity)) ││││││││││││││││┌ @ sort.jl:764 Core.Compiler.setindex!(x::Vector{Int64}, val::Int64, j::Any) │││││││││││││││││┌ @ abstractarray.jl:1267 Core.Compiler._setindex!(Core.tuple(Core.Compiler.IndexStyle(A::Vector{Int64})::Core.Compiler.IndexLinear, A::Vector{Int64}, v::Int64)::Tuple{Core.Compiler.IndexLinear, Vector{Int64}, Int64}, Core.Compiler.to_indices(A::Vector{Int64}, I::Tuple{Any})::Tuple{Any}...) ││││││││││││││││││┌ @ abstractarray.jl:1282 Core.Compiler.string("setindex! for ", Core.Compiler.typeof(A::Vector{Int64})::Type{Vector{Int64}}, " with types ", Core.Compiler.typeof(I::Tuple{Any})::Type{var"#s459"} where var"#s459"<:Tuple{Any}, " is not supported") │││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("setindex! for ", Core.Compiler.typeof(A::Vector{Int64})::Type{Vector{Int64}}, " with types ", Core.Compiler.typeof(I::Tuple{Any})::Type{var"#s459"} where var"#s459"<:Tuple{Any}, " is not supported") ││││││││││││││││││└───────────────────────── │││││││││││┌ @ compiler/ssair/domtree.jl:218 Core.Compiler.compute_domtree_nodes!(domtree::Core.Compiler.DomTree) ││││││││││││┌ @ compiler/ssair/domtree.jl:224 Core.Compiler.copy!(Core.Compiler.getproperty(domtree::Core.Compiler.DomTree, :nodes::Symbol)::Vector{Core.Compiler.DomTreeNode}, _6::Vector{Core.Compiler.DomTreeNode}) │││││││││││││┌ @ abstractarray.jl:826 Core.Compiler.eachindex(dst::Vector{Core.Compiler.DomTreeNode}, src::Vector{Core.Compiler.DomTreeNode}) ││││││││││││││┌ @ abstractarray.jl:305 Core.Compiler.eachindex(Core.Compiler.IndexStyle(A::Vector{Core.Compiler.DomTreeNode}, B::Vector{Core.Compiler.DomTreeNode})::Core.Compiler.IndexLinear, A::Vector{Core.Compiler.DomTreeNode}, B::Vector{Core.Compiler.DomTreeNode}) │││││││││││││││┌ @ abstractarray.jl:316 Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Core.Compiler.DomTreeNode}}) ││││││││││││││││ variable Core.Compiler.broadcasted is not defined: Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Core.Compiler.DomTreeNode}}) │││││││││││││││└──────────────────────── ││││││││││││││││││┌ @ array.jl:516 Core.Compiler.require_one_based_indexing(x::AbstractMatrix{T} where T) │││││││││││││││││││┌ @ abstractarray.jl:103 Core.Compiler.has_offset_axes(A::Tuple{AbstractMatrix{T} where T}...) ││││││││││││││││││││┌ @ abstractarray.jl:99 Core.Compiler.axes(A::AbstractMatrix{T} where T) │││││││││││││││││││││┌ @ abstractarray.jl:89 Core.Compiler.map(Core.Compiler.oneto, Core.Compiler.size(A::AbstractMatrix{T} where T)::Tuple{Any, Any}) ││││││││││││││││││││││┌ @ tuple.jl:214 f::typeof(Core.Compiler.oneto)(Core.Compiler.getindex(t::Tuple{Any, Any}, 1)::Any) │││││││││││││││││││││││┌ @ range.jl:406 Core.Compiler.OneTo(r::Any) ││││││││││││││││││││││││┌ @ range.jl:404 Core.apply_type(Core.Compiler.OneTo, _::Type{T} where T<:Integer)::Type{Core.Compiler.OneTo{_A}} where _A(stop::Integer) │││││││││││││││││││││││││┌ @ range.jl:395 Core.Compiler.max(Core.Compiler.zero(_::Type{T} where T<:Integer)::Any, stop::Integer) ││││││││││││││││││││││││││┌ @ operators.jl:476 Core.Compiler.isless(y::Integer, x::Any) │││││││││││││││││││││││││││┌ @ operators.jl:168 Core.Compiler.<(x::Integer, y::AbstractFloat) ││││││││││││││││││││││││││││┌ @ promotion.jl:360 Core.Compiler.promote(x::Integer, y::AbstractFloat) │││││││││││││││││││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Integer, y::AbstractFloat)::Tuple{Integer, AbstractFloat}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││││││││││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Integer, AbstractFloat}) │││││││││││││││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, AbstractFloat})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, AbstractFloat})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││││││││││││││││││└──────────────────── ││││││││┌ @ compiler/validation.jl:209 Core.Compiler.!=(n_sig_params::Any, mnargs::Int32) │││││││││┌ @ operators.jl:261 Core.Compiler.==(x::Any, y::Int32) ││││││││││┌ @ promotion.jl:359 Core.Compiler.promote(x::Number, y::Int32) │││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Number, y::Int32)::Tuple{Number, Int32}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Number, Int32}) │││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Number, Int32})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Number, Int32})::Tuple{Any, Any}, ", ", " and ") │││││││││││││└──────────────────── │││││││││┌ @ compiler/validation.jl:124 Core.Compiler.in(nargs::Int64, narg_bounds::Core.Compiler.UnitRange) ││││││││││┌ @ range.jl:1149 Core.Compiler._in_range(x::Int64, r::Core.Compiler.UnitRange) │││││││││││┌ @ range.jl:1145 Core.Compiler.+(Core.Compiler.round(Core.Compiler.Integer, Core.Compiler./(Core.Compiler.-(x::Int64, Core.Compiler.first(r::Core.Compiler.UnitRange)::Any)::Any, Core.Compiler.step(r::Core.Compiler.UnitRange)::Any)::Any)::Integer, 1) ││││││││││││┌ @ int.jl:924 Core.Compiler.not_sametype(Core.tuple(a::Integer, b::Int64)::Tuple{Integer, Int64}, Core.tuple(aT::Any, bT::Any)::Tuple{Any, Any}) │││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Integer, Int64}) ││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, Int64})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, Int64})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││└──────────────────── ││││││││││││┌ @ compiler/ssair/inlining.jl:1003 Core.Compiler.rewrite_apply_exprargs!(ir::Core.Compiler.IRCode, todo::Vector{Core.Compiler.Pair{Int64, Any}}, idx::Int64, Core.Compiler.getproperty(stmt::Any, :args::Symbol)::Any, atypes::Vector{Any}, infos::Vector{Any}, arg_start::Int64, et::Core.Compiler.EdgeTracker, caches::Core.Compiler.InferenceCaches, params::Core.Compiler.OptimizationParams) │││││││││││││┌ @ compiler/ssair/inlining.jl:639 Core.Compiler.handle_const_call!(ir::Core.Compiler.IRCode, Core.Compiler.getproperty(state1::Core.SSAValue, :id::Symbol)::Int64, new_stmt::Expr, Core.Compiler.getproperty(call::Any, :info::Symbol)::Any, new_sig::Core.Compiler.Signature, Core.Compiler.getproperty(call::Any, :rt::Symbol)::Any, et::Core.Compiler.EdgeTracker, caches::Core.Compiler.InferenceCaches, false, todo::Vector{Core.Compiler.Pair{Int64, Any}}) ││││││││││││││┌ @ compiler/ssair/inlining.jl:1193 Core.Compiler.resolve_todo(item::Core.Compiler.InliningTodo, et::Core.Compiler.EdgeTracker, caches::Core.Compiler.InferenceCaches) │││││││││││││││┌ @ compiler/ssair/inlining.jl:704 Core.Compiler.compileable_specialization(et::Core.Compiler.EdgeTracker, Core.Compiler.getproperty(spec::Core.Compiler.DelayedInliningSpec, :match::Symbol)::Union{Core.Compiler.InferenceResult, Core.MethodMatch}) ││││││││││││││││┌ @ compiler/ssair/inlining.jl:687 Core.Compiler.specialize_method(Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :def::Symbol)::Union{Method, Module}, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :specTypes::Symbol)::Any, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :sparam_vals::Symbol)::Core.SimpleVector, false, true) │││││││││││││││││ for one of the union split cases, no matching method found for signature: Core.Compiler.specialize_method(Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :def::Symbol)::Union{Method, Module}, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :specTypes::Symbol)::Any, Core.Compiler.getproperty(Core.Compiler.getproperty(result::Core.Compiler.InferenceResult, :linfo::Symbol)::Core.MethodInstance, :sparam_vals::Symbol)::Core.SimpleVector, false, true) ││││││││││││││││└────────────────────────────────── ││││││││││││││││││││││││┌ @ range.jl:405 Core.apply_type(Core.Compiler.OneTo, _::Type{T} where T<:Integer)::Type{Core.Compiler.OneTo{_A}} where _A(r::Core.Compiler.AbstractRange{T} where T<:Integer) │││││││││││││││││││││││││┌ @ range.jl:400 throwstep::Core.Compiler.var"#throwstep#57"(r::Core.Compiler.AbstractRange{T} where T<:Integer) ││││││││││││││││││││││││││┌ @ range.jl:398 Core.Compiler.string("step must be 1, got ", Core.Compiler.step(r::Core.Compiler.AbstractRange{T} where T<:Integer)::Any) │││││││││││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("step must be 1, got ", Core.Compiler.step(r::Core.Compiler.AbstractRange{T} where T<:Integer)::Any) ││││││││││││││││││││││││││└──────────────── │││││││││││││┌ @ promotion.jl:315 Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Number, Int32}) ││││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{Number, Int32}, 2)::Int32) │││││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::Int32)::Type{Int32}) ││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::Int32)::Type{Int32}) │││││││││││││││└──────────────────── ││││││││││││││││││││┌ @ abstractarray.jl:1289 Core.Compiler.checkbounds(Core.tuple(A::Array)::Tuple{Array}, I::Tuple{Int64, Int64}...) │││││││││││││││││││││┌ @ abstractarray.jl:616 Core.Compiler.checkbounds(Core.tuple(Core.Compiler.Bool, A::Array)::Tuple{DataType, Array}, I::Tuple{Int64, Int64}...) ││││││││││││││││││││││┌ @ abstractarray.jl:595 Core.Compiler.checkbounds_indices(Core.Compiler.Bool, Core.Compiler.axes(A::Array)::Any, I::Tuple{Int64, Int64}) │││││││││││││││││││││││┌ @ abstractarray.jl:642 Core.Compiler.checkbounds_indices(Core.Compiler.Bool, Core.Compiler.tail(IA::Tuple)::Tuple, Core.Compiler.tail(I::Tuple{Int64, Int64})::Tuple{Int64}) ││││││││││││││││││││││││┌ @ abstractarray.jl:642 Core.Compiler.checkbounds_indices(Core.Compiler.Bool, Core.Compiler.tail(IA::Tuple)::Tuple, Core.Compiler.tail(I::Tuple{Int64})::Tuple{}) │││││││││││││││││││││││││┌ @ abstractarray.jl:648 Core.Compiler.all(#121::Core.Compiler.var"#121#122", IA::Tuple) ││││││││││││││││││││││││││ no matching method found for call signature: Core.Compiler.all(#121::Core.Compiler.var"#121#122", IA::Tuple) │││││││││││││││││││││││││└──────────────────────── ││││││││││││││││││││││││││┌ @ promotion.jl:369 Core.Compiler.max(Core.Compiler.promote(x::Real, y::Integer)::Tuple{Any, Any}...) │││││││││││││││││││││││││││┌ @ promotion.jl:369 Core.Compiler.promote(x::Real, y::Real) ││││││││││││││││││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Real, y::Real)::Tuple{Real, Real}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) │││││││││││││││││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Real, Real}) ││││││││││││││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Real, Real})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Real, Real})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││││││││││││││││└──────────────────── │││││││││││││││││││││││││││┌ @ operators.jl:168 Core.Compiler.isnan(x::Integer) ││││││││││││││││││││││││││││ variable Core.Compiler.isnan is not defined: Core.Compiler.isnan(x::Integer) │││││││││││││││││││││││││││└──────────────────── ││││││││││││││││┌ @ abstractarray.jl:316 Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Int64}}) │││││││││││││││││ variable Core.Compiler.broadcasted is not defined: Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Int64}}) ││││││││││││││││└──────────────────────── │││││││││││││││││││││││││││┌ @ operators.jl:168 Core.Compiler.signless(x::Integer, y::AbstractFloat) ││││││││││││││││││││││││││││┌ @ operators.jl:126 Core.Compiler.signbit(y::AbstractFloat) │││││││││││││││││││││││││││││┌ @ number.jl:128 Core.Compiler.<(x::AbstractFloat, 0) ││││││││││││││││││││││││││││││┌ @ promotion.jl:360 Core.Compiler.promote(x::AbstractFloat, y::Int64) │││││││││││││││││││││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::AbstractFloat, y::Int64)::Tuple{AbstractFloat, Int64}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││││││││││││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{AbstractFloat, Int64}) │││││││││││││││││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{AbstractFloat, Int64})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{AbstractFloat, Int64})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││││││││││││││││││││└──────────────────── │││││││││││││││││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{AbstractFloat, Int64}) ││││││││││││││││││││││││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{AbstractFloat, Int64}, 1)::AbstractFloat) │││││││││││││││││││││││││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::AbstractFloat)::Type{var"#s459"} where var"#s459"<:AbstractFloat) ││││││││││││││││││││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::AbstractFloat)::Type{var"#s459"} where var"#s459"<:AbstractFloat) │││││││││││││││││││││││││││││││││││└──────────────────── ││││││││┌ @ compiler/ssair/driver.jl:142 Core.Compiler.verify_ir(ir::Core.Compiler.IRCode) │││││││││┌ @ compiler/ssair/verify.jl:67 #self#::typeof(Core.Compiler.verify_ir)(ir::Core.Compiler.IRCode, true) ││││││││││┌ @ compiler/ssair/verify.jl:114 Core.Compiler.!=(Core.Compiler.getproperty(block::Core.Compiler.BasicBlock, :succs::Symbol)::Vector{Int64}, Core.Compiler.vect(Core.Compiler.getindex(Core.Compiler.getproperty(terminator::Any, :args::Symbol)::Any, 1)::Any, Core.Compiler.+(idx::Int64, 1)::Int64)::Vector{_A} where _A) │││││││││││┌ @ operators.jl:261 Core.Compiler.!(Core.Compiler.==(x::Vector{Int64}, y::Vector{_A} where _A)::Union{Core.Compiler.Missing, Bool}) ││││││││││││ for one of the union split cases, no matching method found for signature: Core.Compiler.!(Core.Compiler.==(x::Vector{Int64}, y::Vector{_A} where _A)::Union{Core.Compiler.Missing, Bool}) │││││││││││└──────────────────── │││││││││││││││││┌ @ abstractarray.jl:1267 Core.Compiler.to_indices(A::Vector{Int64}, I::Tuple{Any}) ││││││││││││││││││┌ @ indices.jl:330 Core.Compiler.to_indices(A::Vector{Int64}, ()::Tuple{}, I::Tuple{Integer}) │││││││││││││││││││┌ @ indices.jl:333 Core.Compiler.to_index(A::Vector{Int64}, Core.Compiler.getindex(I::Tuple{Integer}, 1)::Integer) ││││││││││││││││││││┌ @ indices.jl:277 Core.Compiler.to_index(i::Integer) │││││││││││││││││││││┌ @ indices.jl:293 Core.Compiler.string("invalid index: ", i::Bool, " of type Bool") ││││││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("invalid index: ", i::Bool, " of type Bool") │││││││││││││││││││││└────────────────── │││││││││││││││││││││││││││┌ @ operators.jl:168 Core.Compiler.|(Core.Compiler.isnan(y::AbstractFloat)::Any, Core.Compiler.signless(x::Integer, y::AbstractFloat)::Bool) ││││││││││││││││││││││││││││┌ @ int.jl:924 Core.Compiler.not_sametype(Core.tuple(a::Integer, b::Bool)::Tuple{Integer, Bool}, Core.tuple(aT::Any, bT::Any)::Tuple{Any, Any}) │││││││││││││││││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Integer, Bool}) ││││││││││││││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, Bool})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Integer, Bool})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││││││││││││││││└──────────────────── │││││││││││┌ @ range.jl:1145 Core.Compiler.-(x::Int64, Core.Compiler.first(r::Core.Compiler.UnitRange)::Any) ││││││││││││┌ @ int.jl:924 Core.Compiler.not_sametype(Core.tuple(a::Int64, b::Integer)::Tuple{Int64, Integer}, Core.tuple(aT::Any, bT::Any)::Tuple{Any, Any}) │││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Int64, Integer}) ││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Integer})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Integer})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││└──────────────────── │││││││││┌ @ compiler/ssair/inlining.jl:75 Core.Compiler.batch_inline!(todo::Vector{Core.Compiler.Pair{Int64, Any}}, ir::Core.Compiler.IRCode, linetable::Vector{Core.LineInfoNode}, propagate_inbounds::Bool) ││││││││││┌ @ compiler/ssair/inlining.jl:555 Core.Compiler.ir_inline_unionsplit!(compact::Core.Compiler.IncrementalCompact, idx::Int64, argexprs::Any, linetable::Vector{Core.LineInfoNode}, item::Core.Compiler.UnionSplit, boundscheck::Symbol, Core.Compiler.getproperty(state::Core.Compiler.CFGInliningState, :todo_bbs::Symbol)::Vector{Tuple{Int64, Int64}}) │││││││││││┌ @ compiler/ssair/inlining.jl:461 Core.Compiler.setindex!(argexprs′::Vector{Any}, Core.Compiler.insert_node_here!(compact::Core.Compiler.IncrementalCompact, Core.Compiler.PiNode(Core.Compiler.getindex(argexprs′::Vector{Any}, i::Any)::Any, m::Any)::Core.PiNode, m::Any, line::Int32)::Core.SSAValue, i::Any) ││││││││││││┌ @ abstractarray.jl:1267 Core.Compiler._setindex!(Core.tuple(Core.Compiler.IndexStyle(A::Vector{Any})::Core.Compiler.IndexLinear, A::Vector{Any}, v::Core.SSAValue)::Tuple{Core.Compiler.IndexLinear, Vector{Any}, Core.SSAValue}, Core.Compiler.to_indices(A::Vector{Any}, I::Tuple{Any})::Tuple{Any}...) │││││││││││││┌ @ abstractarray.jl:1282 Core.Compiler.string("setindex! for ", Core.Compiler.typeof(A::Vector{Any})::Type{Vector{Any}}, " with types ", Core.Compiler.typeof(I::Tuple{Any})::Type{var"#s459"} where var"#s459"<:Tuple{Any}, " is not supported") ││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("setindex! for ", Core.Compiler.typeof(A::Vector{Any})::Type{Vector{Any}}, " with types ", Core.Compiler.typeof(I::Tuple{Any})::Type{var"#s459"} where var"#s459"<:Tuple{Any}, " is not supported") │││││││││││││└───────────────────────── │││││││││││││││┌ @ abstractarray.jl:316 Core.Compiler.materialize(Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Core.Compiler.DomTreeNode}})::Any) ││││││││││││││││ variable Core.Compiler.materialize is not defined: Core.Compiler.materialize(Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Core.Compiler.DomTreeNode}})::Any) │││││││││││││││└──────────────────────── │││││││││││││││││││││││││││┌ @ operators.jl:168 Core.Compiler.&(Core.Compiler.!(Core.Compiler.isnan(x::Integer)::Any)::Union{Bool, Core.Compiler.var"#80#81"{_A} where _A}, Core.Compiler.|(Core.Compiler.isnan(y::AbstractFloat)::Any, Core.Compiler.signless(x::Integer, y::AbstractFloat)::Bool)::Any) ││││││││││││││││││││││││││││ for one of the union split cases, no matching method found for signature: Core.Compiler.&(Core.Compiler.!(Core.Compiler.isnan(x::Integer)::Any)::Union{Bool, Core.Compiler.var"#80#81"{_A} where _A}, Core.Compiler.|(Core.Compiler.isnan(y::AbstractFloat)::Any, Core.Compiler.signless(x::Integer, y::AbstractFloat)::Bool)::Any) │││││││││││││││││││││││││││└──────────────────── │││││││││││││││││┌ @ abstractarray.jl:260 Core.Compiler.join(inds::Tuple{Core.Compiler.OneTo{Int64}, Vararg{Any}}, ", ", " and ") ││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(inds::Tuple{Core.Compiler.OneTo{Int64}, Vararg{Any}}, ", ", " and ") │││││││││││││││││└──────────────────────── ││││││││││││││││┌ @ abstractarray.jl:316 Core.Compiler.materialize(Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Int64}})::Any) │││││││││││││││││ variable Core.Compiler.materialize is not defined: Core.Compiler.materialize(Core.Compiler.broadcasted(Core.Compiler.eachindex, B::Tuple{Vector{Int64}})::Any) ││││││││││││││││└──────────────────────── ││││││││┌ @ compiler/ssair/driver.jl:133 Core.Compiler.getfield_elim_pass!(ir::Core.Compiler.IRCode) │││││││││┌ @ compiler/ssair/passes.jl:617 Core.Compiler.union!(mid::Core.Compiler.IdSet{Int64}, intermediaries::Core.Compiler.IdSet{Any}) ││││││││││┌ @ abstractset.jl:91 Core.Compiler.push!(s::Core.Compiler.IdSet{Int64}, x::Any) │││││││││││┌ @ idset.jl:20 Core.Compiler.setindex!(Core.Compiler.getproperty(s::Core.Compiler.IdSet{Int64}, :dict::Symbol)::Core.Compiler.IdDict{Int64, Nothing}, Core.Compiler.nothing, x::Any) ││││││││││││┌ @ iddict.jl:87 Core.Compiler.string(Core.Compiler.limitrepr(key::Any)::Any, " is not a valid key for type ", _::Type{Int64}) │││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.limitrepr(key::Any)::Any, " is not a valid key for type ", _::Type{Int64}) ││││││││││││└──────────────── ││││││││││┌ @ compiler/ssair/inlining.jl:508 Core.Compiler.cfg_inline_unionsplit!(ir::Core.Compiler.IRCode, idx::Int64, Core.typeassert(item::Core.Compiler.UnionSplit, Core.Compiler.UnionSplit)::Core.Compiler.UnionSplit, state::Core.Compiler.CFGInliningState) │││││││││││┌ @ compiler/ssair/inlining.jl:215 Core.Compiler.inline_into_block!(state::Core.Compiler.CFGInliningState, block::Int64) ││││││││││││┌ @ compiler/ssair/inlining.jl:111 Core.Compiler.setindex!(Core.Compiler.getproperty(state::Core.Compiler.CFGInliningState, :bb_rename::Symbol)::Vector{Int64}, Core.Compiler.:(Core.Compiler.+(l::Int64, 1)::Int64, Core.Compiler.+(l::Int64, Core.Compiler.length(new_range::Core.Compiler.UnitRange{Int64})::Int64)::Int64)::Core.Compiler.UnitRange{Int64}, new_range::Core.Compiler.UnitRange{Int64}) │││││││││││││┌ @ array.jl:847 Core.Compiler.setindex_shape_check(X::Core.Compiler.UnitRange{Int64}, Core.Compiler.length(I::Core.Compiler.UnitRange{Int64})::Int64) ││││││││││││││┌ @ indices.jl:245 Core.Compiler.throw_setindex_mismatch(X::Core.Compiler.UnitRange{Int64}, Core.tuple(i::Int64)::Tuple{Int64}) │││││││││││││││┌ @ indices.jl:191 Core.Compiler.string("tried to assign ", Core.Compiler.length(X::Core.Compiler.UnitRange{Int64})::Int64, " elements to ", Core.Compiler.getindex(I::Tuple{Int64}, 1)::Int64, " destinations") ││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("tried to assign ", Core.Compiler.length(X::Core.Compiler.UnitRange{Int64})::Int64, " elements to ", Core.Compiler.getindex(I::Tuple{Int64}, 1)::Int64, " destinations") │││││││││││││││└────────────────── ││││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{Number, Int32}, 1)::Number) │││││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::Number)::Type{var"#s459"} where var"#s459"<:Number) ││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::Number)::Type{var"#s459"} where var"#s459"<:Number) │││││││││││││││└──────────────────── │││││││││││││┌ @ promotion.jl:315 Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Bool, Integer}) ││││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{Bool, Integer}, 2)::Integer) │││││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::Integer)::Type{var"#s459"} where var"#s459"<:Integer) ││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::Integer)::Type{var"#s459"} where var"#s459"<:Integer) │││││││││││││││└──────────────────── ││││││││││││┌ @ compiler/ssair/inlining.jl:112 Core.Compiler.append!(Core.Compiler.getproperty(state::Core.Compiler.CFGInliningState, :new_cfg_blocks::Symbol)::Vector{Core.Compiler.BasicBlock}, Core.Compiler.map(Core.Compiler.copy, Core.Compiler.getindex(Core.Compiler.getproperty(Core.Compiler.getproperty(state::Core.Compiler.CFGInliningState, :cfg::Symbol)::Core.Compiler.CFG, :blocks::Symbol)::Vector{Core.Compiler.BasicBlock}, new_range::Core.Compiler.UnitRange{Int64})::Vector{Core.Compiler.BasicBlock})::Union{Vector{Union{}}, Vector{Core.Compiler.BasicBlock}}) │││││││││││││┌ @ array.jl:978 Core.Compiler.copyto!(a::Vector{Core.Compiler.BasicBlock}, Core.Compiler.+(Core.Compiler.-(Core.Compiler.length(a::Vector{Core.Compiler.BasicBlock})::Int64, n::Int64)::Int64, 1)::Int64, items::Vector{Union{}}, Core.Compiler.first(itemindices::Core.Compiler.OneTo{Int64})::Int64, n::Int64) ││││││││││││││┌ @ array.jl:299 Core.Compiler._copyto_impl!(dest::Vector{Core.Compiler.BasicBlock}, doffs::Int64, src::Vector{Union{}}, soffs::Int64, n::Int64) │││││││││││││││┌ @ array.jl:313 Core.Compiler.unsafe_copyto!(dest::Vector{Core.Compiler.BasicBlock}, doffs::Int64, src::Vector{Union{}}, soffs::Int64, n::Int64) ││││││││││││││││┌ @ array.jl:289 Core.Compiler._unsafe_copyto!(dest::Vector{Core.Compiler.BasicBlock}, doffs::Int64, src::Vector{Union{}}, soffs::Int64, n::Int64) │││││││││││││││││┌ @ array.jl:235 Core.Compiler.getindex(src::Vector{Union{}}, Core.Compiler.-(Core.Compiler.+(soffs::Int64, i::Int64)::Int64, 1)::Int64) ││││││││││││││││││┌ @ array.jl:802 Core.Compiler.arrayref($(Expr(:boundscheck)), A::Vector{Union{}}, i1::Int64) │││││││││││││││││││ invalid builtin function call: Core.Compiler.arrayref($(Expr(:boundscheck)), A::Vector{Union{}}, i1::Int64) ││││││││││││││││││└──────────────── ││││││││││┌ @ compiler/ssair/inlining.jl:553 Core.Compiler.ir_inline_item!(compact::Core.Compiler.IncrementalCompact, idx::Int64, argexprs::Any, linetable::Vector{Core.LineInfoNode}, item::Core.Compiler.InliningTodo, boundscheck::Symbol, Core.Compiler.getproperty(state::Core.Compiler.CFGInliningState, :todo_bbs::Symbol)::Vector{Tuple{Int64, Int64}}) │││││││││││┌ @ compiler/ssair/inlining.jl:319 Core.Compiler.:(nargs_def::Any, Core.Compiler.lastindex(argexprs::Vector{Any})::Int64) ││││││││││││┌ @ range.jl:3 Core.Compiler.promote(a::Real, b::Int64) │││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Real, y::Int64)::Tuple{Real, Int64}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Real, Int64}) │││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Real, Int64})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Real, Int64})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││└──────────────────── ││││││││││││││││││││││││││┌ @ promotion.jl:369 Core.Compiler.promote(x::Real, y::Integer) │││││││││││││││││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Real, y::Integer)::Tuple{Real, Integer}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││││││││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Real, Integer}) │││││││││││││││││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Real, Integer})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Real, Integer})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││││││││││││││││└──────────────────── ││││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{Bool, Integer}, 1)::Bool) │││││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::Bool)::Type{Bool}) ││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::Bool)::Type{Bool}) │││││││││││││││└──────────────────── ││││││││││││││┌ @ range.jl:1035 Core.apply_type(Core.Compiler.UnitRange, _::Type{Int64})::Type{Core.Compiler.UnitRange{Int64}}(Core.Compiler.first(r::Core.Compiler.AbstractUnitRange)::Any, Core.Compiler.last(r::Core.Compiler.AbstractUnitRange)::Any) │││││││││││││││┌ @ range.jl:354 Core.Compiler.unitrange_last(start::Any, stop::Any) ││││││││││││││││┌ @ range.jl:361 Core.Compiler.floor(Core.Compiler.-(stop::Any, start::Any)::Any) │││││││││││││││││ no matching method found for call signature: Core.Compiler.floor(Core.Compiler.-(stop::Any, start::Any)::Any) ││││││││││││││││└──────────────── │││││┌ @ compiler/inferencestate.jl:134 Core.Compiler.InferenceState(result::Core.Compiler.InferenceResult, src::Core.CodeInfo, cached::Bool, interp::Core.Compiler.NativeInterpreter) ││││││┌ @ compiler/inferencestate.jl:63 Core.Compiler.sptypes_from_meth_instance(Core.typeassert(linfo::Core.MethodInstance, Core.Compiler.MethodInstance)::Core.MethodInstance) │││││││┌ @ compiler/inferencestate.jl:166 Core.Compiler.:(1, Core.Compiler.length(sigtypes::Any)::Any) ││││││││┌ @ range.jl:3 Core.Compiler.promote(a::Int64, b::Real) │││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Int64, y::Real)::Tuple{Int64, Real}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Int64, Real}) │││││││││││┌ @ promotion.jl:315 Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Real}) ││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{Int64, Real}, 2)::Real) │││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::Real)::Type{var"#s459"} where var"#s459"<:Real) ││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::Real)::Type{var"#s459"} where var"#s459"<:Real) │││││││││││││└──────────────────── │││││││││││││││││││││││││┌ @ range.jl:399 throwstart::Core.Compiler.var"#throwstart#56"(r::Core.Compiler.AbstractRange{T} where T<:Integer) ││││││││││││││││││││││││││┌ @ range.jl:397 Core.Compiler.string("first element must be 1, got ", Core.Compiler.first(r::Core.Compiler.AbstractRange{T} where T<:Integer)::Any) │││││││││││││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("first element must be 1, got ", Core.Compiler.first(r::Core.Compiler.AbstractRange{T} where T<:Integer)::Any) ││││││││││││││││││││││││││└──────────────── │││││││││││││││││││││││││││┌ @ operators.jl:168 Core.Compiler.isnan(y::AbstractFloat) ││││││││││││││││││││││││││││ variable Core.Compiler.isnan is not defined: Core.Compiler.isnan(y::AbstractFloat) │││││││││││││││││││││││││││└──────────────────── ││││││││││││┌ @ promotion.jl:322 Core.Compiler.promote(x::Int64, y::Number) │││││││││││││┌ @ promotion.jl:292 Core.Compiler.not_sametype(Core.tuple(x::Int64, y::Number)::Tuple{Int64, Number}, Core.tuple(px::Any, py::Any)::Tuple{Any, Any}) ││││││││││││││┌ @ promotion.jl:309 Core.Compiler.sametype_error(x::Tuple{Int64, Number}) │││││││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Number})::Tuple{Any, Any}, ", ", " and ") ││││││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Number})::Tuple{Any, Any}, ", ", " and ") │││││││││││││││└──────────────────── ││││││││││││┌ @ iddict.jl:87 Core.Compiler.limitrepr(key::Any) │││││││││││││ variable Core.Compiler.limitrepr is not defined: Core.Compiler.limitrepr(key::Any) ││││││││││││└──────────────── ││││││││││││││││┌ @ range.jl:361 Core.Compiler.floor(Core.Compiler.-(stop::Real, start::Real)::Any) │││││││││││││││││ no matching method found for call signature: Core.Compiler.floor(Core.Compiler.-(stop::Real, start::Real)::Any) ││││││││││││││││└──────────────── │││││││││││┌ @ promotion.jl:315 Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Real})::Tuple{Any, Any}, ", ", " and ") ││││││││││││ variable Core.Compiler.join is not defined: Core.Compiler.join(Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Int64, Real})::Tuple{Any, Any}, ", ", " and ") │││││││││││└──────────────────── ││││││││││││││││┌ @ sort.jl:759 Core.Compiler.Sort.firstindex(x::Vector{Int64}) │││││││││││││││││ variable Core.Compiler.Sort.firstindex is not defined: Core.Compiler.Sort.firstindex(x::Vector{Int64}) ││││││││││││││││└─────────────── ││││││││││││││┌ @ promotion.jl:315 Core.Compiler.map(#39::Core.Compiler.var"#39#40", input::Tuple{Number, Int64}) │││││││││││││││┌ @ tuple.jl:214 f::Core.Compiler.var"#39#40"(Core.Compiler.getindex(t::Tuple{Number, Int64}, 2)::Int64) ││││││││││││││││┌ @ promotion.jl:316 Core.Compiler.string(Core.Compiler.typeof(x::Int64)::Type{Int64}) │││││││││││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string(Core.Compiler.typeof(x::Int64)::Type{Int64}) ││││││││││││││││└──────────────────── │││││┌ @ compiler/typeinfer.jl:206 Core.Compiler.Timings.exit_current_timer::typeof(Core.Compiler.Timings.exit_current_timer)(frame::Core.Compiler.InferenceState) ││││││┌ @ compiler/typeinfer.jl:164 Core.Compiler.Timings.backtrace() │││││││┌ @ error.jl:113 Core.Compiler._reformat_bt(Core.typeassert(bt1::Any, Core.apply_type(Core.Compiler.Vector, Core.apply_type(Core.Compiler.Ptr, Core.Compiler.Cvoid)::Type{Ptr{Nothing}})::Type{Vector{Ptr{Nothing}}})::Vector{Ptr{Nothing}}, Core.typeassert(bt2::Any, Core.apply_type(Core.Compiler.Vector, Core.Compiler.Any)::Type{Vector{Any}})::Vector{Any}) ││││││││┌ @ error.jl:93 Core.Compiler.string("Unexpected extended backtrace entry tag ", tag::UInt64, " at bt[", i::Int64, "]") │││││││││ variable Core.Compiler.string is not defined: Core.Compiler.string("Unexpected extended backtrace entry tag ", tag::UInt64, " at bt[", i::Int64, "]") ││││││││└─────────────── 42.356683 seconds (183.34 M allocations: 5.485 GiB, 4.51% gc time, 10.83% compilation time) ```

Good or bad, all of the reported issues are from Base and Core.Compiler (i.e. those addressed by https://github.com/JuliaLang/julia/pull/39761 and those from Core.Compiler's missing imports, also note, the errors from Core.Compiler is reached from Base.return_types call from @inferred macro). Actually, JET concretizes too many code within the test file because of #113 , but as far as I manually tried to find errors within PaddedViews (e.g. by n = 10; @report_call PaddedView(0, ones(Int,ntuple(d->1,n))), I couldn't find actual errors within PaddedViews.jl.

I still haven't detailed look into SnoopCompile's analysis result, so will do a comparison this week.

timholy commented 3 years ago

That's awesome! I'll have to look too. Immersed in other things at the moment, though.

goerch commented 2 years ago

Looks like PaddedViews is JET-clean now:

═════ 1 possible error found ═════
┌ @ C:\Users\Win10\.julia\packages\PaddedViews\7EBsT\src\PaddedViews.jl:300 PaddedViews.error("must supply at least one array with concrete axes")
│┌ @ error.jl:33 error(::String)
││ may throw: Base.throw(Base.ErrorException(s::String)::ErrorException)
│└───────────────
timholy commented 2 years ago

Not just due to JET, though I'm sure that helps. See https://github.com/JuliaArrays/PaddedViews.jl/pull/45.