@@ -404,7 +404,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
404404 # face of rename_arguments! mutating in place - should figure out
405405 # something better eventually.
406406 inline_compact[idx′] = nothing
407- stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, item . mi . sparam_vals, linetable_offset, boundscheck, inline_compact)
407+ stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck, inline_compact)
408408 if isa (stmt′, ReturnNode)
409409 val = stmt′. val
410410 return_value = SSAValue (idx′)
@@ -431,7 +431,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
431431 inline_compact = IncrementalCompact (compact, spec. ir, compact. result_idx)
432432 for ((_, idx′), stmt′) in inline_compact
433433 inline_compact[idx′] = nothing
434- stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, item . mi . sparam_vals, linetable_offset, boundscheck, inline_compact)
434+ stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck, inline_compact)
435435 if isa (stmt′, ReturnNode)
436436 if isdefined (stmt′, :val )
437437 val = stmt′. val
@@ -1664,15 +1664,15 @@ function late_inline_special_case!(
16641664end
16651665
16661666function ssa_substitute! (idx:: Int , @nospecialize (val), arg_replacements:: Vector{Any} ,
1667- @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} , concrete_spvals :: SimpleVector ,
1667+ @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} ,
16681668 linetable_offset:: Int32 , boundscheck:: Symbol , compact:: IncrementalCompact )
16691669 compact. result[idx][:flag ] &= ~ IR_FLAG_INBOUNDS
16701670 compact. result[idx][:line ] += linetable_offset
1671- return ssa_substitute_op! (val, arg_replacements, spsig, spvals, concrete_spvals, boundscheck, compact, idx)
1671+ return ssa_substitute_op! (val, arg_replacements, spsig, spvals, boundscheck, compact, idx)
16721672end
16731673
16741674function ssa_substitute_op! (@nospecialize (val), arg_replacements:: Vector{Any} ,
1675- @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} , concrete_spvals :: SimpleVector ,
1675+ @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} ,
16761676 boundscheck:: Symbol , compact:: IncrementalCompact , idx:: Int )
16771677 if isa (val, Argument)
16781678 return arg_replacements[val. n]
@@ -1688,20 +1688,20 @@ function ssa_substitute_op!(@nospecialize(val), arg_replacements::Vector{Any},
16881688 effect_free (NewInstruction (Expr (:call , Core. _svec_ref, false , spvals, e. args[1 ]), Any)))
16891689 return ret
16901690 end
1691- elseif head === :cfunction
1692- @assert ! isa (spsig, UnionAll) || ! isempty (concrete_spvals )
1693- e. args[3 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[3 ], spsig, concrete_spvals )
1691+ elseif head === :cfunction && isa (spvals, SimpleVector)
1692+ @assert ! isa (spsig, UnionAll) || ! isempty (spvals )
1693+ e. args[3 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[3 ], spsig, spvals )
16941694 e. args[4 ] = svec (Any[
1695- ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, concrete_spvals )
1695+ ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, spvals )
16961696 for argt in e. args[4 ]:: SimpleVector ]. .. )
1697- elseif head === :foreigncall
1698- @assert ! isa (spsig, UnionAll) || ! isempty (concrete_spvals )
1697+ elseif head === :foreigncall && isa (spvals, SimpleVector)
1698+ @assert ! isa (spsig, UnionAll) || ! isempty (spvals )
16991699 for i = 1 : length (e. args)
17001700 if i == 2
1701- e. args[2 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[2 ], spsig, concrete_spvals )
1701+ e. args[2 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[2 ], spsig, spvals )
17021702 elseif i == 3
17031703 e. args[3 ] = svec (Any[
1704- ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, concrete_spvals )
1704+ ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, spvals )
17051705 for argt in e. args[3 ]:: SimpleVector ]. .. )
17061706 end
17071707 end
@@ -1718,7 +1718,7 @@ function ssa_substitute_op!(@nospecialize(val), arg_replacements::Vector{Any},
17181718 isa (val, Union{SSAValue, NewSSAValue}) && return val # avoid infinite loop
17191719 urs = userefs (val)
17201720 for op in urs
1721- op[] = ssa_substitute_op! (op[], arg_replacements, spsig, spvals, concrete_spvals, boundscheck, compact, idx)
1721+ op[] = ssa_substitute_op! (op[], arg_replacements, spsig, spvals, boundscheck, compact, idx)
17221722 end
17231723 return urs[]
17241724end
0 commit comments