Skip to content

Commit

Permalink
separate [Base.IRShow|Compiler.IRShow] completely
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Nov 14, 2024
1 parent da54d89 commit c4ef8b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions Compiler/src/ssair/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1135,3 +1135,12 @@ function Base.show(io::IO, tinf::Timings.Timing)
end

@specialize

const __debuginfo = Dict{Symbol, Any}(
# :full => src -> statementidx_lineinfo_printer(src), # and add variable slot information
:source => src -> statementidx_lineinfo_printer(src),
# :oneliner => src -> statementidx_lineinfo_printer(PartialLineInfoPrinter, src),
:none => src -> lineinfo_disabled,
)
const default_debuginfo = Ref{Symbol}(:none)
debuginfo(sym) = sym === :default ? default_debuginfo[] : sym
9 changes: 0 additions & 9 deletions base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2824,15 +2824,6 @@ end
module IRShow
using ..Compiler: Compiler
Base.include(IRShow, Base.strcat(Base.BUILDROOT, "../usr/share/julia/Compiler/src/ssair/show.jl"))

const __debuginfo = Dict{Symbol, Any}(
# :full => src -> statementidx_lineinfo_printer(src), # and add variable slot information
:source => src -> statementidx_lineinfo_printer(src),
# :oneliner => src -> statementidx_lineinfo_printer(PartialLineInfoPrinter, src),
:none => src -> lineinfo_disabled,
)
const default_debuginfo = Ref{Symbol}(:none)
debuginfo(sym) = sym === :default ? default_debuginfo[] : sym
end

function show(io::IO, src::CodeInfo; debuginfo::Symbol=:source)
Expand Down

0 comments on commit c4ef8b5

Please sign in to comment.