summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
AgeCommit message (Collapse)AuthorLines
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-02Restrict access to crate_name.Camille GILLOT-1/+1
Also remove original_crate_name, which had the exact same implementation
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-2/+2
2021-06-01Auto merge of #85153 - cjgillot:qresolve, r=Aaron1011bors-2/+2
Reduce the amount of untracked state in TyCtxt Access to untracked global state may generate instances of #84970. The GlobalCtxt contains the lowered HIR, the resolver outputs and interners. By wrapping the resolver inside a query, we make sure those accesses are properly tracked. As a no_hash query, all dependent queries essentially become `eval_always`, what they should have been from the beginning.
2021-05-31Remove unused feature gatesbjorn3-4/+0
2021-05-31Auto merge of #85266 - cjgillot:hir-dep-clean, r=michaelwoeristerbors-34/+1
Remove obsolete workaround. The regression test for #62649 appears to pass even without the workaround.
2021-05-30Correct comments about untracked accesses.Camille GILLOT-1/+1
2021-05-30Restrict access to crate_name.Camille GILLOT-1/+1
Also remove original_crate_name, which had the exact same implementation
2021-05-30Auto merge of #85319 - cjgillot:query-simp, r=Mark-Simulacrumbors-20/+4
Simplification of query forcing Extracted from #78780
2021-05-27Remove obsolete workaround.Camille GILLOT-34/+1
2021-05-15Remove def_path_str.Camille GILLOT-5/+2
2021-05-15Move key recovering into force_query.Camille GILLOT-15/+2
2021-05-12Use () in dependency_formats.Camille GILLOT-0/+10
2021-05-01Apply `--cfg parallel_compiler` when documentingJoshua Nelson-6/+4
This also reverts commit 9823c2cc700fea541bf2670fcee93af662b63022 working around the bug.
2021-04-29Move iter_results to dyn FnMut rather than a genericMark Rousskov-14/+14
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-12Introduce CompileMonoItem DepNodebjorn3-0/+5
2021-04-02Auto merge of #83207 - oli-obk:valtree2, r=lcnrbors-0/+9
normalize mir::Constant differently from ty::Const in preparation for valtrees Valtrees are unable to represent many kind of constant values (this is on purpose). For constants that are used at runtime, we do not need a valtree representation and can thus use a different form of evaluation. In order to make this explicit and less fragile, I added a `fold_constant` method to `TypeFolder` and implemented it for normalization. Normalization can now, when it wants to eagerly evaluate a constant, normalize `mir::Constant` directly into a `mir::ConstantKind::Val` instead of relying on the `ty::Const` evaluation. In the future we can get rid of the `ty::Const` in there entirely and add our own `Unevaluated` variant to `mir::ConstantKind`. This would allow us to remove the `promoted` field from `ty::ConstKind::Unevaluated`, as promoteds can never occur in the type system. cc `@rust-lang/wg-const-eval` r? `@lcnr`
2021-03-31Add a new normalization query just for mir constantsOli Scherer-0/+9
2021-03-30Stream the dep-graph to a file.Camille GILLOT-4/+1
2021-03-29Don't duplicate the extern providers once for each cratebjorn3-15/+13
2021-03-12Implement valtreeOli Scherer-0/+9
valtree is a version of constants that is inherently safe to be used within types. This is in contrast to ty::Const which can have different representations of the same value. These representation differences can show up in hashing or equality comparisons, breaking type equality of otherwise equal types. valtrees do not have this problem.
2021-02-21Simplify hashing.Camille GILLOT-2/+2
2021-02-20Move print_query_stack to rustc_query_system.Camille GILLOT-33/+3
2021-02-20Move report_cycle to rustc_query_system.Camille GILLOT-57/+7
The call to `ty::print::with_forced_impl_filename_line` is done when constructing the description, at the construction of the QueryStackFrame.
2021-02-20Move Query to rustc_query_system.Camille GILLOT-43/+16
Rename it to QueryStackFrame and document a bit.
2021-02-20Do not hold query key in Query.Camille GILLOT-54/+62
2021-02-20Access the session directly from DepContext.Camille GILLOT-15/+0
2021-02-19Workaround rustdoc not honouring cfg(parallel_compiler).Camille GILLOT-4/+6
2021-02-19Move the query system to rustc_query_impl.Camille GILLOT-0/+1632