about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta/decoder
AgeCommit message (Collapse)AuthorLines
2023-05-25rustc_metadata: use AtomicBool for privateness instead of LockMichael Howell-2/+5
2023-05-25rustc_metadata: inherit dependency privacy flagMichael Howell-1/+4
2023-05-24Rollup merge of #111870 - WaffleLapkin:just_🌟traits🌟_query, ↵Matthias Krüger-1/+1
r=compiler-errors Rename `traits_in_crate` query to `traits` > NOTE: Not named just `traits` due to a naming conflict. This can, in fact, be easily avoided.
2023-05-23Rename `traits_in_crate` query to `traits`Maybe Waffle-1/+1
2023-05-18Rollup merge of #111703 - Zoxc:queries-mod, r=cjgillotDylan DPC-2/+2
Merge query property modules into one This merges all the query modules that defines types into a single module per query with a normal naming convention for type aliases. r? ``@cjgillot``
2023-05-18Merge query property modules into oneJohn KÃ¥re Alsaker-2/+2
2023-05-17Retire is_foreign_item query.Camille GILLOT-1/+0
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn KÃ¥re Alsaker-3/+3
2023-04-25Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, ↵Matthias Krüger-1/+1
r=compiler-errors Switch to `EarlyBinder` for `explicit_item_bounds` Part of the work to finish https://github.com/rust-lang/rust/issues/105779. This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`. r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-0/+3
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-22Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwcobors-3/+0
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: https://github.com/rust-lang/libs-team/issues/192 Closes #51540 Closes #51245
2023-04-21Auto merge of #110648 - Dylan-DPC:rollup-em3ovcq, r=Dylan-DPCbors-1/+1
Rollup of 5 pull requests Successful merges: - #110333 (rustc_metadata: Split `children` into multiple tables) - #110501 (rustdoc: fix ICE from rustc_resolve and librustdoc parse divergence) - #110608 (Specialize some `io::Read` and `io::Write` methods for `VecDeque<u8>` and `&[u8]`) - #110632 (Panic instead of truncating if the incremental on-disk cache is too big) - #110633 (More `mem::take` in `library`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-21Changes from reviewKyle Matsuda-5/+1
2023-04-21rustc_metadata: Split `children` into multiple tablesVadim Petrochenkov-1/+1
instead of merging everything into a single bag. If it's acceptable from performance point of view, then it's more clear to keep this stuff organized more in accordance with its use.
2023-04-20add EarlyBinder to output of explicit_item_bounds; replace ↵Kyle Matsuda-1/+5
bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query
2023-04-19resolve: Remove `module_children_untracked`Vadim Petrochenkov-8/+0
2023-04-16Remove #[alloc_error_handler] from the compiler and libraryAmanieu d'Antras-3/+0
2023-04-11Split implied and super predicate queriesMichael Goulet-1/+13
2023-03-23rustc_metadata: Freeze cstore after the full crate list is queriedVadim Petrochenkov-0/+3
2023-03-23resolve: Rename some cstore methods to match queries and add commentsVadim Petrochenkov-4/+4
about costs associated with replacing them with query calls.
2023-03-23Auto merge of #109517 - matthiaskrgr:rollup-m3orqzd, r=matthiaskrgrbors-12/+0
Rollup of 7 pull requests Successful merges: - #108541 (Suppress `opaque_hidden_inferred_bound` for nested RPITs) - #109137 (resolve: Querify most cstore access methods (subset 2)) - #109380 (add `known-bug` test for unsoundness issue) - #109462 (Make alias-eq have a relation direction (and rename it to alias-relate)) - #109475 (Simpler checked shifts in MIR building) - #109504 (Stabilize `arc_into_inner` and `rc_into_inner`.) - #109506 (make param bound vars visibly bound vars with -Zverbose) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-23Rollup merge of #109137 - petrochenkov:qcstore2, r=cjgillotMatthias Krüger-12/+0
resolve: Querify most cstore access methods (subset 2) These changes are less likely to cause perf regressions than the rest of https://github.com/rust-lang/rust/pull/108346.
2023-03-22Rollup merge of #109213 - oli-obk:cstore, r=cjgillotMatthias Krüger-1/+4
Eagerly intern and check CrateNum/StableCrateId collisions r? ``@cjgillot`` It seems better to check things ahead of time than checking them afterwards. The [previous version](https://github.com/rust-lang/rust/pull/108390) was a bit nonsensical, so this addresses the feedback
2023-03-21LocalCrate keyMichael Goulet-5/+6
2023-03-21Use local key in providersMichael Goulet-18/+5
2023-03-21Eagerly intern and check CrateNum/StableCrateId collisionsOli Scherer-1/+4
2023-03-20Update some names and commentsMichael Goulet-1/+1
2023-03-18Implement FixedSizeEncoding for UnusedGenericParams.Camille GILLOT-9/+1
2023-03-16resolve: Remove `item_attrs_untracked`Vadim Petrochenkov-8/+0
2023-03-16resolve: Remove `item_generics_num_lifetimes`Vadim Petrochenkov-4/+0
2023-03-15Rollup merge of #109109 - compiler-errors:polymorphize-foreign, r=NilstriebDylan DPC-1/+9
Use `unused_generic_params` from crate metadata Due to the way that `separate_provide_extern` interacted with the implementation of `<ty::InstanceDef<'tcx> as Key>::query_crate_is_local`, we actually never hit the foreign provider for `unused_generic_params`. Additionally, since the *local* provider of `unused_generic_params` calls `should_polymorphize`, which always returns false if the def-id is foreign, this means that we never actually polymorphize monomorphic instances originating from foreign crates. We don't actually encode `unused_generic_params` for items where all generics are used, so I had to tweak the foreign provider to fall back to `ty::UnusedGenericParams::new_all_used()` to avoid more ICEs when the above bugs were fixed.
2023-03-14Use `unused_generic_params` from crate metadataMichael Goulet-1/+9
2023-03-13metadata: Remove some more untracked `CStore` methodsVadim Petrochenkov-10/+4
2023-03-13resolve: Remove `struct_field_names_untracked`Vadim Petrochenkov-9/+1
2023-03-13resolve: Remove `fn_has_self_parameter_untracked`Vadim Petrochenkov-4/+0
2023-03-13resolve: Remove `struct_field_visibilities_untracked`Vadim Petrochenkov-8/+1
2023-03-13resolve: Remove `visibility_untracked`Vadim Petrochenkov-4/+0
2023-02-21Rollup merge of #108141 - spastorino:add_rpitit_queries, r=compiler-errorsDylan DPC-0/+2
Add rpitit queries This is part of the changes we are making to lower RPITITs as an associated type. The rest of the stuff will follow under a `-Z` flag. I still need to add comments to the code, explain stuff and also I'd need to avoid encoding in metadata when rpitit queries return `&[]` r? `@compiler-errors`
2023-02-20Make untracked.cstore lockable so that resolution can still write to it when ↵Oli Scherer-1/+7
using TyCtxt
2023-02-19Add associated_items_for_impl_trait_in_trait querySantiago Pastorino-0/+2
2023-02-16Factor query arena allocation out from query cachesJohn KÃ¥re Alsaker-1/+1
2023-02-13rustdoc: Eliminate remaining uses of resolverVadim Petrochenkov-14/+1
2023-02-10Resolve documentation links in rustc and store the results in metadataVadim Petrochenkov-30/+4
This commit implements MCP https://github.com/rust-lang/compiler-team/issues/584 It also removes code that is no longer used, and that includes code cloning resolver, so issue #83761 is fixed.
2023-02-05rustc_metadata: Encode/decode some `LazyArray`s without an `Option`Vadim Petrochenkov-2/+11
Also add asserts to decoding `LazyArray`s with `Option`
2023-01-27Separate witness type computation from the generator transform.Camille GILLOT-0/+1
2023-01-25rustdoc: Collect rustdoc-reachable items during early doc link resolutionVadim Petrochenkov-0/+6
2023-01-23rustc_metadata: Support non-`Option` nullable values in metadata tablesVadim Petrochenkov-6/+1
This is a convenience feature for cases in which "no value in the table" and "default value in the table" are equivalent. Tables using `Table<DefIndex, ()>` are migrated in this PR, some other cases can be migrated later. This helps `DocFlags` in https://github.com/rust-lang/rust/pull/107136 in particular.
2023-01-21rustc_metadata: Encode `doc(hidden)` flag to metadataVadim Petrochenkov-2/+6
To retrieve these flags rustdoc currently has to mass decode full attributes for items in the whole crate tree, so it's better to pre-compute it in advance. This is especially for short-term performance of https://github.com/rust-lang/rust/pull/107054 because resolver cannot use memoization of query results yet.
2023-01-21Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obkbors-3/+4
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc) This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble. The changes required are moderate but non-zero: - In some places the collections are extracted into sorted vecs. - There are a few instances where for-loops have been changed to extends. ~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~ Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)). Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). r? `@ghost`
2023-01-19Conditionally encode booleanMichael Goulet-1/+9