summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta/encoder.rs
AgeCommit message (Collapse)AuthorLines
2023-05-19Encode VariantIdx so we can decode variants in the right orderMichael Goulet-1/+2
(cherry picked from commit ff54c801f0c1552941bda472df992e9f9be25f33)
2023-04-27Encode lifetime param spans tooMichael Goulet-1/+1
(cherry picked from commit 24c2c075cc2216af8868809fdd68c9da8466c327)
2023-04-26Encode def span for ConstParamMichael Goulet-2/+2
(cherry picked from commit 1ee189cde53a4cecd3e8811d6ffe983676a70c7b)
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-47/+15
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-11Split implied and super predicate queriesMichael Goulet-1/+5
2023-04-10rustc_metadata: Filter encoded data more aggressively using `DefKind`Vadim Petrochenkov-10/+127
2023-04-10rustc_metadata: Cleanup `fn encode_info_for_item`Vadim Petrochenkov-62/+33
2023-04-08rustc_middle: Remove `Option` from `module_reexports` queryVadim Petrochenkov-2/+2
2023-04-06Rollup merge of #109984 - scottmcm:less-float, r=NilstriebMatthias Krüger-2/+0
Remove f32 & f64 from MemDecoder/MemEncoder r? ```@Nilstrieb``` since they said (maybe joked) on discord that it's a bug if the compiler uses f32 anywhere 🙃
2023-04-06Remove f32 & f64 from MemDecoder/MemEncoderScott McMurray-2/+0
2023-04-04Remove a lock in favor of an AppendOnlyVecOli Scherer-2/+1
2023-03-23Don't split up TreatProjections and TreatParams anymoreMichael Goulet-2/+1
2023-03-22Rollup merge of #109358 - petrochenkov:nosess, r=cjgillotMatthias Krüger-12/+10
rustc: Remove unused `Session` argument from some attribute functions (One auxiliary test file containing one of these functions was unused, so I removed it instead of updating.)
2023-03-22rustc: Remove unused `Session` argument from some attribute functionsVadim Petrochenkov-12/+10
2023-03-21RPITITs are DefKind::Opaque with new lowering strategyMichael Goulet-1/+12
2023-03-21Always encode RPITITsSantiago Pastorino-1/+7
2023-03-21LocalCrate keyMichael Goulet-2/+3
2023-03-21Use local key in providersMichael Goulet-8/+4
2023-03-20Rollup merge of #109362 - nnethercote:split-meta-stats-items, r=bjorn3Matthias Krüger-4/+3
Split `items` from `-Zmeta-stats` in two. Because it's one of the biggest sections. r? `@bjorn3`
2023-03-20Update some names and commentsMichael Goulet-2/+2
2023-03-20Split `items` from `-Zmeta-stats` in two.Nicholas Nethercote-4/+3
Because it's one of the biggest sections.
2023-03-18Implement FixedSizeEncoding for UnusedGenericParams.Camille GILLOT-3/+1
2023-03-15Rename impl_trait_in_trait_parent to impl_trait_in_trait_parent_fnSantiago Pastorino-1/+1
2023-03-15Auto merge of #109089 - compiler-errors:opt_rpitit_info-follow-up, r=spastorinobors-0/+8
Encode `opt_rpitit_info` for associated types Follow-up, only last commit matters r? `@spastorino` This needs a perf run after the parent pr lands
2023-03-14Encode opt_rpitit_info for associated typesMichael Goulet-0/+8
2023-03-14Get impl defaultness using querySantiago Pastorino-2/+3
2023-03-13Better names?Michael Goulet-2/+2
2023-03-13Treat projections with infer as placeholder during fast reject in new solverMichael Goulet-1/+2
2023-03-12Auto merge of #108820 - cjgillot:ensure-on-disk, r=oli-obkbors-3/+3
Ensure value is on the on-disk cache before returning from `ensure()`. The current logic for `ensure()` a query just checks that the node is green in the dependency graph. However, a lot of places use `ensure()` to prevent the query from being called later. This is the case before stealing a query result. If the query is actually green but the value is not available in the on-disk cache, `ensure` would return, but a subsequent call to the full query would run the code, and attempt to read from a stolen value. This PR conforms the query system to the usage by checking whether the queried value is loadable from disk before returning. Sadly, I can't manage to craft a proper test... Should fix all instances of "attempted to read from stolen value".
2023-03-11Use ensure_with_value in a few more places.Camille GILLOT-3/+3
2023-03-06Add tcx::lower_impl_trait_in_trait_to_assoc_ty to avoid accessing through ↵Santiago Pastorino-1/+1
sess.opts.unstable_opts
2023-03-03Match unmatched backticks in comments in compiler/est31-1/+1
2023-03-01Properly implement should_encode_fn_impl_trait_in_trait using new unstable ↵Santiago Pastorino-3/+12
option
2023-02-28Descriptive error when users try to combine RPITIT/AFIT with specializationMichael Goulet-29/+1
2023-02-19Add associated_items_for_impl_trait_in_trait querySantiago Pastorino-0/+9
2023-02-17Make encode_attrs use opt_local_def_id_to_hir_id so we can feed it with None ↵Santiago Pastorino-2/+2
for definitions that have no HIR
2023-02-16fix ugly skip_binderKyle Matsuda-1/+2
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-8/+8
2023-02-13rustdoc: Eliminate remaining uses of resolverVadim Petrochenkov-0/+16
2023-02-10Resolve documentation links in rustc and store the results in metadataVadim Petrochenkov-10/+27
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 `DefPathHash`es without an `Option`Vadim Petrochenkov-2/+2
2023-02-05rustc_metadata: Encode/decode some `LazyArray`s without an `Option`Vadim Petrochenkov-12/+15
Also add asserts to decoding `LazyArray`s with `Option`
2023-02-05rustc_metadata: Support encoding/decoding `LazyArray` without an `Option`Vadim Petrochenkov-3/+3
2023-02-05rustc_metadata: Refactor lazy table reading/writingVadim Petrochenkov-55/+45
Change wording from "nullable" to "default". Introduce a trait `IsDefault` for detecting values that are encoded as zeros or not encoded at all. Add panics to impossible cases. Some other minor cleanups.
2023-01-29Test drop_tracking_mir before querying generator.Camille GILLOT-1/+1
2023-01-29Auto merge of #107406 - cjgillot:eliminate-witnesses, r=compiler-errorsbors-1/+1
Only compute mir_generator_witnesses query in drop_tracking_mir mode. Attempt to fix the perf regression in https://github.com/rust-lang/rust/pull/101692 r? `@ghost`
2023-01-28Remove `HirId -> LocalDefId` map from HIR.Camille GILLOT-2/+2
2023-01-28Only compute mir_generator_witnesses query in drop_tracking_mir mode.Camille GILLOT-1/+1
2023-01-27Separate witness type computation from the generator transform.Camille GILLOT-0/+4
2023-01-27Auto merge of #107055 - kylematsuda:eb-fn-sig, r=lcnrbors-2/+2
Switch to `EarlyBinder` for `fn_sig` query Part of the work to finish #105779 (also see https://github.com/rust-lang/types-team/issues/78). Several queries `X` have a `bound_X` variant that wraps the output in [`EarlyBinder`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/struct.EarlyBinder.html). This adds `EarlyBinder` to the return type of the `fn_sig` query and removes `bound_fn_sig`. r? `@lcnr`