Skip to content

line number now visually hard to distinguishable from code #149

@vtjnash

Description

@vtjnash

We used to have consistent formatting for debuginfo printing from code-lowered to code-llvm. Now warn seems to have lost the visual marker (compare to optimize=false, for example which swaps '%' for '@' in column 5) and simply lists the function in the same column as code. For example:

julia> @descend kron(I(2),X)

│ ─ %-1  = invoke kron(::Diagonal{Bool, Vector{Bool}},::Matrix{Matrix{Float64}})::Matrix{Matrix{Float64}}
1 ──        nothing::Nothing                                                                                                                                                                        │
            kron at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:414 ────────────────────────────────────────────────────────────────────────────────────────────────┐
             size at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/diagonal.jl:81 ────────────────────────────────────────────────────────────────────────────────────────────┐│
              getproperty at Base.jl:33 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││
2 ── %2   = Base.getfield(_2, :diag)::Vector{Bool}                                                                                                                                                │││
│             length at array.jl:197 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││
│    %3   = Base.arraylen(%2)::Int64                                                                                                                                                              │││
└───        goto #3                                                                                                                                                                                ││
             size at array.jl:132 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
3 ── %5   = Base.arraysize(_3, 1)::Int64                                                                                                                                                           ││
│            * at int.jl:88 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
└─── %6   = Base.mul_int(%3, %5)::Int64                                                                                                                                                            ││
             size at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/diagonal.jl:81 ────────────────────────────────────────────────────────────────────────────────────────────┐│
              getproperty at Base.jl:33 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││
4 ── %7   = Base.getfield(_2, :diag)::Vector{Bool}                                                                                                                                                │││
│             length at array.jl:197 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││
│    %8   = Base.arraylen(%7)::Int64                                                                                                                                                              │││
└───        goto #5                                                                                                                                                                                ││
             size at array.jl:132 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
5 ── %10  = Base.arraysize(_3, 2)::Int64                                                                                                                                                           ││
│            * at int.jl:88 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
│    %11  = Base.mul_int(%8, %10)::Int64                                                                                                                                                           ││
│            Array at boot.jl:455 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
│    %12  = $(Expr(:foreigncall, :(:jl_alloc_array_2d), Matrix{Matrix{Float64}}, svec(Any, Int64, Int64), 0, :(:ccall), Matrix{Matrix{Float64}}, :(%6), :(%11), :(%11), :(%6)))::Matrix{Matrix{Float64}}
│           kron at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:415 ────────────────────────────────────────────────────────────────────────────────────────────────┐
│            kron! at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/diagonal.jl:499 ──────────────────────────────────────────────────────────────────────────────────────────┐│
│             require_one_based_indexing at abstractarray.jl:104 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││
│              has_offset_axes at abstractarray.jl:99 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││
│               axes at abstractarray.jl:89 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││││
│                size at array.jl:134 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││││
│           Base.arraysize(_3, 1)::Int64                                                                                                                                                       ││││││
└───        Base.arraysize(_3, 2)::Int64                                                                                                                                                       ││││││
                 map at tuple.jl:214 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││││
                  oneto at range.jl:413 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││││││
                   OneTo at range.jl:411 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││││││
                    OneTo at range.jl:398 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││││││││
6 ──        goto #7                                                                                                                                                                         │││││││││
7 ──        goto #8                                                                                                                                                                          ││││││││
8 ──        goto #9                                                                                                                                                                           │││││││
9 ──        nothing::Nothing                                                                                                                                                                        │
            kron at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:415 ────────────────────────────────────────────────────────────────────────────────────────────────┐
             kron! at /Users/jameson/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/diagonal.jl:499 ──────────────────────────────────────────────────────────────────────────────────────────┐│
              require_one_based_indexing at abstractarray.jl:104 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││
               has_offset_axes at abstractarray.jl:99 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││
                axes at abstractarray.jl:89 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││││
                 map at tuple.jl:214 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││││
                  oneto at range.jl:413 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││││││
                   OneTo at range.jl:411 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│││││││
                    OneTo at range.jl:398 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐││││││││
...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions