Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert NLL ops to caches #51538

Merged
merged 72 commits into from
Jun 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
909b10c
introduce `type_op`
nikomatsakis Jun 6, 2018
2b52793
introduce `Subtype` type_op
nikomatsakis Jun 6, 2018
9b4fe44
introduce `Eq` type-op
nikomatsakis Jun 6, 2018
7c62461
introduce `trivial_noop` to accommodate micro-optimizations
nikomatsakis Jun 6, 2018
214d765
introduce `prove_predicates` type op
nikomatsakis Jun 6, 2018
8147d17
make `normalize` take ownership of the thing to be normalized
nikomatsakis Jun 6, 2018
f998628
let `trivial_noop` take ownership of `self`
nikomatsakis Jun 6, 2018
846cc26
make normalize into an op
nikomatsakis Jun 6, 2018
13e7793
create `InfcxTypeOp` that only depend on an `infcx`
nikomatsakis Jun 7, 2018
5829746
resolve type vars *before* entering `type_must_outlive`
nikomatsakis Jun 7, 2018
b858ed5
obligations.rs: rustfmt
nikomatsakis Jun 7, 2018
65ceec7
make `TypeOutlives` parameterized over a delegate
nikomatsakis Jun 7, 2018
e7a9e7a
extract a `enabled` helper to remove some ad-hoc conditionals
nikomatsakis Jun 7, 2018
7a641cb
make `TypeOp` implement debug instead of carrying a closure
nikomatsakis Jun 7, 2018
252a6df
introduce `DropckOutlives` type-op
nikomatsakis Jun 7, 2018
dee1886
promote `type_op` into a `mod.rs` file
nikomatsakis Jun 7, 2018
efc84c8
remove the `TypeOp` vs `InfcxTypeOp` distinction
nikomatsakis Jun 7, 2018
6ac8917
mk `fully_perform_op_and_get_region_constraint_data` a TypeOp method
nikomatsakis Jun 7, 2018
7123427
align the `type-op` outputs with what canonicalized queries give
nikomatsakis Jun 7, 2018
5e9f8d5
promote canonical into a module
nikomatsakis Jun 8, 2018
a1811ce
break canonicalizer into submodules to make it easier to comprehend
nikomatsakis Jun 8, 2018
dfd33f5
move `make_query_response` into method on infcx
nikomatsakis Jun 8, 2018
bebd3ff
extract a helper for `make_query_result` that skips canonicalization
nikomatsakis Jun 8, 2018
2624c14
extract the handling of region constraints from queries
nikomatsakis Jun 8, 2018
c8cf710
replace `LexicalRegionConstraintData` with `QueryRegionConstraint`
nikomatsakis Jun 8, 2018
7358931
improve `trivial_case` handling
nikomatsakis Jun 8, 2018
be27a5a
make one `Canonicalize` impl for `QueryResult`
nikomatsakis Jun 8, 2018
21592cd
move `Debug` bounds onto `Lift`
nikomatsakis Jun 8, 2018
7cb86ed
change to `crate` privacy instead of `pub(super)`
nikomatsakis Jun 9, 2018
3f1961d
extract type-ops into their own submodules
nikomatsakis Jun 9, 2018
e72dc79
make `convert` so it can apply to a single constraint
nikomatsakis Jun 9, 2018
75e3a9c
rename `instantiate_query_result`
nikomatsakis Jun 9, 2018
d748dc5
extract `query_result_substitution` helper
nikomatsakis Jun 9, 2018
1d66462
remove `Canonicalization` trait, which serves no purpose
nikomatsakis Jun 11, 2018
3b446b4
introduce `QueryTypeOp` trait and use it for `eq`
nikomatsakis Jun 11, 2018
2655522
move `type_op` into `rustc`
nikomatsakis Jun 11, 2018
1acffad
introduce `canonicalize_hr_query_hack`
nikomatsakis Jun 12, 2018
71ce2e7
make `Eq` a true query
nikomatsakis Jun 11, 2018
4beea99
make `Subtype` a true query
nikomatsakis Jun 11, 2018
d613683
convert `predicates` to operate on 1 predicate at a time
nikomatsakis Jun 11, 2018
de7e941
convert `prove_predicate` into a query
nikomatsakis Jun 11, 2018
2a0b3d6
introduce `Normalizable` trait for things directly normalizable
nikomatsakis Jun 11, 2018
3e32d42
transition to `Fallible`
nikomatsakis Jun 12, 2018
7c72e77
instantiate closure requirements as query-region-constraints [WIP]
nikomatsakis Jun 19, 2018
7bab9f0
WIP fix error messages for propagate_approximated_shorter_to_static_n…
nikomatsakis Jun 20, 2018
f24e90e
extract more helpers from instantiating query result
nikomatsakis Jun 19, 2018
977f3fc
introduce `QueryKey` separation
nikomatsakis Jun 19, 2018
e895f3a
convert `dropck_outlives` type-op to use the query
nikomatsakis Jun 19, 2018
a583269
add a streamlined `instantiate_query_result` method for NLL queries
nikomatsakis Jun 19, 2018
82169b6
convert query-type-op to create query-region-constraint directly
nikomatsakis Jun 19, 2018
e98d376
do not re-create the `LocationTable` for every path
nikomatsakis Jun 26, 2018
188ad38
nit: don't import Debug directly
nikomatsakis Jun 27, 2018
2fd8a31
extract out query boilerplate and use for `Eq`
nikomatsakis Jun 27, 2018
fa71af4
use query boilerplate for `normalize`
nikomatsakis Jun 27, 2018
ac40d73
use query boilerplate for subtype
nikomatsakis Jun 27, 2018
e6c8c63
use query boilerplate for prove-predicate -- slightly inefficient
nikomatsakis Jun 27, 2018
66c8839
use query boiler plate for `normalize_projection_ty` too
nikomatsakis Jun 27, 2018
d49d522
merge all the `type_op_foo` modules into one as they are so trivial
nikomatsakis Jun 27, 2018
d695512
fix wrong query description
nikomatsakis Jun 27, 2018
59ea17e
rename `upcast` to `cast_to_tcx_lifetime` and improve comment
nikomatsakis Jun 27, 2018
5bfdb97
remove `either` dependency we are not using
nikomatsakis Jun 27, 2018
1be4fff
improve comment on instantiate NLL query result fn
nikomatsakis Jun 27, 2018
c6a7c6f
improve comments on `dropck_outlives`
nikomatsakis Jun 27, 2018
35a5065
pacify the mercilous tidy
nikomatsakis Jun 27, 2018
c2f7757
extend comment to note complications around lifetimes
nikomatsakis Jun 27, 2018
c3f7e02
rename to `shrink_to_tcx_lifetime`
nikomatsakis Jun 27, 2018
b2e899f
move into `provide` methods
nikomatsakis Jun 27, 2018
0a0dae0
pull out `ParamEnvAnd` and remove `QueryKey`
nikomatsakis Jun 27, 2018
5fd3b26
rename `prequery` to `try_fast_path`
nikomatsakis Jun 27, 2018
f0fdce3
update comments
nikomatsakis Jun 27, 2018
9b1d222
change the `enter_canonical_trait_query` method to give a fulfill cx
nikomatsakis Jun 27, 2018
1523de3
rustfmt various files
nikomatsakis Jun 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
use std::fmt;
use std::hash::Hash;
use syntax_pos::symbol::InternedString;
use traits::query::{CanonicalProjectionGoal,
CanonicalTyGoal, CanonicalPredicateGoal};
use ty::{TyCtxt, Instance, InstanceDef, ParamEnv, ParamEnvAnd, PolyTraitRef, Ty};
use traits::query::{
CanonicalProjectionGoal, CanonicalTyGoal, CanonicalTypeOpEqGoal, CanonicalTypeOpSubtypeGoal,
CanonicalPredicateGoal, CanonicalTypeOpProvePredicateGoal, CanonicalTypeOpNormalizeGoal,
};
use ty::{TyCtxt, FnSig, Instance, InstanceDef,
ParamEnv, ParamEnvAnd, Predicate, PolyFnSig, PolyTraitRef, Ty};
use ty::subst::Substs;

// erase!() just makes tokens go away. It's used to specify which macro argument
Expand Down Expand Up @@ -647,6 +650,13 @@ define_dep_nodes!( <'tcx>
[] NormalizeTyAfterErasingRegions(ParamEnvAnd<'tcx, Ty<'tcx>>),
[] DropckOutlives(CanonicalTyGoal<'tcx>),
[] EvaluateObligation(CanonicalPredicateGoal<'tcx>),
[] TypeOpEq(CanonicalTypeOpEqGoal<'tcx>),
[] TypeOpSubtype(CanonicalTypeOpSubtypeGoal<'tcx>),
[] TypeOpProvePredicate(CanonicalTypeOpProvePredicateGoal<'tcx>),
[] TypeOpNormalizeTy(CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>),
[] TypeOpNormalizePredicate(CanonicalTypeOpNormalizeGoal<'tcx, Predicate<'tcx>>),
[] TypeOpNormalizePolyFnSig(CanonicalTypeOpNormalizeGoal<'tcx, PolyFnSig<'tcx>>),
[] TypeOpNormalizeFnSig(CanonicalTypeOpNormalizeGoal<'tcx, FnSig<'tcx>>),

[] SubstituteNormalizeAndTestPredicates { key: (DefId, &'tcx Substs<'tcx>) },

Expand Down
Loading