Skip to content

Commit

Permalink
adjustments to JuliaLang/julia#52415
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Mar 19, 2024
1 parent 9ba8bfc commit c32ead7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/codeview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ end
using Base.IRShow: IRShow, _stmt, _type, should_print_ssa_type, IRShowConfig, show_ir

const __debuginfo = merge(IRShow.__debuginfo, Dict(
:compact => src -> src isa CodeInfo ? __debuginfo[:source](src)
: IRShow.inline_linfo_printer(src)
:source => src -> Base.IRShow.statementidx_lineinfo_printer(src),
:compact => src -> src isa CodeInfo ? __debuginfo[:source](src) : IRShow.inline_linfo_printer(src)
))
@static if VERSION v"1.12.0-DEV.173"
__debuginfo[:source] = src -> Base.IRShow.statementidx_lineinfo_printer(
(debuginfo, scope) -> Base.IRShow.DILineInfoPrinter(debuginfo, scope, #=showtypes=#true), src)
end

function is_type_unstable(code::Union{IRCode, CodeInfo}, idx::Int, used::BitSet)
stmt = _stmt(code, idx)
Expand Down
3 changes: 2 additions & 1 deletion src/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ function CC.src_inlining_policy(interp::CthulhuInterpreter,
src::Any, info::CCCallInfo, stmt_flag::UInt32)
end
end
CC.retrieve_ir_for_inlining(cached_result::CodeInstance, src::OptimizedSource) = CC.copy(src.ir)
CC.retrieve_ir_for_inlining(cached_result::CodeInstance, src::OptimizedSource) =
CC.retrieve_ir_for_inlining(cached_result.def, src.ir, true)
CC.retrieve_ir_for_inlining(mi::MethodInstance, src::OptimizedSource, preserve_local_sources::Bool) =
CC.retrieve_ir_for_inlining(mi, src.ir, preserve_local_sources)
elseif VERSION v"1.11.0-DEV.879"
Expand Down

0 comments on commit c32ead7

Please sign in to comment.