Skip to content

Commit

Permalink
minimize diff
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed May 17, 2022
1 parent 7d384ce commit 87d863c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,14 @@ function widen_all_consts!(src::CodeInfo)
return src
end

function widen_ssavaluetypes!(ssavaluetypes::Vector{Any})
for j = 1:length(ssavaluetypes)
t = ssavaluetypes[j]
ssavaluetypes[j] = t === NOT_FOUND ? Bottom : widenconditional(t)
end
return ssavaluetypes
end

function record_slot_assign!(sv::InferenceState)
# look at all assignments to slots
# and union the set of types stored there
Expand Down Expand Up @@ -664,14 +672,6 @@ function find_dominating_assignment(id::Int, idx::Int, sv::InferenceState)
return nothing
end

function widen_ssavaluetypes!(ssavaluetypes::Vector{Any})
for j = 1:length(ssavaluetypes)
t = ssavaluetypes[j]
ssavaluetypes[j] = t === NOT_FOUND ? Bottom : widenconditional(t)
end
return ssavaluetypes
end

# annotate types of all symbols in AST
function type_annotate!(sv::InferenceState, run_optimizer::Bool)
# compute the required type for each slot
Expand All @@ -685,7 +685,7 @@ function type_annotate!(sv::InferenceState, run_optimizer::Bool)
# and compute which variables may be used undef
stmt_info = sv.stmt_info
src = sv.src
body = copy_exprargs(src.code::Vector{Any})
body = copy(src.code::Vector{Any})
nexpr = length(body)
codelocs = src.codelocs
ssavaluetypes = copy(src.ssavaluetypes)
Expand Down

0 comments on commit 87d863c

Please sign in to comment.