summary refs log tree commit diff
path: root/src/librustc/ty/query
AgeCommit message (Collapse)AuthorLines
2019-12-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-7/+2
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-1/+0
2019-11-19Move the definition of `QueryResult` into `plumbing.rs`.Nicholas Nethercote-13/+11
Because it's the only file that uses it, and removes the need for importing it.
2019-11-15Rollup merge of #66013 - nnethercote:avoid-hashing-twice-in-get_query, r=ZoxcYuki Okushi-3/+13
Avoid hashing the key twice in `get_query()`. For a single-threaded parallel compiler, this reduces instruction counts across several benchmarks, by up to 2.8%. The commit also adds documentation about `Sharded`'s use of `FxHasher`. r? @Zoxc
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+2
2019-11-12Register queries with self profiler in rustc_interfaceMark Rousskov-1/+3
2019-11-12Move self-profile infrastructure to data structuresMark Rousskov-4/+14
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
2019-11-08Stop returning promotables from `mir_const_qualif`Dylan MacKenzie-1/+0
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-1/+1
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-04Avoid hashing the key twice in `get_query()`.Nicholas Nethercote-3/+13
For a single-threaded parallel compiler, this reduces instruction counts across several benchmarks, by up to 2.8%. The commit also adds documentation about `Sharded`'s use of `FxHasher`.
2019-11-02Convert `x.as_str().to_string()` to `x.to_string()` where possible.Nicholas Nethercote-1/+1
2019-11-01`Span` cannot represent `span.hi < span.lo`Vadim Petrochenkov-5/+0
So we can remove the corresponding checks from various code
2019-10-27Always use consteval to codegen caller_location.Adam Perry-0/+10
2019-10-25self-profiling: Switch query-blocking measurements to RAII-style API.Michael Woerister-2/+12
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-5/+4
Remove `InternedString` This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places. r? @eddyb
2019-10-21Remove many unnecessary trait derivations.Nicholas Nethercote-2/+2
2019-10-21Use `Symbol` for codegen unit names.Nicholas Nethercote-3/+2
This is a straightforward replacement except for two places where we have to convert to `LocalInternedString` to get a stable sort.
2019-10-21Change `SymbolName::name` from `InternedString` to `Symbol`.Nicholas Nethercote-2/+2
This requires changing the `PartialOrd`/`Ord` implementations to look at the chars rather than the symbol index.
2019-10-21Remove unnecessary trait bounds from `keys::Keys`.Nicholas Nethercote-7/+2
2019-10-18rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole ↵Eduard-Mihai Burtescu-3/+4
struct.
2019-10-08Rollup merge of #65081 - Mark-Simulacrum:remove-profile-queries, ↵Mazdak Farrokhzad-50/+1
r=michaelwoerister Remove -Zprofile-queries r? @michaelwoerister Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
2019-10-08Rollup merge of #65176 - nnethercote:rm-query-macros, r=michaelwoeristerMazdak Farrokhzad-32/+13
Remove query-related macros The query system has a few macros that only have one or two call sites, and I find they hurt readability. This PR removes them. r? @michaelwoerister
2019-10-08Rollup merge of #65162 - Mark-Simulacrum:no-cache-loading-map, ↵Mazdak Farrokhzad-8/+0
r=michaelwoerister Remove loaded_from_cache map from DepGraph It's now unused, even with -Zquery-dep-graph From https://github.com/rust-lang/rust/pull/63756/files#r316039379 -- it'll simplify that PR to get this landed separately so we can just remove some of the code that it touches. r? @Zoxc or @michaelwoerister
2019-10-07Remove `force_ex!`.Nicholas Nethercote-13/+5
2019-10-07Remove `def_id!`.Nicholas Nethercote-12/+9
2019-10-07Remove `krate!`.Nicholas Nethercote-5/+1
2019-10-07Remove `force!`.Nicholas Nethercote-5/+1
2019-10-06Remove loaded_from_cache map from DepGraphMark Rousskov-8/+0
It's now unused, even with -Zquery-dep-graph
2019-10-05Pacify tidyJonas Schievink-1/+4
2019-10-05Fix the bootstrapJonas Schievink-0/+8
2019-10-04Rollup merge of #64874 - matthewjasper:simplify-euv, r=eddybMazdak Farrokhzad-1/+1
Simplify ExprUseVisitor * Remove HIR const qualification * Remove parts of ExprUseVisitor that aren't being used r? @eddyb
2019-10-03Remove -Zprofile-queriesMark Rousskov-50/+1
2019-10-01Rollup merge of #64840 - michaelwoerister:self-profiling-raii-refactor, ↵Tyler Mandry-15/+11
r=wesleywiser SelfProfiler API refactoring and part one of event review This PR refactors the `SelfProfiler` a little bit so that most profiling methods are RAII-based. The codegen backend code already had something similar, this refactoring pulls this functionality up into `SelfProfiler` itself, for general use. The second commit of this PR is a review and update of the existing events we are already recording. Names have been made more consistent. CGU names have been removed from event names. They will be added back in when function parameter recording is implemented. There is still some work to be done for adding new events, especially around trait resolution and the incremental system. r? @wesleywiser
2019-09-30Remove HIR based const qualificationMatthew Jasper-1/+1
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-15/+11
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-2/+2
2019-09-29remove bit_set re-export from rustc_data_structurescsmoe-2/+2
2019-09-29Rollup merge of #64824 - Mark-Simulacrum:no-stable-hasher-result-everywhere, ↵Mazdak Farrokhzad-6/+3
r=michaelwoerister No StableHasherResult everywhere This removes the generic parameter on `StableHasher`, instead moving it to the call to `finish`. This has the side-effect of making all `HashStable` impls nicer, since we no longer need the verbose `<W: StableHasherResult>` that previously existed -- often forcing line wrapping. This is done for two reasons: * we should avoid false "generic" dependency on the result of StableHasher * we don't need to codegen two/three copies of all the HashStable impls when they're transitively used to produce a fingerprint, u64, or u128. I haven't measured, but this might actually make our artifacts somewhat smaller too. * Easier to understand/read/write code -- the result of the stable hasher is irrelevant when writing a hash impl.
2019-09-29Rollup merge of #64799 - Aaron1011:fix/double-panic, r=Mark-SimulacrumMazdak Farrokhzad-2/+6
Fix double panic when printing query stack during an ICE On the latest nightly, any call to `bug` or `span_bug` will result in two panics - the first one as a normal result of calling `bug` / `span_bug`, and the second as a result of trying to print the query stack from the panic handler. This is caused by the query-printing code attempting to acquire a lock on `HandlerInnder`, which is still being held by `bug`. This PR moves the actual panic out of `HandlerInner`, into `Handler`. This allows us to release the lock on `HandlerInner` before triggering the panic, ensuring that the panic handler will be able to acquire the lock if necessary.
2019-09-28Switch over all StableHash impls to new formatMark Rousskov-6/+3
2019-09-28Rollup merge of #64781 - Mark-Simulacrum:no-global-tcx, r=eddybMazdak Farrokhzad-8/+8
Remove stray references to the old global tcx
2019-09-27cleanup dead ast-borrowck / migrate-mode code.Mazdak Farrokhzad-1/+0
2019-09-27cleanup check_match wrt. SignalledError.Mazdak Farrokhzad-1/+1
2019-09-27Remove global_tcx from TyCtxtMark Rousskov-8/+8
The non-global context was removed; there's only one context now. This is a noop method that only serves to confuse readers -- remove it.
2019-09-26Add note about global state in try_print_query_stackAaron Hill-0/+3
2019-09-26Use existing Handler to print query stackAaron Hill-2/+3
When the panic handler is run, the existing Handler may be in a weird state if it was responsible for triggering the panic. By using a freshly created Handler, we avoid trying to re-entrantly lock a HandlerInner, which was causing a double panic on ICEs.
2019-09-23Auto merge of #64272 - Mark-Simulacrum:parallel-handler, r=estebankbors-4/+3
Refactor librustc_errors::Handler API This should be reviewed by-commit. The last commit moves all fields into an inner struct behind a single lock; this is done to prevent possible deadlocks in a multi-threaded compiler, as well as inconsistent state observation.
2019-09-18Fix backticks in documentationJoshua Groves-1/+1
2019-09-17Privatize DiagnosticBuilder constructorsMark Rousskov-4/+3