-
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
NLL: improve inference with flow results, represent regions with bitsets, and more #46319
NLL: improve inference with flow results, represent regions with bitsets, and more #46319
Commits on Dec 4, 2017
-
separate out the liveness constraints from the final value
It will be useful later for diagnostics to be able to remember where things were live.
Configuration menu - View commit details
-
Copy full SHA for 932452e - Browse repository at this point
Copy the full SHA 932452eView commit details -
replace constant regions with a post-inference check
Rather than declaring some region variables to be constant, and reporting errors when they would have to change, we instead populate each free region X with a minimal set of points (the CFG plus end(X)), and then we let inference do its thing. This may add other `end(Y)` points into X; we can then check after the fact that indeed `X: Y` holds. This requires a bit of "blame" detection to find where the bad constraint came from: we are currently using a pretty dumb algorithm. Good place for later expansion.
Configuration menu - View commit details
-
Copy full SHA for a96b0cf - Browse repository at this point
Copy the full SHA a96b0cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 08c8d7e - Browse repository at this point
Copy the full SHA 08c8d7eView commit details -
inform constraint generation using maybe-init
In particular, if we see a variable is DROP-LIVE, but it is not MAYBE-INIT, then we can ignore the drop. This leavess attempt to use more complex refinements of the idea (e.g., for subpaths or subfields) to future work.
Configuration menu - View commit details
-
Copy full SHA for a9cb25b - Browse repository at this point
Copy the full SHA a9cb25bView commit details -
region_infer: BitMatrix representation of region values
This should be more efficient than allocating two BTreeSets for every region variable?—as it is written in rust-lang#45670.
Configuration menu - View commit details
-
Copy full SHA for 22b3175 - Browse repository at this point
Copy the full SHA 22b3175View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa51603 - Browse repository at this point
Copy the full SHA aa51603View commit details -
Configuration menu - View commit details
-
Copy full SHA for abd7d88 - Browse repository at this point
Copy the full SHA abd7d88View commit details -
make
resolve_regions_and_report_errors
take anOutlivesEnv
This revealed some shortcomings, one of which is fixed. Fixes rust-lang#45937.
Configuration menu - View commit details
-
Copy full SHA for 5562663 - Browse repository at this point
Copy the full SHA 5562663View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f33145 - Browse repository at this point
Copy the full SHA 1f33145View commit details -
extract the code to create
OutlivesBounds
into its own moduleNow it can be reused by the NLL code.
Configuration menu - View commit details
-
Copy full SHA for c45307f - Browse repository at this point
Copy the full SHA c45307fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 31d61f1 - Browse repository at this point
Copy the full SHA 31d61f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45f6027 - Browse repository at this point
Copy the full SHA 45f6027View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb4b06a - Browse repository at this point
Copy the full SHA fb4b06aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 663e7a4 - Browse repository at this point
Copy the full SHA 663e7a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4de7336 - Browse repository at this point
Copy the full SHA 4de7336View commit details -
constraint_generation: create liveness constraints more thoroughly
We now visit just the stuff in the CFG, and we add liveness constraints for all the random types, regions etc that appear within rvalues and statements.
Configuration menu - View commit details
-
Copy full SHA for 49d2274 - Browse repository at this point
Copy the full SHA 49d2274View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9067bd - Browse repository at this point
Copy the full SHA e9067bdView commit details -
move
liberate_late_bound_regions
to a method on the tcxNo reason for it to live on `Inherited`.
Configuration menu - View commit details
-
Copy full SHA for 7f247ad - Browse repository at this point
Copy the full SHA 7f247adView commit details -
introduce
closure_env_ty
helper to compute ty of closure env argPreviously the code was somewhat duplicated.
Configuration menu - View commit details
-
Copy full SHA for fa813f7 - Browse repository at this point
Copy the full SHA fa813f7View commit details -
rename "free region" to "universally quantified region"
This has been bugging me. All the regions appear free in the source; the real difference is that some of them are universally quantified (those in the function signature) and some are existentially quantified (those for which we are inferring values).
Configuration menu - View commit details
-
Copy full SHA for 243bf3f - Browse repository at this point
Copy the full SHA 243bf3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e63bb3 - Browse repository at this point
Copy the full SHA 2e63bb3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18cc0f9 - Browse repository at this point
Copy the full SHA 18cc0f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 506e80c - Browse repository at this point
Copy the full SHA 506e80cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c1708ab - Browse repository at this point
Copy the full SHA c1708abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 14480b4 - Browse repository at this point
Copy the full SHA 14480b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for a393596 - Browse repository at this point
Copy the full SHA a393596View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7409ffd - Browse repository at this point
Copy the full SHA 7409ffdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2716160 - Browse repository at this point
Copy the full SHA 2716160View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab2bc9f - Browse repository at this point
Copy the full SHA ab2bc9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a6adc74 - Browse repository at this point
Copy the full SHA a6adc74View commit details