| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-03-30 | rustc -> rustc_middle part 1 | Mazdak Farrokhzad | -460/+0 | |
| 2020-03-24 | normalize some imports, prefer direct ones. | Mazdak Farrokhzad | -1/+1 | |
| 2020-03-23 | Rollup merge of #69968 - eddyb:tupled-closure-captures, r=nikomatsakis | Mazdak Farrokhzad | -2/+2 | |
| rustc: keep upvars tupled in {Closure,Generator}Substs. Previously, each closure/generator capture's (aka "upvar") type was tracked as one "synthetic" type parameter in the closure/generator substs, and figuring out where the parent `fn`'s generics end and the synthetics start involved slicing at `tcx.generics_of(def_id).parent_count`. Needing to query `generics_of` limited @davidtwco (who wants to compute some `TypeFlags` differently for parent generics vs upvars, and `TyCtxt` is not available there), which is how I got started on this, but it's also possible that the `generics_of` queries are slowing down `{Closure,Generator}Substs` methods. To give an example, for a `foo::<T, U>::{closure#0}` with captures `x: X` and `y: Y`, substs are: * before this PR: `[T, U, /*kind*/, /*signature*/, X, Y]` * after this PR: `[T, U, /*kind*/, /*signature*/, (X, Y)]` You can see that, with this PR, no matter how many captures, the last 3 entries in the substs (or 5 for a generator) are always the "synthetic" ones, with the last one being the tuple of capture types. r? @nikomatsakis cc @Zoxc | ||||
| 2020-03-21 | symbol_names: treat ReifyShim like VtableShim. | Eduard-Mihai Burtescu | -4/+0 | |
| 2020-03-21 | rustc: keep upvars tupled in {Closure,Generator}Substs. | Eduard-Mihai Burtescu | -2/+2 | |
| 2020-03-20 | Rollup merge of #69935 - davidtwco:issue-69925, r=eddyb | Yuki Okushi | -0/+26 | |
| codegen/mir: support polymorphic `InstanceDef`s cc #69925 This PR modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s. r? @eddyb cc @nikomatsakis | ||||
| 2020-03-15 | rustc: tweak comments on InstanceDef. | Ana-Maria Mihalache | -12/+9 | |
| 2020-03-15 | rustc: don't resolve Instances which would produce malformed shims. | Eduard-Mihai Burtescu | -0/+15 | |
| 2020-03-12 | codegen/mir: support polymorphic `InstanceDef`s | David Wood | -0/+26 | |
| This commit modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s. Signed-off-by: David Wood <david@davidtw.co> | ||||
| 2020-03-06 | Don't redundantly repeat field names (clippy::redundant_field_names) | Matthias Krüger | -1/+1 | |
| 2020-03-03 | use question mark operator in a few places. | Matthias Krüger | -3/+1 | |
| 2020-02-28 | use is_empty() instead of len() == x to determine if structs are empty. | Matthias Krüger | -1/+1 | |
| 2020-02-27 | Auto merge of #67332 - matthewjasper:drop-in-place-cgus, r=michaelwoerister | bors | -4/+21 | |
| Don't instantiate so many copies of drop_in_place Split out from #66703. r? @ghost | ||||
| 2020-02-19 | Make lookup of associated item by name O(log n) | Dylan MacKenzie | -1/+1 | |
| 2020-02-13 | Don't instantiate so many copies of `drop_in_place` | Matthew Jasper | -4/+21 | |
| 2020-02-13 | Move resolve_instance to rustc_ty. | Camille GILLOT | -123/+20 | |
| 2020-02-12 | Auto merge of #68679 - matthewjasper:needs-type-op, r=varkor | bors | -1/+1 | |
| Improve `ty.needs_drop` * Handle cycles in `needs_drop` correctly * Normalize types when computing `needs_drop` * Move queries from rustc to rustc_ty * Avoid query in simple cases reopens #65918 | ||||
| 2020-02-11 | Review comments. | Camille GILLOT | -1/+1 | |
| 2020-02-11 | Move lang_items definitions to librustc_lang_items. | Camille GILLOT | -1/+1 | |
| 2020-02-08 | Make `associated_items` query return a slice | Jonas Schievink | -0/+1 | |
| 2020-02-02 | Use correct `ParamEnv` in `Instance::resolve` | Matthew Jasper | -1/+1 | |
| 2020-01-23 | Add projection query for upstream drop-glue instances. | Michael Woerister | -1/+35 | |
| This reduces the amount of invalidated data when new types are add to upstream crates. | ||||
| 2020-01-23 | Clarify some methods around instance instantiation via comments and clearer ↵ | Michael Woerister | -3/+15 | |
| names. | ||||
| 2020-01-19 | InstanceDef::requires_caller_location limited to items. | Adam Perry | -1/+6 | |
| 2020-01-07 | Make traits::util::* free functions. | Camille GILLOT | -1/+1 | |
| 2020-01-06 | Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisa | bors | -2/+2 | |
| Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum | ||||
| 2020-01-05 | Fix typo | Aaron Hill | -1/+1 | |
| 2020-01-05 | Rename Instance.ty to Instance.monomorphic_ty | Aaron Hill | -6/+2 | |
| 2020-01-05 | s/projections/params/ | Aaron Hill | -1/+1 | |
| 2020-01-05 | Run rustfmt | Aaron Hill | -1/+2 | |
| 2020-01-05 | Change 'panic!' to 'bug!' | Aaron Hill | -1/+1 | |
| Co-Authored-By: Wesley Wiser <wwiser@gmail.com> | ||||
| 2020-01-05 | Fix ICE involving calling `Instance.ty` during const evaluation | Aaron Hill | -0/+28 | |
| Fixes #67639 `Instance.ty` assumes that we are in a fully monomorphic context (e.g. codegen), and can therefore use an empty `ParamEnv` when performing normalization. Howver, the MIR constant evaluator code ends up calling `Instance.ty` as a result of us attemptign to 'speculatively' const-evaluate generic functions during const propagation. As a result, we may end up with projections involving type parameters (e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize. Normalization expects us to have proper predicates in the `ParamEnv` for such projections, and will ICE if we don't. This commit adds a new method `Instance.ty_env`, which takes a `ParamEnv` for use during normalization. The MIR const-evaluator code is changed to use this method, passing in the proper `ParamEnv` for the context at hand. | ||||
| 2020-01-05 | Remove rustc_hir reexports in rustc::hir. | Mazdak Farrokhzad | -2/+2 | |
| 2020-01-04 | extract rustc::middle::codegen_fn_attrs | Mazdak Farrokhzad | -1/+1 | |
| 2019-12-27 | Fix `Instance::resolve()` incorrectly returning specialized instances | Wesley Wiser | -0/+19 | |
| We only want to return specializations when `Reveal::All` is passed, not when `Reveal::UserFacing` is. Resolving this fixes several issues with the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization passes. Fixes #66901 | ||||
| 2019-12-22 | Format the world | Mark Rousskov | -127/+93 | |
| 2019-12-05 | Implement #[track_caller] in const. | Adam Perry | -4/+5 | |
| 2019-12-03 | rustc: add docs to FnAbi::{of_fn_ptr,of_instance} and InstanceDef::Virtual. | Eduard-Mihai Burtescu | -1/+5 | |
| 2019-12-03 | rustc: move Instance::fn_sig to ty::layout and privatize it. | Eduard-Mihai Burtescu | -65/+1 | |
| 2019-12-03 | rustc: use ReifyShim for reifying Virtual call instances. | Eduard-Mihai Burtescu | -12/+20 | |
| 2019-12-03 | rustc: combine Instance::fn_sig_noadjust and Instance::fn_sig. | Eduard-Mihai Burtescu | -17/+15 | |
| 2019-11-21 | Aggregation of drive-by cosmetic changes. | Alexander Regueiro | -3/+3 | |
| 2019-11-18 | Retire BraceStructLiftImpl. | Camille GILLOT | -1/+2 | |
| 2019-10-11 | resolve_for_fn_ptr checks that the instance is an Item before returning shim. | Adam Perry | -10/+12 | |
| 2019-10-10 | Instance::resolve_for_fn_ptr unconditionally resolves first. | Adam Perry | -9/+13 | |
| Per review feedback. | ||||
| 2019-10-10 | Improve docs for InstanceDef::ReifyShim. | Adam Perry | -1/+4 | |
| 2019-10-09 | Clarify comment, dedupe match arms in shim.rs. | Adam Perry | -1/+3 | |
| Also add a missing terminal newline to a test. | ||||
| 2019-10-09 | Return ReifyShim from Instance::resolve_for_fn_ptr when track_caller present. | Adam Perry | -2/+2 | |
| This ICEs in MIR currently, which I think is to be expected since none of the MIR plumbing is set up. I added a test which confirms that the shim is being used for reifying a track_caller function. | ||||
| 2019-10-09 | Reifying callers of Instance::resolve use resolve_for_fn_ptr. | Adam Perry | -6/+3 | |
| 2019-10-09 | Add Instance::resolve_for_fn_ptr | Adam Perry | -1/+23 | |
