-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[WIP] Never type experiments #84573
[WIP] Never type experiments #84573
Commits on Aug 30, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 0be0bfc - Browse repository at this point
Copy the full SHA 0be0bfcView commit details -
introduce new fallback algorithm
We now fallback type variables using the following rules: * Construct a coercion graph `A -> B` where `A` and `B` are unresolved type variables or the `!` type. * Let D be those variables that are reachable from `!`. * Let N be those variables that are reachable from a variable not in D. * All variables in (D \ N) fallback to `!`. * All variables in (D & N) fallback to `()`.
Configuration menu - View commit details
-
Copy full SHA for cf56389 - Browse repository at this point
Copy the full SHA cf56389View commit details -
remove diverging type variables from fn check
The comment seems incorrect. Testing revealed that the examples in question still work (as well as some variants) even without the special casing here.
Configuration menu - View commit details
-
Copy full SHA for ac195c7 - Browse repository at this point
Copy the full SHA ac195c7View commit details -
remove reliance on "diverging" type variables
Instead, we now record those type variables that are the target of a `NeverToAny` adjustment and consider those to be the "diverging" type variables. This allows us to remove the special case logic that creates a type variable for `!` in coercion.
Configuration menu - View commit details
-
Copy full SHA for f54591f - Browse repository at this point
Copy the full SHA f54591fView commit details -
stop categorizing inference variables as diverging when created
Instead, we now rely on the code that looks for a NeverToAny adjustment.
Configuration menu - View commit details
-
Copy full SHA for 543b241 - Browse repository at this point
Copy the full SHA 543b241View commit details -
fix bug in
DepthFirstSearch
where start node was not visitedThis could cause us to visit the start node twice.
Configuration menu - View commit details
-
Copy full SHA for 141246c - Browse repository at this point
Copy the full SHA 141246cView commit details -
optimization: use a single DepthFirstSearch instead of hashsets
Extend the `DepthFirstSearch` iterator so that it can be re-used and extended with add'l start nodes. Then replace the FxHashSets of nodes we were using in the fallback analysis with a single iterator. This way we won't re-walk portions of the graph that are reached more than once, and we also do less allocation etc.
Configuration menu - View commit details
-
Copy full SHA for c48ee1c - Browse repository at this point
Copy the full SHA c48ee1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a332c8 - Browse repository at this point
Copy the full SHA 9a332c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for be24f7b - Browse repository at this point
Copy the full SHA be24f7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7531f59 - Browse repository at this point
Copy the full SHA 7531f59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26403a2 - Browse repository at this point
Copy the full SHA 26403a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9903a2 - Browse repository at this point
Copy the full SHA a9903a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a963d8d - Browse repository at this point
Copy the full SHA a963d8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 73e9259 - Browse repository at this point
Copy the full SHA 73e9259View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4532c0 - Browse repository at this point
Copy the full SHA c4532c0View commit details -
Relate type variables during predicate registration
This avoids select_obligations_where_possible having an effect, which future proofs the algorithm.
Configuration menu - View commit details
-
Copy full SHA for 5a8bcf9 - Browse repository at this point
Copy the full SHA 5a8bcf9View commit details -
Utilize coercion information to guide never type fallback
This doesn't yet fully work -- running coercions seems to be prone to causing errors in the environment, which creates a little noise in some cases. It should be enough to let us re-run crater, though, I think.
Configuration menu - View commit details
-
Copy full SHA for 40d1e69 - Browse repository at this point
Copy the full SHA 40d1e69View commit details