Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upQueryify Vtable methods #45137
Conversation
rust-highfive
assigned
nikomatsakis
Oct 9, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
nikomatsakis
requested changes
Oct 9, 2017
|
Looks good! Left a few minor suggestions. |
| @@ -227,6 +227,8 @@ define_maps! { <'tcx> | |||
| [] fn item_body_nested_bodies: ItemBodyNestedBodies(DefId) -> ExternBodyNestedBodies, | |||
| [] fn const_is_rvalue_promotable_to_static: ConstIsRvaluePromotableToStatic(DefId) -> bool, | |||
| [] fn is_mir_available: IsMirAvailable(DefId) -> bool, | |||
| [] fn vtable_methods: vtable_methods_node(ty::PolyTraitRef<'tcx>) | |||
| -> Vec<Option<(DefId, &'tcx Substs<'tcx>)>>, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
theotherjimmy
Oct 9, 2017
Author
Contributor
Right! I had that change before, I should re-apply that patch.
| @@ -650,12 +650,12 @@ pub fn normalize_and_test_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, | |||
| /// Given a trait `trait_ref`, iterates the vtable entries | |||
| /// that come from `trait_ref`, including its supertraits. | |||
| #[inline] // FIXME(#35870) Avoid closures being unexported due to impl Trait. | |||
| pub fn get_vtable_methods<'a, 'tcx>( | |||
| pub fn vtable_methods<'a, 'tcx>( | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis Thanks for the review. I corrected all of the minor suggestions. |
theotherjimmy
force-pushed the
theotherjimmy:vtable-methods-query
branch
from
6225f8a
to
cb7e101
Oct 9, 2017
nikomatsakis
approved these changes
Oct 9, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
theotherjimmy
referenced this pull request
Oct 10, 2017
Closed
Extract queries for the trait system operations that are performed in trans #44891
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Oct 11, 2017
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
I don't think this is my fault:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors r=nikomatsakis |
This comment has been minimized.
This comment has been minimized.
|
|
aidanhs
added
the
S-waiting-on-bors
label
Oct 12, 2017
This comment has been minimized.
This comment has been minimized.
|
Wait @bors r-
|
This comment has been minimized.
This comment has been minimized.
|
Well, the good is that I can reproduce the problem. The bad is that I have no idea why it's happening. |
This comment has been minimized.
This comment has been minimized.
|
It seems like the macro that implements the provider structure, |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis @michaelwoerister This change set now includes a big change to plumbing.rs, which should be scrutinized. |
kennytm
added
S-waiting-on-review
and removed
S-waiting-on-bors
labels
Oct 13, 2017
nikomatsakis
reviewed
Oct 13, 2017
| (tcx: $tcx:tt, | ||
| input: (), | ||
| output: ($(([$name:ident] [$K:ty] [$R:ty]))*)) => { | ||
| input: ($(([$($modifiers:tt)*] [$name:ident] [$K:ty] [$R:ty]))*)) => { |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Oct 13, 2017
Contributor
This change looks fine. It does mean we lose the ability to have modifiers that adjust the type of a query's field. At present, we are not using this capability (we used to be...), so that's probably ok, but we could also just lift the recursion-limit, right?
I'm ok either way, but let's also rebase and remove the merge commit.
This comment has been minimized.
This comment has been minimized.
|
Rebasing. Just a moment. |
theotherjimmy
added some commits
Oct 7, 2017
theotherjimmy
force-pushed the
theotherjimmy:vtable-methods-query
branch
from
34cefbd
to
fcb8bc9
Oct 13, 2017
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis rebase complete. Merge commit removed. |
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
kennytm
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Oct 13, 2017
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Oct 14, 2017
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit fcb8bc9
into
rust-lang:master
Oct 14, 2017
This was referenced Oct 14, 2017
This comment has been minimized.
This comment has been minimized.
|
|
theotherjimmy commentedOct 9, 2017
This query might come with a downside: It converts an iterator to a Vec, which may increase the working set of rustc on programs that use many many traits (I think that's where this is used).