Skip to content

Commit

Permalink
fix #271, allow src.edges::Vector{MethodInstance} case (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
goerch authored Nov 30, 2021
1 parent 1e7ec73 commit 33500dc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/abstractinterpret/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function CC.abstract_call(analyzer::AbstractAnalyzer, fargs::Union{Nothing,Vecto
return ret
end
end # @static if IS_AFTER_42529

"""
analyze_task_parallel_code!(analyzer::AbstractAnalyzer, argtypes::Argtypes, sv::InferenceState)
Expand Down Expand Up @@ -700,7 +700,15 @@ function CC.finish(me::InferenceState, analyzer::AbstractAnalyzer)
empty!(edges)
end
if me.src.edges !== nothing
append!(s_edges, me.src.edges::Vector{Any})
edges = me.src.edges
if isa(edges, Vector{Any})
append!(s_edges, edges)
else
# this pass should never happen in ordinal code, but some external
# code generator like IRTools.jl may produce this case
# see https://github.com/aviatesk/JET.jl/issues/271
append!(s_edges, edges::Vector{MethodInstance})
end
me.src.edges = nothing
end
# inspect whether our inference had a limited result accuracy,
Expand Down

0 comments on commit 33500dc

Please sign in to comment.