From c4ef8b5ef7b2ca38105419100dd0775e07e4b800 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 14 Nov 2024 17:51:33 +0900 Subject: [PATCH] separate `[Base.IRShow|Compiler.IRShow]` completely --- Compiler/src/ssair/show.jl | 9 +++++++++ base/show.jl | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Compiler/src/ssair/show.jl b/Compiler/src/ssair/show.jl index 6e4f2004e1a84b..22394c84eb2f71 100644 --- a/Compiler/src/ssair/show.jl +++ b/Compiler/src/ssair/show.jl @@ -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 diff --git a/base/show.jl b/base/show.jl index e332cf521addbd..6fa3f0cf8c454a 100644 --- a/base/show.jl +++ b/base/show.jl @@ -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)