@@ -149,7 +149,7 @@ function abstract_call_method_with_const_args(@nospecialize(f), argtypes::Vector
149149 length (argtypes) >= nargs || return Any
150150 haveconst = false
151151 for a in argtypes
152- a = maybe_widen_conditional (a)
152+ a = widenconditional (a)
153153 if has_nontrivial_const_info (a)
154154 # have new information from argtypes that wasn't available from the signature
155155 if ! isa (a, Const) || (isa (a. val, Symbol) || isa (a. val, Type) || (! isa (a. val, String) && isimmutable (a. val)))
@@ -181,7 +181,7 @@ function abstract_call_method_with_const_args(@nospecialize(f), argtypes::Vector
181181 if ! istopfunction (f, :getproperty ) && ! istopfunction (f, :setproperty! )
182182 # in this case, see if all of the arguments are constants
183183 for a in argtypes
184- a = maybe_widen_conditional (a)
184+ a = widenconditional (a)
185185 if ! isa (a, Const) && ! isconstType (a)
186186 return Any
187187 end
518518
519519function pure_eval_call (@nospecialize (f), argtypes:: Vector{Any} , @nospecialize (atype), sv:: InferenceState )
520520 for i = 2 : length (argtypes)
521- a = maybe_widen_conditional (argtypes[i])
521+ a = widenconditional (argtypes[i])
522522 if ! (isa (a, Const) || isconstType (a))
523523 return false
524524 end
@@ -537,7 +537,7 @@ function pure_eval_call(@nospecialize(f), argtypes::Vector{Any}, @nospecialize(a
537537 return false
538538 end
539539
540- args = Any[ (a = maybe_widen_conditional (argtypes[i]); isa (a, Const) ? a. val : a. parameters[1 ]) for i in 2 : length (argtypes) ]
540+ args = Any[ (a = widenconditional (argtypes[i]); isa (a, Const) ? a. val : a. parameters[1 ]) for i in 2 : length (argtypes) ]
541541 try
542542 value = Core. _apply_pure (f, args)
543543 # TODO : add some sort of edge(s)
@@ -1059,7 +1059,7 @@ function typeinf_local(frame::InferenceState)
10591059 end
10601060 elseif hd === :return
10611061 pc´ = n + 1
1062- rt = maybe_widen_conditional (abstract_eval (stmt. args[1 ], s[pc], frame))
1062+ rt = widenconditional (abstract_eval (stmt. args[1 ], s[pc], frame))
10631063 if ! isa (rt, Const) && ! isa (rt, Type) && (! isa (rt, PartialTuple) || frame. cached)
10641064 # only propagate information we know we can store
10651065 # and is valid inter-procedurally
0 commit comments