summary refs log tree commit diff
path: root/compiler/rustc_query_system
AgeCommit message (Collapse)AuthorLines
2021-09-01Remove redundant `Span` in `QueryJobInfo`Noah Lev-11/+8
Previously, `QueryJobInfo` was composed of two parts: a `QueryInfo` and a `QueryJob`. However, both `QueryInfo` and `QueryJob` have a `span` field, which seem to be the same. So, the `span` was recorded twice. Now, `QueryJobInfo` is composed of a `QueryStackFrame` (the other field of `QueryInfo`) and a `QueryJob`. So, now, the `span` is only recorded once.
2021-08-27Note that trait aliases cannot be recursiveNoah Lev-9/+16
2021-08-27Note that type aliases cannot be recursiveNoah Lev-1/+42
2021-08-21Improve errors for recursive type aliasesNoah Lev-4/+8
2021-08-12Prevent double panic when handling incremental fingerprint mismatchAaron Hill-6/+28
When an incremental fingerprint mismatch occurs, we debug-print our `DepNode` and query result. Unfortunately, the debug printing process may cause us to run additional queries, which can result in a re-entrant fingerprint mismatch error. To avoid a double panic, this commit adds a thread-local variable to detect re-entrant calls.
2021-08-02Auto merge of #87535 - lf-:authors, r=Mark-Simulacrumbors-1/+0
rfc3052 followup: Remove authors field from Cargo manifests Since RFC 3052 soft deprecated the authors field, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information for contributors, we may as well remove it from crates in this repo.
2021-08-01Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisabors-2/+2
more clippy::complexity fixes (also a couple of clippy::perf fixes)
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-07-25Restrict field visibilityAaron Hill-1/+1
2021-07-25Create `QuerySideEffects` and use it for diagnosticsAaron Hill-59/+53
2021-07-25clippy::useless_formatMatthias Krüger-2/+2
2021-07-07Add docs to new methodsRyan Levick-1/+2
2021-07-07Profile incremental hashingRyan Levick-3/+24
2021-06-15Auto merge of #85154 - cjgillot:lessfn, r=bjorn3bors-35/+53
Reduce amount of function pointers in query invocation. r? `@ghost`
2021-06-07Auto merge of #85903 - bjorn3:rustc_serialize_cleanup, r=varkorbors-6/+6
Remove unused functions and arguments from rustc_serialize
2021-06-04Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514Yuki Okushi-4/+0
Remove unused feature gates The first commit removes a usage of a feature gate, but I don't expect it to be controversial as the feature gate was only used to workaround a limitation of rust in the past. (closures never being `Clone`) The second commit uses `#[allow_internal_unstable]` to avoid leaking the `trusted_step` feature gate usage from inside the index newtype macro. It didn't work for the `min_specialization` feature gate though. The third commit removes (almost) all feature gates from the compiler that weren't used anyway.
2021-06-01Make the reasoning more explicit.Camille GILLOT-5/+9
2021-06-01Avoid creating anonymous nodes with zero or one dependency.Camille GILLOT-27/+49
2021-06-01Remove unused functions and arguments from rustc_serializebjorn3-6/+6
2021-05-31Remove unused feature gatesbjorn3-4/+0
2021-05-30Reduce amount of function pointers.Camille GILLOT-35/+53
2021-05-30Auto merge of #85319 - cjgillot:query-simp, r=Mark-Simulacrumbors-151/+163
Simplification of query forcing Extracted from #78780
2021-05-30Auto merge of #83772 - jhpratt:revamp-step-trait, r=Mark-Simulacrumbors-0/+1
Make `Step` trait safe to implement This PR makes a few modifications to the `Step` trait that I believe better position it for stabilization in the short term. In particular, 1. `unsafe trait TrustedStep` is introduced, indicating that the implementation of `Step` for a given type upholds all stated invariants (which have remained unchanged). This is gated behind a new `trusted_step` feature, as stabilization is realistically blocked on min_specialization. 2. The `Step` trait is internally specialized on the `TrustedStep` trait, which avoids a serious performance regression. 3. `TrustedLen` is implemented for `T: TrustedStep` as the latter's invariants subsume the former's. 4. The `Step` trait is no longer `unsafe`, as the invariants must not be relied upon by unsafe code (unless the type implements `TrustedStep`). 5. `TrustedStep` is implemented for all types that implement `Step` in the standard library and compiler. 6. The `step_trait_ext` feature is merged into the `step_trait` feature. I was unable to find any reasoning for the features being split; the `_unchecked` methods need not necessarily be stabilized at the same time, but I think it is useful to have them under the same feature flag. All existing implementations of `Step` will be broken, as it is not possible to `unsafe impl` a safe trait. Given this trait only exists on nightly, I feel this breakage is acceptable. The blanket `impl<T: Step> TrustedLen for T` will likely cause some minor breakage, but this should be covered by the equivalent impl for `TrustedStep`. Hopefully these changes are sufficient to place `Step` in decent position for stabilization, which would allow user-defined types to be used with `a..b` syntax.
2021-05-29Move reconstruct test inwards.Camille GILLOT-5/+4
2021-05-26Specialize implementationsJacob Pratt-0/+1
Implementations in stdlib are now optimized as they were before.
2021-05-22Get rid of PreviousDepGraph.Camille GILLOT-71/+42
2021-05-15Remove def_path_str.Camille GILLOT-4/+0
2021-05-15Make the fast path faster.Camille GILLOT-14/+15
2021-05-15Refactor try_mark_previous_green.Camille GILLOT-117/+112
2021-05-15Move key recovering into force_query.Camille GILLOT-16/+37
2021-05-10Show nicer error when an 'unstable fingerprints' error occursAaron Hill-7/+13
2021-05-06Auto merge of #84806 - Mark-Simulacrum:try-start-entry, r=cjgillotbors-101/+111
Streamline try_start code This shifts some branches around and avoids interleaving parallel and non-parallel versions of the function too much.
2021-05-02Streamline try_start codeMark Rousskov-101/+111
This shifts some branches around and avoids interleaving parallel and non-parallel versions of the function too much.
2021-05-01Avoid generating QueryMap::extend for each key typeMark Rousskov-8/+5
2021-04-29Move iter_results to dyn FnMut rather than a genericMark Rousskov-21/+20
This means that we're no longer generating the iteration/locking code for each invocation site of iter_results, rather just once per query. This is a 15% win in instruction counts when compiling the rustc_query_impl crate.
2021-04-18fix feature use in rustc libsRalf Jung-1/+0
2021-04-08Fix outdated crate names in compiler docspierwill-1/+1
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
2021-03-31Enable debugging the dep-graph without debug-assertions.Camille GILLOT-9/+5
It may also be useful in these cases, and some CI configurations test without debug assertions.
2021-03-30Also profile finishing the encoding.Camille GILLOT-3/+8
2021-03-30Adjust profiling.Camille GILLOT-13/+37
2021-03-30Address review.Camille GILLOT-49/+43
2021-03-30Add documentation.Camille GILLOT-0/+12
2021-03-30Simplify tracking the encoder state.Camille GILLOT-80/+72
2021-03-30Remove the parallel version.Camille GILLOT-135/+13
2021-03-30Fix parallel compiler.Camille GILLOT-1/+3
2021-03-30Fix tests.Camille GILLOT-5/+21
Avoid invoking queries inside `check_paths`, since we are holding a lock to the reconstructed graph.
2021-03-30Do not allocate in decoder.Camille GILLOT-24/+34
2021-03-30Stream the dep-graph to a file.Camille GILLOT-839/+580
2021-03-27Remove (lots of) dead codeJoshua Nelson-19/+3
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-26Use iter::zip in compiler/Josh Stone-2/+3