about summary refs log tree commit diff
path: root/compiler/rustc_incremental
AgeCommit message (Collapse)AuthorLines
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-6/+3
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-2/+3
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-3/+3
2022-11-24make `error_reported` check for delayed bugsBoxy-3/+3
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-4/+4
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-10Rollup merge of #102829 - compiler-errors:rename-impl-item-kind, r=TaKO8KiYuki Okushi-1/+1
rename `ImplItemKind::TyAlias` to `ImplItemKind::Type` The naming of this variant seems inconsistent given that this is not really a "type alias", and the associated type variant for `TraitItemKind` is just called `Type`.
2022-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-1/+1
2022-09-29Remove from compiler/ cratesreez12g-1/+0
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-4/+4
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-08-01Remove trait_of_item query.Camille GILLOT-1/+1
2022-07-20Remove unused StableMap and StableSet types from rustc_data_structuresMichael Woerister-2/+2
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-12/+12
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-07Rollup merge of #98844 - cjgillot:deep-visit, r=jyn514Matthias Krüger-1/+1
Reword comments and rename HIR visiting methods. Sparked by this discussion in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Confused.20by.20comment.20on.20.60deep_visit_item_likes_in_module.60) r? ``@jyn514`` ``@camsteffen``
2022-07-07Reword comments and rename HIR visiting methods.Camille GILLOT-1/+1
2022-07-06incr: cache dwarf objects in work productsDavid Wood-38/+37
Cache DWARF objects alongside object files in work products when those exist so that DWARF object files are available for thorin in packed mode in incremental scenarios. Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-18Auto merge of #98153 - nnethercote:fix-MissingDoc-quadratic-behaviour, ↵bors-2/+1
r=cjgillot Fix `MissingDoc` quadratic behaviour Best reviewed one commit at a time. r? `@cjgillot`
2022-06-16Move `finish` out of the `Encoder` trait.Nicholas Nethercote-1/+1
This simplifies things, but requires making `CacheEncoder` non-generic. (This was previously merged as commit 4 in #94732 and then was reverted in #97905 because it caused a perf regression.)
2022-06-16Remove unused `hir_id` arg from `visit_attribute`.Nicholas Nethercote-2/+1
2022-06-14Rename rustc_serialize::opaque::Encoder as MemEncoder.Nicholas Nethercote-3/+3
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in #94732 and then was reverted in #97905 because of a perf regression caused by commit 4 in #94732.)
2022-06-10Revert dc08bc51f2c58a0f5f815a07f9bb3d671153b5a1.Nicholas Nethercote-1/+1
2022-06-10Revert b983e42936feab29f6333e9835913afc6b4a394e.Nicholas Nethercote-4/+4
2022-06-08Rename `rustc_serialize::opaque::Encoder` as `MemEncoder`.Nicholas Nethercote-4/+4
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports).
2022-06-08Move `finish` out of the `Encoder` trait.Nicholas Nethercote-1/+1
This simplifies things, but requires making `CacheEncoder` non-generic.
2022-06-08Use delayed error handling for `Encodable` and `Encoder` infallible.Nicholas Nethercote-50/+28
There are two impls of the `Encoder` trait: `opaque::Encoder` and `opaque::FileEncoder`. The former encodes into memory and is infallible, the latter writes to file and is fallible. Currently, standard `Result`/`?`/`unwrap` error handling is used, but this is a bit verbose and has non-trivial cost, which is annoying given how rare failures are (especially in the infallible `opaque::Encoder` case). This commit changes how `Encoder` fallibility is handled. All the `emit_*` methods are now infallible. `opaque::Encoder` requires no great changes for this. `opaque::FileEncoder` now implements a delayed error handling strategy. If a failure occurs, it records this via the `res` field, and all subsequent encoding operations are skipped if `res` indicates an error has occurred. Once encoding is complete, the new `finish` method is called, which returns a `Result`. In other words, there is now a single `Result`-producing method instead of many of them. This has very little effect on how any file errors are reported if `opaque::FileEncoder` has any failures. Much of this commit is boring mechanical changes, removing `Result` return values and `?` or `unwrap` from expressions. The more interesting parts are as follows. - serialize.rs: The `Encoder` trait gains an `Ok` associated type. The `into_inner` method is changed into `finish`, which returns `Result<Vec<u8>, !>`. - opaque.rs: The `FileEncoder` adopts the delayed error handling strategy. Its `Ok` type is a `usize`, returning the number of bytes written, replacing previous uses of `FileEncoder::position`. - Various methods that take an encoder now consume it, rather than being passed a mutable reference, e.g. `serialize_query_result_cache`.
2022-06-07Rollup merge of #97058 - bjorn3:multi_artifact_work_products, r=nagisaDylan DPC-47/+34
Various refactors to the incr comp workproduct handling This is the result of me looking into adding support for having multiple object files for a single codegen unit to incr comp. This is necessary to support inline assembly in cg_clif without requiring partial linking which is not supported on Windows and seems to fail on macOS for some reason. Cg_clif uses an external assembler to handle inline asm and thus produces one object file with regular functions and one object file containing compiled inline asm for each codegen unit which uses inline asm. Current incr comp can't handle this. This PR doesn't yet add support for this, but it makes it easier to do so.
2022-06-06Make saved_file field of WorkProduct non-optionalbjorn3-30/+21
A WorkProduct without a saved file is useless
2022-06-06Factor Option out of copy_cgu_workproduct_to_incr_comp_cache_dir callbjorn3-17/+13
This improves clarity of the code a bit
2022-06-06Avoid an unnecessary clone for copy_cgu_workproduct_to_incr_comp_cache_dir callsbjorn3-2/+2
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-13rename visit item-like methodsMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove ItemLikeVisitor and DeepVisitorMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-10only_local: always check for misuselcnr-5/+2
2022-05-02fix most compiler/ doctestsElliot Roberts-1/+2
2022-04-21Rollup merge of #95434 - cjgillot:dump-dep-kind, r=oli-obkDylan DPC-25/+28
Only output DepKind in dump-dep-graph. When printing the whole DepNode, the output file is simply too massive to be actually useful for profiling. This trimmed down version mixes a lot of information together, but it also allows to ask questions such that "why does this query ever access HIR?".
2022-04-17Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillotbors-21/+20
Refactor HIR item-like traversal (part 1) Issue #95004 - Create hir_crate_items query which traverses tcx.hir_crate(()).owners to return a hir::ModuleItems - use tcx.hir_crate_items in tcx.hir().items() to return an iterator of hir::ItemId - use tcx.hir_crate_items to introduce a tcx.hir().par_items(impl Fn(hir::ItemId)) to traverse all items in parallel; Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com> cc `@cjgillot`
2022-04-09replace tcx.hir().item with tcx.def_span queryMiguel Guarniz-9/+6
2022-04-08remove ItemLikeVisitor impls in incremental, interface, metadata and ↵Miguel Guarniz-19/+0
symbol_mangling crates Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-08remove some uses of visit_all_item_likes in incremental, metadata and ↵Miguel Guarniz-1/+22
interface crates Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-08check_doc_keyword: don't alloc string for emptiness checkklensy-14/+9
check_doc_alias_value: get argument as Symbol to prevent needless string convertions check_doc_attrs: don't alloc vec, iterate over slice. Vec introduced in #83149, but no perf run posted on merge replace as_str() check with symbol check get_single_str_from_tts: don't prealloc string trivial string to str replace LifetimeScopeForPath::NonElided use Vec<Symbol> instead of Vec<String> AssertModuleSource use BTreeSet<Symbol> instead of BTreeSet<String> CrateInfo.crate_name replace FxHashMap<CrateNum, String> with FxHashMap<CrateNum, Symbol>
2022-03-30Spellchecking some commentsYuri Astrakhan-1/+1
This PR attempts to clean up some minor spelling mistakes in comments
2022-03-29Only output DepKind in dump-dep-graph.Camille GILLOT-25/+28
When printing the whole DepNode, the output file is simply too massive to be actually useful for profiling. This trimmed down version mixes a lot of information together, but it also allows to ask questions such that "why does this query ever access HIR?".
2022-03-25incr. comp.: Let compiler retry finalizing session directory a few times.Michael Woerister-2/+23
See https://github.com/rust-lang/rust/issues/86929.
2022-03-16rustc_error: make ErrorReported impossible to constructmark-6/+5
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-03all: fix some typoscuishuang-1/+1
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-02rename ErrorReported -> ErrorGuaranteedmark-7/+7
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-19Adopt let else in more placesest31-32/+21
2022-02-01add a rustc::query_stability lintlcnr-0/+1