about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ich
AgeCommit message (Collapse)AuthorLines
2021-10-03Fully remove rustc_middle::ich.Camille GILLOT-165/+0
2021-10-03Remove re-export.Camille GILLOT-1/+1
2021-10-03Move ICH to rustc_query_system.Camille GILLOT-561/+1
2021-10-03Remove StableHashProvider.Camille GILLOT-31/+1
2021-10-03Move rustc_middle::middle::cstore to rustc_session.Camille GILLOT-2/+1
2021-10-03Move some HashStable impls.Camille GILLOT-41/+0
2021-09-23Auto merge of #89016 - lcnr:non_blanket_impls, r=nikomatsakis,michaelwoeristerbors-44/+3
fix non_blanket_impls iteration order We sometimes iterate over all `non_blanket_impls`, not sure if this is observable outside of error messages (i.e. as incremental bugs). This should fix the underlying issue of #86986. second attempt of #88718 r? `@nikomatsakis`
2021-09-21Fix match for placeholder regionAnkit Chandawala-1/+4
2021-09-21use indexmap instead of hashmaplcnr-44/+3
2021-09-11Auto merge of #84373 - cjgillot:resolve-span, r=michaelwoerister,petrochenkovbors-1/+6
Encode spans relative to the enclosing item The aim of this PR is to avoid recomputing queries when code is moved without modification. MCP at https://github.com/rust-lang/compiler-team/issues/443 This is achieved by : 1. storing the HIR owner LocalDefId information inside the span; 2. encoding and decoding spans relative to the enclosing item in the incremental on-disk cache; 3. marking a dependency to the `source_span(LocalDefId)` query when we translate a span from the short (`Span`) representation to its explicit (`SpanData`) representation. Since all client code uses `Span`, step 3 ensures that all manipulations of span byte positions actually create the dependency edge between the caller and the `source_span(LocalDefId)`. This query return the actual absolute span of the parent item. As a consequence, any source code motion that changes the absolute byte position of a node will either: - modify the distance to the parent's beginning, so change the relative span's hash; - dirty `source_span`, and trigger the incremental recomputation of all code that depends on the span's absolute byte position. With this scheme, I believe the dependency tracking to be accurate. For the moment, the spans are marked during lowering. I'd rather do this during def-collection, but the AST MutVisitor is not practical enough just yet. The only difference is that we attach macro-expanded spans to their expansion point instead of the macro itself.
2021-09-10Encode spans relative to their parent.Camille GILLOT-1/+6
2021-09-09Ignore automatically derived impls of `Clone` and `Debug` in dead code analysisFabian Wolff-2/+0
2021-07-16rename assert_matches moduleJane Lusby-1/+1
2021-07-15Rollup merge of #86947 - m-ou-se:assert-matches-to-submodule, r=yaahcYuki Okushi-0/+1
Move assert_matches to an inner module Fixes #82913
2021-07-13Cache expansion hash.Camille GILLOT-8/+0
2021-07-08Move [debug_]assert_matches to mod {core, std}::assert.Mara Bos-0/+1
2021-07-04Query-ify global limit attribute handlingAaron Hill-0/+2
2021-06-11Hash DefId in rustc_span.Camille GILLOT-51/+2
2021-05-05Rename RealFileName::Named to LocalPath and Devirtualized to RemappedAndy Wang-3/+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-31Add var to BoundRegion. Add query to get bound vars for applicable items.Jack Huey-3/+3
2021-03-31Track bound varsJack Huey-0/+1
2021-03-31Add tcx lifetime to BinderJack Huey-1/+1
2021-03-27Remove (lots of) dead codeJoshua Nelson-5/+0
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-18Remove unwrap_none/expect_none from compiler/.Mara Bos-1/+5
2021-03-11Remove useless method.Camille GILLOT-7/+0
2021-03-09Remove hir::Expr::attrs.Camille GILLOT-2/+1
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-2/+1
Items are guaranteed to be HIR owner.
2021-02-15Use ItemId as a strongly typed index.Camille GILLOT-1/+1
2021-01-23Add disambiugator to ExpnDataAaron Hill-0/+8
Due to macro expansion, its possible to end up with two distinct `ExpnId`s that have the same `ExpnData` contents. This violates the contract of `HashStable`, since two unequal `ExpnId`s will end up with equal `Fingerprint`s. This commit adds a `disambiguator` field to `ExpnData`, which is used to force two otherwise-equivalent `ExpnData`s to be distinct.
2021-01-11Auto merge of #79012 - tgnottingham:span_data_to_lines_and_cols, r=estebankbors-1/+8
rustc_span: add span_data_to_lines_and_cols to caching source map view
2020-12-18Make BoundRegion have a kind of BoungRegionKindJack Huey-3/+3
2020-12-03rustc_span: add span_data_to_lines_and_cols to caching source map viewTyson Nottingham-1/+8
Gives a performance increase over calling byte_pos_to_line_and_col twice, partially because it decreases the function calling overhead, potentially because it doesn't populate the line cache with lines that turn out to belong to invalid spans, and likely because of some other incidental improvements made possible by having more context available.
2020-11-15Rollup merge of #79036 - cjgillot:steal, r=oli-obkJonas Schievink-9/+0
Move Steal to rustc_data_structures.
2020-11-14Move Steal to rustc_data_structures.Camille GILLOT-9/+0
2020-11-09Do not collect tokens for doc commentsVadim Petrochenkov-2/+2
2020-10-21Unconditionally capture tokens for attributes.Aaron Hill-1/+2
This allows us to avoid synthesizing tokens in `prepend_attr`, since we have the original tokens available. We still need to synthesize tokens when expanding `cfg_attr`, but this is an unavoidable consequence of the syntax of `cfg_attr` - the user does not supply the `#` and `[]` tokens that a `cfg_attr` expands to.
2020-10-13Replace absolute paths with relative onesest31-14/+8
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-08Implement the instruction_set attributexd009642-0/+6
2020-08-30mv compiler to compiler/mark-0/+891