-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Polymorphization #69749
Polymorphization #69749
Commits on Jul 20, 2020
-
mir: avoid double substitution
This commit avoids a natural, free-range double substitution error by monomorphizing the projection element before getting the type. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 996bc9a - Browse repository at this point
Copy the full SHA 996bc9aView commit details -
mir: rename
should_monomorphize_locally
This commit renames `should_monomorphize_locally` to `should_codegen_locally` which better describes what the function determines once polymorphization is added. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 576deef - Browse repository at this point
Copy the full SHA 576deefView commit details -
ty:
STILL_FURTHER_SPECIALIZABLE
w/out prnt substThis commit modifies the `STILL_FURTHER_SPECIALIZABLE` flag so that the flag isn't set by the parent substs of closures or generators. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c6ed442 - Browse repository at this point
Copy the full SHA c6ed442View commit details -
trait_sel: only test predicates w/ no substs
This commit modifies the `substitute_normalize_and_test_predicates` query, renaming it to `impossible_predicates` and only checking predicates which do not require substs. By making this change, polymorphization doesn't have to explicitly support vtables. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce7c48f - Browse repository at this point
Copy the full SHA ce7c48fView commit details -
ty: add doc comments to
Generics
methodsThis commit adds doc comments to the `param_at`, `region_param` and `const_param` methods on the `Generics` struct. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 842fa0c - Browse repository at this point
Copy the full SHA 842fa0cView commit details -
debuginfo: no type metadata if substs reqd
This commit skips generating debuginfo type metadata if substitutions are required by the type. This avoids ICEs that result from layouts of types with substitutions being computed. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5bf2c7d - Browse repository at this point
Copy the full SHA 5bf2c7dView commit details -
debuginfo: add type metadata for params
This commit adds type metadata for generic parameters (that arise from polymorphization). Generic parameter metadata is considered zero-sized and named after the generic parameter. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19e8495 - Browse repository at this point
Copy the full SHA 19e8495View commit details -
shim: adjust valid shim asserts
This commit makes valid shim asserts more specific - checking for the specific types that are valid for a given type of shim - and removes asserts for types which require substitutions. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 47756bb - Browse repository at this point
Copy the full SHA 47756bbView commit details -
mir:
unused_generic_params
queryThis commit implements the `unused_generic_params` query, an initial version of polymorphization which detects when an item does not use generic parameters and is being needlessly monomorphized as a result. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2989fea - Browse repository at this point
Copy the full SHA 2989feaView commit details -
ty: normalize fn sigs before subst
This commit normalizes function signatures for instances before substituting, a workaround for polymorphization considering parameters unused when they show up in the signature, but not the body (due to being normalized). Unfortunately, this causes test output to change with the parallel compiler only. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f52c729 - Browse repository at this point
Copy the full SHA f52c729View commit details -
metadata: record
unused_generic_params
This commit records the results of `unused_generic_params` in crate metadata, hopefully improving performance. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5ce29d3 - Browse repository at this point
Copy the full SHA 5ce29d3View commit details -
mir: use attribute over
-Z polymorphize-errors
This commit replaces the `-Z polymorphize-errors` debugging flag with a `#[rustc_polymorphize_error]` attribute for use on functions. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b1f8bd6 - Browse repository at this point
Copy the full SHA b1f8bd6View commit details -
index: introduce and use
FiniteBitSet
This commit introduces a `FiniteBitSet` type which replaces the manual bit manipulation which was being performed in polymorphization. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4b99699 - Browse repository at this point
Copy the full SHA 4b99699View commit details