Skip to content

Commit

Permalink
fix #9131, excessive specialization of code_typed
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Nov 25, 2014
1 parent 713d736 commit b97ec83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3050,8 +3050,8 @@ function replace_tupleref!(ast, e::ANY, tupname, vals, sv, i0)
end
end

code_typed(f, types) = code_typed(call, tuple(isa(f,Type)?Type{f}:typeof(f), types...))
function code_typed(f::Function, types::(Type...))
code_typed(f, types::ANY) = code_typed(call, tuple(isa(f,Type)?Type{f}:typeof(f), types...))
function code_typed(f::Function, types::ANY)
asts = []
for x in _methods(f,types,-1)
linfo = func_for_method(x[3],types,x[2])
Expand All @@ -3065,8 +3065,8 @@ function code_typed(f::Function, types::(Type...))
asts
end

return_types(f, types) = return_types(call, tuple(isa(f,Type)?Type{f}:typeof(f), types...))
function return_types(f::Function, types)
return_types(f, types::ANY) = return_types(call, tuple(isa(f,Type)?Type{f}:typeof(f), types...))
function return_types(f::Function, types::ANY)
rt = []
for x in _methods(f,types,-1)
linfo = func_for_method(x[3],types,x[2])
Expand Down

0 comments on commit b97ec83

Please sign in to comment.