Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some minor code quality / correctness improvements #36596

Merged
merged 5 commits into from
Jul 13, 2020
Merged

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Jul 9, 2020

Digging around at a few things that seemed to show up re-compiled often

@JeffBezanson
Copy link
Sponsor Member

Something in 5e86746 is going haywire --- 4x longer to precompile Plots, +5% sysimg.

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Jul 10, 2020

Ah, I see what happened. The new lazy-ambiguity logic assumes that subtyping is transitive over specificity, and I accidentally formed a contradiction of that premise on the definition of == and returned too many matches. In particular, I observe the set of facts that:

!(a <: b)
a <: c
c morespecific b # ie. c < b

where a == c == Tuple{Type,Type}
and b == Tuple{T,T} where T

And I wasn't checking for this case, so in the results, it appeared that b was also a possible method match, which complicated the caching logic (made it slow).

We need to run the PassManager passes before we destroy important metadata.
These functions were changed in #28380, but their tfuncs were not
changed at that time also.
We were accidentally widening Const(false) here to Bool if either
argument was a Slot (such as an Argument). We don't want to do that!
remove unused type parameters from some functions, add some useful ones
to others, and remove the fallback `==` method in Core.Compiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants