@@ -313,8 +313,10 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
313313        push! (linetable, LineInfoNode (entry. module, entry. method, entry. file, entry. line,
314314            (entry. inlined_at >  0  ?  entry. inlined_at +  linetable_offset :  inlined_at)))
315315    end 
316-     nargs_def =  item. mi. def. nargs
317-     isva =  nargs_def >  0  &&  item. mi. def. isva
316+     (; def, sparam_vals) =  item. mi
317+     nargs_def =  def. nargs:: Int32 
318+     isva =  nargs_def >  0  &&  def. isva
319+     sig =  def. sig
318320    if  isva
319321        vararg =  mk_tuplecall! (compact, argexprs[nargs_def: end ], compact. result[idx][:line ])
320322        argexprs =  Any[argexprs[1 : (nargs_def -  1 )]. .. , vararg]
@@ -347,7 +349,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
347349            #  face of rename_arguments! mutating in place - should figure out
348350            #  something better eventually.
349351            inline_compact[idx′] =  nothing 
350-             stmt′ =  ssa_substitute! (idx′, stmt′, argexprs, item . mi . def . sig, item . mi . sparam_vals, linetable_offset, boundscheck_idx, compact)
352+             stmt′ =  ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck_idx, compact)
351353            if  isa (stmt′, ReturnNode)
352354                isa (stmt′. val, SSAValue) &&  (compact. used_ssas[stmt′. val. id] +=  1 )
353355                return_value =  SSAValue (idx′)
@@ -374,7 +376,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
374376        inline_compact =  IncrementalCompact (compact, spec. ir, compact. result_idx)
375377        for  ((_, idx′), stmt′) in  inline_compact
376378            inline_compact[idx′] =  nothing 
377-             stmt′ =  ssa_substitute! (idx′, stmt′, argexprs, item . mi . def . sig, item . mi . sparam_vals, linetable_offset, boundscheck_idx, compact)
379+             stmt′ =  ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck_idx, compact)
378380            if  isa (stmt′, ReturnNode)
379381                if  isdefined (stmt′, :val )
380382                    val =  stmt′. val
@@ -709,9 +711,8 @@ function compileable_specialization(et::Union{EdgeTracker, Nothing}, match::Meth
709711    return  mi
710712end 
711713
712- function  compileable_specialization (et:: Union{EdgeTracker, Nothing} , result:: InferenceResult )
713-     mi =  specialize_method (result. linfo. def:: Method , result. linfo. specTypes,
714-         result. linfo. sparam_vals, false , true )
714+ function  compileable_specialization (et:: Union{EdgeTracker, Nothing} , (; linfo):: InferenceResult )
715+     mi =  specialize_method (linfo. def:: Method , linfo. specTypes, linfo. sparam_vals, false , true )
715716    mi != =  nothing  &&  et != =  nothing  &&  push! (et, mi:: MethodInstance )
716717    return  mi
717718end 
@@ -1065,9 +1066,9 @@ function inline_invoke!(ir::IRCode, idx::Int, sig::Signature, (; match, result):
10651066    pushfirst! (atypes, atype0)
10661067
10671068    if  isa (result, InferenceResult)
1068-         item =  InliningTodo (result, atypes, calltype)
1069-         validate_sparams (item . mi. sparam_vals) ||  return  nothing 
1070-         if  argtypes_to_type (atypes) <:  item. mi.def.sig
1069+         (; mi)  =   item =  InliningTodo (result, atypes, calltype)
1070+         validate_sparams (mi. sparam_vals) ||  return  nothing 
1071+         if  argtypes_to_type (atypes) <:  mi.def.sig 
10711072            state. mi_cache != =  nothing  &&  (item =  resolve_todo (item, state))
10721073            handle_single_case! (ir, stmt, idx, item, true , todo)
10731074            return  nothing 
@@ -1195,7 +1196,7 @@ function analyze_single_call!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int
11951196    for  i in  1 : length (infos)
11961197        info =  infos[i]
11971198        meth =  info. results
1198-         if  meth  ===   missing   ||  meth . ambig
1199+         if  meth. ambig
11991200            #  Too many applicable methods
12001201            #  Or there is a (partial?) ambiguity
12011202            too_many =  true 
@@ -1213,19 +1214,20 @@ function analyze_single_call!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int
12131214            only_method =  false 
12141215        end 
12151216        for  match in  meth
1216-             signature_union =  Union{signature_union, match. spec_types}
1217-             if  ! isdispatchtuple (match. spec_types)
1217+             spec_types =  match. spec_types
1218+             signature_union =  Union{signature_union, spec_types}
1219+             if  ! isdispatchtuple (spec_types)
12181220                fully_covered =  false 
12191221                continue 
12201222            end 
12211223            case =  analyze_method! (match, sig. atypes, state, calltype)
12221224            if  case ===  nothing 
12231225                fully_covered =  false 
12241226                continue 
1225-             elseif  _any (p-> p[1 ] ===  match . spec_types, cases)
1227+             elseif  _any (p-> p[1 ] ===  spec_types, cases)
12261228                continue 
12271229            end 
1228-             push! (cases, Pair {Any,Any} (match . spec_types, case))
1230+             push! (cases, Pair {Any,Any} (spec_types, case))
12291231        end 
12301232    end 
12311233
0 commit comments