Skip to content

Commit

Permalink
fix predicate for exploiting cached varargs type info
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed May 4, 2018
1 parent e4c90a4 commit 6e78ef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/ssair/inlining2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ function assemble_inline_todo!(ir::IRCode, linetable::Vector{LineInfoNode}, sv::
for tuparg in ir[def].args[2:end]
push!(new_atypes, exprtype(tuparg, ir, ir.mod))
end
elseif isa(def, Argument) && def === stmt.args[end] && !isempty(sv.result_vargs)
elseif isa(def, Argument) && def === stmt.args[end] && def.n === length(ir.argtypes) && !isempty(sv.result_vargs)

This comment has been minimized.

Copy link
@Keno

Keno May 4, 2018

Member

is def === stmt.args[end] actually necessary? Seems like f(args...) = g(args..., 1) could benefit from this as well.

append!(new_atypes, sv.result_vargs)
else
append!(new_atypes, typ.parameters)
Expand Down

0 comments on commit 6e78ef1

Please sign in to comment.