@@ -847,7 +847,7 @@ function concrete_eval_eligible(interp::AbstractInterpreter,
847847            end 
848848            #  disable concrete-evaluation if this function call is tainted by some overlayed
849849            #  method since currently there is no easy way to execute overlayed methods
850-             add_remark! (interp, sv, " [constprop] Concrete evel  disabled for overlayed methods" 
850+             add_remark! (interp, sv, " [constprop] Concrete eval  disabled for overlayed methods" 
851851        end 
852852        if  ! any_conditional (arginfo)
853853            return  :semi_concrete_eval 
@@ -1852,7 +1852,7 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, (; fargs
18521852    return  rt
18531853end 
18541854
1855- function  abstract_call_unionall (interp:: AbstractInterpreter , argtypes:: Vector{Any} )
1855+ function  abstract_call_unionall (interp:: AbstractInterpreter , argtypes:: Vector{Any} , call :: CallMeta )
18561856    if  length (argtypes) ==  3 
18571857        canconst =  true 
18581858        a2 =  argtypes[2 ]
@@ -1865,10 +1865,10 @@ function abstract_call_unionall(interp::AbstractInterpreter, argtypes::Vector{An
18651865            body =  a3. parameters[1 ]
18661866            canconst =  false 
18671867        else 
1868-             return  CallMeta (Any, Effects (EFFECTS_TOTAL; nothrow), NoCallInfo () )
1868+             return  CallMeta (Any, Effects (EFFECTS_TOTAL; nothrow), call . info )
18691869        end 
18701870        if  ! (isa (body, Type) ||  isa (body, TypeVar))
1871-             return  CallMeta (Any, EFFECTS_THROWS, NoCallInfo () )
1871+             return  CallMeta (Any, EFFECTS_THROWS, call . info )
18721872        end 
18731873        if  has_free_typevars (body)
18741874            if  isa (a2, Const)
@@ -1877,13 +1877,13 @@ function abstract_call_unionall(interp::AbstractInterpreter, argtypes::Vector{An
18771877                tv =  a2. tv
18781878                canconst =  false 
18791879            else 
1880-                 return  CallMeta (Any, EFFECTS_THROWS, NoCallInfo () )
1880+                 return  CallMeta (Any, EFFECTS_THROWS, call . info )
18811881            end 
1882-             isa (tv, TypeVar) ||  return  CallMeta (Any, EFFECTS_THROWS, NoCallInfo () )
1882+             isa (tv, TypeVar) ||  return  CallMeta (Any, EFFECTS_THROWS, call . info )
18831883            body =  UnionAll (tv, body)
18841884        end 
18851885        ret =  canconst ?  Const (body) :  Type{body}
1886-         return  CallMeta (ret, Effects (EFFECTS_TOTAL; nothrow), NoCallInfo () )
1886+         return  CallMeta (ret, Effects (EFFECTS_TOTAL; nothrow), call . info )
18871887    end 
18881888    return  CallMeta (Bottom, EFFECTS_THROWS, NoCallInfo ())
18891889end 
@@ -1998,12 +1998,20 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
19981998        elseif  la ==  3 
19991999            ub_var =  argtypes[3 ]
20002000        end 
2001+         #  make sure generic code is prepared for inlining if needed later
2002+         call =  let  T =  Any[Type{TypeVar}, Any, Any, Any]
2003+             resize! (T, la)
2004+             atype =  Tuple{T... }
2005+             T[1 ] =  Const (TypeVar)
2006+             abstract_call_gf_by_type (interp, f, ArgInfo (nothing , T), si, atype, sv, max_methods)
2007+         end 
20012008        pT =  typevar_tfunc (𝕃ᵢ, n, lb_var, ub_var)
20022009        effects =  builtin_effects (𝕃ᵢ, Core. _typevar, ArgInfo (nothing ,
20032010            Any[Const (Core. _typevar), n, lb_var, ub_var]), pT)
2004-         return  CallMeta (pT, effects, NoCallInfo () )
2011+         return  CallMeta (pT, effects, call . info )
20052012    elseif  f ===  UnionAll
2006-         return  abstract_call_unionall (interp, argtypes)
2013+         call =  abstract_call_gf_by_type (interp, f, ArgInfo (nothing , Any[Const (UnionAll), Any, Any]), si, Tuple{Type{UnionAll}, Any, Any}, sv, max_methods)
2014+         return  abstract_call_unionall (interp, argtypes, call)
20072015    elseif  f ===  Tuple &&  la ==  2 
20082016        aty =  argtypes[2 ]
20092017        ty =  isvarargtype (aty) ?  unwrapva (aty) :  widenconst (aty)
@@ -2021,13 +2029,14 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
20212029        end 
20222030    elseif  la ==  3  &&  istopfunction (f, :!= = )
20232031        #  mark !== as exactly a negated call to ===
2032+         call =  abstract_call_gf_by_type (interp, f, ArgInfo (fargs, Any[Const (f), Any, Any]), si, Tuple{typeof (f), Any, Any}, sv, max_methods)
20242033        rty =  abstract_call_known (interp, (=== ), arginfo, si, sv, max_methods). rt
20252034        if  isa (rty, Conditional)
20262035            return  CallMeta (Conditional (rty. slot, rty. elsetype, rty. thentype), EFFECTS_TOTAL, NoCallInfo ()) #  swap if-else
20272036        elseif  isa (rty, Const)
20282037            return  CallMeta (Const (rty. val ===  false ), EFFECTS_TOTAL, MethodResultPure ())
20292038        end 
2030-         return  CallMeta (rty, EFFECTS_TOTAL,  NoCallInfo ()) 
2039+         return  call 
20312040    elseif  la ==  3  &&  istopfunction (f, :(> :))
20322041        #  mark issupertype as a exact alias for issubtype
20332042        #  swap T1 and T2 arguments and call <:
0 commit comments