Skip to content

Commit 06cb7dd

Browse files
authored
Adjust to upstream edges change (#296)
1 parent 1cbde03 commit 06cb7dd

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/analysis/forward.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ function fwd_abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize
4545
frc = frule_call[]
4646
pc = primal_call[]
4747

48-
if frc.rt !== Const(nothing)
49-
result[] = CallMeta(pc.rt, pc.exct, pc.effects, FRuleCallInfo(pc.info, frc))
50-
else
51-
result[] = pc
48+
if VERSION < v"1.12.0-DEV.1531" && frc.rt === Const(nothing)
5249
CC.add_mt_backedge!(sv, frule_mt, frule_atype)
5350
end
5451

52+
result[] = CallMeta(pc.rt, pc.exct, pc.effects, FRuleCallInfo(pc.info, frc))
5553
return true
5654
end
5755
(!isready(primal_call) || !make_progress(interp, sv)) && push!(sv.tasks, make_progress)
@@ -89,7 +87,7 @@ function fwd_abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize
8987
@static if VERSION v"1.11.0-DEV.945"
9088
return CallMeta(primal_call.rt, primal_call.exct, primal_call.effects, FRuleCallInfo(primal_call.info, frule_call))
9189
else
92-
return CallMeta(primal_call.rt, primal_call.effects, FRuleCallInfo(primal_call.info, frule_call))
90+
return CallMeta(primal_call.rt, primal_call.effects, FRuleCallInfo(primal_call.info, frule_call.info))
9391
end
9492
else
9593
CC.add_mt_backedge!(sv, frule_mt, frule_atype)

src/stage2/lattice.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,22 @@ end
6666
struct FRuleCallInfo <: CallInfo
6767
info::CallInfo
6868
frule_call::CallMeta
69-
FRuleCallInfo(@nospecialize(info::CallInfo), frule_call::CallMeta) = new(info, frule_call)
69+
function FRuleCallInfo(@nospecialize(info::CallInfo), frule_call::CallMeta)
70+
new(info, frule_call)
71+
end
7072
end
7173
CC.nsplit_impl(info::FRuleCallInfo) = CC.nsplit(info.info)
7274
CC.getsplit_impl(info::FRuleCallInfo, idx::Int) = CC.getsplit(info.info, idx)
7375
CC.getresult_impl(info::FRuleCallInfo, idx::Int) = CC.getresult(info.info, idx)
7476
if isdefined(CC, :add_uncovered_edges_impl)
7577
CC.add_uncovered_edges_impl(edges::Vector{Any}, info::FRuleCallInfo, @nospecialize(atype)) = CC.add_uncovered_edges!(edges, info.info, atype)
7678
end
79+
if isdefined(CC, :add_edges_impl)
80+
function CC.add_edges_impl(edges::Vector{Any}, info::FRuleCallInfo)
81+
CC.add_edges!(edges, info.info)
82+
CC.add_edges!(edges, info.frule_call.info)
83+
end
84+
end
7785

7886
function Base.show(io::IO, info::FRuleCallInfo)
7987
print(io, "FRuleCallInfo(", typeof(info.info), ", ", typeof(info.frule_call.info), ")")

0 commit comments

Comments
 (0)