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

Generics improvements #1135

Closed

Conversation

Aurel300
Copy link
Member

  • Improved associated types resolution (thanks @vl0w, from WIP: Iterator tracking issues #980). The hope is that this won't erase too many regions...
  • Normalise associated types when monomorphising MIR bodies for pure functions.
  • Cache encoded pure functions by DefId + (full) encoded signature, not just "type parameters".

Comment on lines +322 to +327
pub fn local_mir_with_caller(
&self,
def_id: LocalDefId,
caller_def_id: LocalDefId,
substs: SubstsRef<'tcx>,
) -> Rc<mir::Body<'tcx>> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonasAlaif Will this change be easy to incorporate into your refactored Environment? For proper monomorphisation (and assoc. type normalisation) I need called DefId, type substitutions (as before), but also the caller DefId.

And should I wait for your PR to land or can I merge this first (assuming the tests pass)?

@Aurel300 Aurel300 marked this pull request as ready for review August 18, 2022 18:25
@Aurel300
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Aug 18, 2022
1135: Generics improvements r=Aurel300 a=Aurel300

- [x] Improved associated types resolution (thanks `@vl0w,` from #980). The hope is that this won't erase too many regions...
- [x] Normalise associated types when monomorphising MIR bodies for pure functions.
- [x] Cache encoded pure functions by `DefId` + (full) encoded signature, not just "type parameters".

Co-authored-by: Aurel Bílý <aurel.bily@gmail.com>
Co-authored-by: Jonas <ganymed92@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 18, 2022

Canceled.

@Aurel300
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Aug 18, 2022
1135: Generics improvements r=Aurel300 a=Aurel300

- [x] Improved associated types resolution (thanks `@vl0w,` from #980). The hope is that this won't erase too many regions...
- [x] Normalise associated types when monomorphising MIR bodies for pure functions.
- [x] Cache encoded pure functions by `DefId` + (full) encoded signature, not just "type parameters".

Co-authored-by: Aurel Bílý <aurel.bily@gmail.com>
Co-authored-by: Jonas <ganymed92@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 18, 2022

Build failed:

@Aurel300
Copy link
Member Author

Aurel300 commented Sep 6, 2022

Superseded by #1147

@Aurel300 Aurel300 closed this Sep 6, 2022
@Aurel300 Aurel300 deleted the feature/generics-improvements branch September 6, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants