@@ -459,7 +459,7 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
459459 # Under direct self-recursion, permit much greater use of reducers.
460460 # here we assume that complexity(specTypes) :>= complexity(sig)
461461 comparison = sv. linfo. specTypes
462- l_comparison = length (unwrap_unionall (comparison). parameters)
462+ l_comparison = length (unwrap_unionall (comparison). parameters):: Int
463463 spec_len = max (spec_len, l_comparison)
464464 else
465465 comparison = method. sig
@@ -700,16 +700,20 @@ function abstract_apply(interp::AbstractInterpreter, @nospecialize(itft), @nospe
700700 res = Union{}
701701 nargs = length (aargtypes)
702702 splitunions = 1 < unionsplitcost (aargtypes) <= InferenceParams (interp). MAX_APPLY_UNION_ENUM
703- ctypes = Any [Any[aft]]
703+ ctypes = [Any[aft]]
704704 infos = [Union{Nothing, AbstractIterationInfo}[]]
705705 for i = 1 : nargs
706- ctypes´ = []
707- infos′ = []
706+ ctypes´ = Vector{Any} []
707+ infos′ = Vector{Union{Nothing, AbstractIterationInfo}} []
708708 for ti in (splitunions ? uniontypes (aargtypes[i]) : Any[aargtypes[i]])
709709 if ! isvarargtype (ti)
710- cti, info = precise_container_type (interp, itft, ti, sv)
710+ cti_info = precise_container_type (interp, itft, ti, sv)
711+ cti = cti_info[1 ]:: Vector{Any}
712+ info = cti_info[2 ]:: Union{Nothing,AbstractIterationInfo}
711713 else
712- cti, info = precise_container_type (interp, itft, unwrapva (ti), sv)
714+ cti_info = precise_container_type (interp, itft, unwrapva (ti), sv)
715+ cti = cti_info[1 ]:: Vector{Any}
716+ info = cti_info[2 ]:: Union{Nothing,AbstractIterationInfo}
713717 # We can't represent a repeating sequence of the same types,
714718 # so tmerge everything together to get one type that represents
715719 # everything.
@@ -726,7 +730,7 @@ function abstract_apply(interp::AbstractInterpreter, @nospecialize(itft), @nospe
726730 continue
727731 end
728732 for j = 1 : length (ctypes)
729- ct = ctypes[j]
733+ ct = ctypes[j]:: Vector{Any}
730734 if isvarargtype (ct[end ])
731735 # This is vararg, we're not gonna be able to do any inling,
732736 # drop the info
@@ -850,7 +854,8 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, fargs::U
850854 (a3 = argtypes[3 ]; isa (a3, Const)) && (idx = a3. val; isa (idx, Int)) &&
851855 (a2 = argtypes[2 ]; a2 ⊑ Tuple)
852856 # TODO : why doesn't this use the getfield_tfunc?
853- cti, _ = precise_container_type (interp, iterate, a2, sv)
857+ cti_info = precise_container_type (interp, iterate, a2, sv)
858+ cti = cti_info[1 ]:: Vector{Any}
854859 if 1 <= idx <= length (cti)
855860 rt = unwrapva (cti[idx])
856861 end
@@ -1392,7 +1397,8 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
13921397 delete! (W, pc)
13931398 frame. currpc = pc
13941399 frame. cur_hand = frame. handler_at[pc]
1395- frame. stmt_edges[pc] === nothing || empty! (frame. stmt_edges[pc])
1400+ edges = frame. stmt_edges[pc]
1401+ edges === nothing || empty! (edges)
13961402 stmt = frame. src. code[pc]
13971403 changes = s[pc]:: VarTable
13981404 t = nothing
@@ -1405,7 +1411,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
14051411 elseif isa (stmt, GotoNode)
14061412 pc´ = (stmt:: GotoNode ). label
14071413 elseif isa (stmt, GotoIfNot)
1408- condt = abstract_eval_value (interp, stmt. cond, s[pc] , frame)
1414+ condt = abstract_eval_value (interp, stmt. cond, changes , frame)
14091415 if condt === Bottom
14101416 empty! (frame. pclimitations)
14111417 end
@@ -1438,7 +1444,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
14381444 end
14391445 end
14401446 newstate_else = stupdate! (s[l], changes_else)
1441- if newstate_else != = false
1447+ if newstate_else != = nothing
14421448 # add else branch to active IP list
14431449 if l < frame. pc´´
14441450 frame. pc´´ = l
@@ -1449,7 +1455,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
14491455 end
14501456 elseif isa (stmt, ReturnNode)
14511457 pc´ = n + 1
1452- rt = widenconditional (abstract_eval_value (interp, stmt. val, s[pc] , frame))
1458+ rt = widenconditional (abstract_eval_value (interp, stmt. val, changes , frame))
14531459 if ! isa (rt, Const) && ! isa (rt, Type) && ! isa (rt, PartialStruct) && ! isa (rt, PartialOpaque)
14541460 # only propagate information we know we can store
14551461 # and is valid inter-procedurally
@@ -1483,9 +1489,8 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
14831489 frame. cur_hand = Pair {Any,Any} (l, frame. cur_hand)
14841490 # propagate type info to exception handler
14851491 old = s[l]
1486- new = s[pc]:: VarTable
1487- newstate_catch = stupdate! (old, new)
1488- if newstate_catch != = false
1492+ newstate_catch = stupdate! (old, changes)
1493+ if newstate_catch != = nothing
14891494 if l < frame. pc´´
14901495 frame. pc´´ = l
14911496 end
@@ -1556,12 +1561,12 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
15561561 # (such as a terminator for a loop, if-else, or try block),
15571562 # consider whether we should jump to an older backedge first,
15581563 # to try to traverse the statements in approximate dominator order
1559- if newstate != = false
1564+ if newstate != = nothing
15601565 s[pc´] = newstate
15611566 end
15621567 push! (W, pc´)
15631568 pc = frame. pc´´
1564- elseif newstate != = false
1569+ elseif newstate != = nothing
15651570 s[pc´] = newstate
15661571 pc = pc´
15671572 elseif pc´ in W
0 commit comments