about summary refs log tree commit diff
path: root/src/librustc/ty/query
AgeCommit message (Collapse)AuthorLines
2018-08-19mv (mod) codemap source_mapDonato Sciarra-2/+2
2018-08-19mv filemap source_fileDonato Sciarra-5/+5
2018-08-19mv FileMap SourceFileDonato Sciarra-16/+16
2018-08-19mv CodeMap SourceMapDonato Sciarra-4/+4
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-09Move SVH structure to data structuresMark Rousskov-1/+1
2018-08-05Add lint for unknown feature attributesvarkor-0/+22
2018-08-02Fix more missed query dataWesley Wiser-0/+9
2018-08-02Fix some missed query dataWesley Wiser-4/+3
2018-08-02Basic incremental statsWesley Wiser-2/+15
2018-08-02Basic profilingWesley Wiser-0/+11
2018-07-28Don't format!() string literalsljedrz-54/+54
2018-07-21Convert implied_outlives_bounds to a queryTyler Mandry-0/+15
2018-07-21Auto merge of #52555 - petrochenkov:mresfact, r=alexcrichtonbors-2/+2
resolve: Some renaming, refactoring and comments Commits are self-descriptive. The only functional change is https://github.com/rust-lang/rust/commit/34bf2f572e33d4df1459413b5014ca98fc9fa4e0 that tightens shadowing rules for macro paths (makes the second and third cases in `test/ui/imports/glob-shadowing.rs` an error).
2018-07-20Revert some use of `PtrKey` to fix parallel_queries buildVadim Petrochenkov-3/+2
2018-07-20data_structures: Add a reference wrapper for pointer-indexed maps/setsVadim Petrochenkov-4/+5
Use `ptr::eq` for comparing pointers
2018-07-17Categorize queries for later self-profilingWesley Wiser-453/+563
Change the define_queries! macro per feedback on #51657. Big thanks to @mark-i-m for the help getting the macro changes correct!
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-8/+0
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-04Auto merge of #51895 - nikomatsakis:move-self-trait-predicate-to-items, ↵bors-4/+30
r=scalexm Move self trait predicate to items This is a "reimagination" of @tmandry's PR #50183. The main effect is described in this comment from one of the commits: --- Before we had the following results for `predicates_of`: ```rust trait Foo { // predicates_of: Self: Foo fn bar(); // predicates_of: Self: Foo (inherited from trait) } ``` Now we have removed the `Self: Foo` from the trait. However, we still add it to the trait ITEM. This is because when people do things like `<T as Foo>::bar()`, they still need to prove that `T: Foo`, and having it in the `predicates_of` seems to be the cleanest way to ensure that happens right now (otherwise, we'd need special case code in various places): ```rust trait Foo { // predicates_of: [] fn bar(); // predicates_of: Self: Foo } ``` However, we sometimes want to get the list of *just* the predicates truly defined on a trait item (e.g., for chalk, but also for a few other bits of code). For that, we define `predicates_defined_on`, which does not contain the `Self: Foo` predicate yet, and we plumb that through metadata and so forth. --- I'm assigning @eddyb as the main reviewer, but I thought I might delegate to scalexm for this one in any case. I also want to post an alternative that I'll leave in the comments; it occurred to me as I was writing. =) r? @eddyb cc @scalexm @tmandry @leodasvacas
2018-07-02introduce `predicates_defined_on` for traitsNiko Matsakis-4/+30
This new query returns only the predicates *directly defined* on an item (in contrast to the more common `predicates_of`, which returns the predicates that must be proven to reference an item). These two sets are almost always identical except for traits, where `predicates_of` includes an artificial `Self: Trait<...>` predicate (basically saying that you cannot use a trait item without proving that the trait is implemented for the type parameters). This new query is only used in chalk lowering, where this artificial `Self: Trait` predicate is problematic. We encode it in metadata but only where needed since it is kind of repetitive with existing information. Co-authored-by: Tyler Mandry <tmandry@gmail.com>
2018-06-30Fortify dummy span checkingVadim Petrochenkov-1/+1
2018-06-28Rollup merge of #51636 - oli-obk:const_diagnostics, r=eddybMark Rousskov-10/+10
Refactor error reporting of constants cc @eddyb This PR should not change any behaviour. It solely simplifies the internal handling of the errors
2018-06-28Auto merge of #50997 - michaelwoerister:pre-analyze-filemaps, r=Mark-Simulacrumbors-1/+1
Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable. This PR removes most of the interior mutability from `FileMap`, which should be beneficial, especially in a multithreaded setting. This is achieved by initializing the state in question when the filemap is constructed instead of during lexing. Hopefully this doesn't degrade performance. cc @wesleywiser
2018-06-28Merge `ConstVal` and `ConstValue`Oliver Schneider-8/+8
2018-06-28Move everything over from `middle::const_val` to `mir::interpret`Oliver Schneider-2/+2
2018-06-28Auto merge of #51538 - nikomatsakis:nll-perf-examination, r=eddybbors-24/+124
convert NLL ops to caches This is a extension of <https://github.com/rust-lang/rust/pull/51460>. It uses a lot more caching than we used to do. This caching is not yet as efficient as it could be, but I'm curious to see the current perf results. This is the high-level idea: in the MIR type checker, use [canonicalized queries](https://rust-lang-nursery.github.io/rustc-guide/traits/canonical-queries.html) for all the major operations. This is helpful because the MIR type check is operating in a context where all types are fully known (mostly, anyway) but regions are completely renumbered. This means we often wind up with duplicate queries like `Foo<'1, '2> :Bar` and `Foo<'3, '4>: Bar`. Canonicalized queries let us re-use the results. By the final commit in this PR, we can essentially just "read off" the resulting region relations and add them to the NLL type check.
2018-06-27Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.Michael Woerister-1/+1
2018-06-27fix wrong query descriptionNiko Matsakis-1/+1
2018-06-27Make opaque::Encoder append-only and make it infallibleJohn Kåre Alsaker-2/+2
2018-06-26introduce `Normalizable` trait for things directly normalizableNiko Matsakis-5/+71
2018-06-26convert `prove_predicate` into a queryNiko Matsakis-2/+18
2018-06-26make `Subtype` a true queryNiko Matsakis-1/+17
2018-06-26make `Eq` a true queryNiko Matsakis-24/+26
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-0/+4958