Skip to content

Commit

Permalink
fix a method cache matching issue with Type{T}
Browse files Browse the repository at this point in the history
respect type-equality, keep track separately of what Kind it needs to match
revert dfd8fc1
fix #11840 (except for generated functions)
  • Loading branch information
vtjnash committed May 4, 2018
1 parent f936928 commit 248c9c7
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 298 deletions.
2 changes: 1 addition & 1 deletion base/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function finish(me::InferenceState)
def = me.linfo.def::Method
keeptree = me.optimize &&
(me.src.inlineable ||
ccall(:jl_is_cacheable_sig, Int32, (Any, Any, Any), me.linfo.specTypes, def.sig, def) != 0)
ccall(:jl_isa_compileable_sig, Int32, (Any, Any), me.linfo.specTypes, def) != 0)
if keeptree
# compress code for non-toplevel thunks
inferred_result = ccall(:jl_compress_ast, Any, (Any, Any), def, inferred_result)
Expand Down
Loading

0 comments on commit 248c9c7

Please sign in to comment.