Skip to content

Commit bd7ad2e

Browse files
committed
Fixes for changes in nightly
1 parent 84a4364 commit bd7ad2e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/codeedges.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ function print_names(io::IO, cl::CodeLinks)
9494
end
9595
end
9696

97+
const preprinter_sentinel = isdefined(Base.IRShow, :statementidx_lineinfo_printer) ? 0 : typemin(Int32)
98+
9799
if isdefined(Base.IRShow, :show_ir_stmt)
98100
function print_with_code(preprint, postprint, io::IO, src::CodeInfo)
99101
src = JuliaInterpreter.copy_codeinfo(src)
@@ -118,7 +120,7 @@ if isdefined(Base.IRShow, :show_ir_stmt)
118120
bb_idx_prev = bb_idx
119121
end
120122
max_bb_idx_size = ndigits(length(cfg.blocks))
121-
line_info_preprinter(io, " "^(max_bb_idx_size + 2), typemin(Int32))
123+
line_info_preprinter(io, " "^(max_bb_idx_size + 2), preprinter_sentinel)
122124
postprint(io)
123125
return nothing
124126
end
@@ -698,7 +700,7 @@ function lines_required!(isrequired::AbstractVector{Bool}, objs, src::CodeInfo,
698700
for s in var.succs
699701
s norequire && continue
700702
stmt2 = src.code[s]
701-
if isexpr(stmt2, :method) && (stmt2::Expr).args[1] === false
703+
if isexpr(stmt2, :method) && (fname = (stmt2::Expr).args[1]; fname === false || fname === nothing)
702704
isrequired[s] = true
703705
end
704706
end

0 commit comments

Comments
 (0)