rust/src/librustc_typeck
bors 99a9d6806d Auto merge of #51538 - nikomatsakis:nll-perf-examination, r=eddyb
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-28 01:41:40 +00:00
..
check change the enter_canonical_trait_query method to give a fulfill cx 2018-06-27 16:04:32 -04:00
coherence Simply joint lifetime/type iteration 2018-06-20 12:21:52 +01:00
outlives rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
variance rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
astconv.rs Simplify some counting 2018-06-20 12:23:46 +01:00
Cargo.toml Remove fmt_macros dependency 2018-06-05 15:55:07 -06:00
check_unused.rs rework to report errors from crates in a consistent order 2018-06-01 11:00:18 -04:00
collect.rs Don't inspect the generated existential type items 2018-06-26 16:36:32 +02:00
constrained_type_params.rs bring TyCtxt into scope 2017-09-14 21:26:06 -04:00
diagnostics.rs migrate codebase to ..= inclusive range patterns 2018-06-26 07:53:30 -07:00
impl_wf_check.rs rustc: move TypeParamDef's fields into GenericParamDefKind::Type. 2018-05-21 12:13:19 +03:00
lib.rs change the enter_canonical_trait_query method to give a fulfill cx 2018-06-27 16:04:32 -04:00
namespace.rs Check namespaces when resolving associated items in typeck 2017-10-15 11:58:32 +01:00
README.md Move librustc_typeck READMEs to rustc guide 2018-03-12 20:05:18 -05:00
structured_errors.rs Rename -Z explain to -Z teach 2018-01-23 11:34:57 -08:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.