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

Borrowck: variance analysis #2823

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

jdupak
Copy link
Contributor

@jdupak jdupak commented Feb 2, 2024

Depends on #2814 (merged)

@jdupak jdupak force-pushed the borrowck-variance-analysis branch 2 times, most recently from 226acd7 to a52ab05 Compare February 3, 2024 16:23
@philberty philberty force-pushed the borrowck-variance-analysis branch from a52ab05 to a43edad Compare February 3, 2024 23:05
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

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

just some minor style nits. Otherwise this is pretty advanced stuff its going to take a while before I can follow it all properly but it looks very consistent which is a very good sign

@jdupak jdupak force-pushed the borrowck-variance-analysis branch from a43edad to 6a9bbe2 Compare February 5, 2024 09:00
@jdupak jdupak mentioned this pull request Feb 28, 2024
@jdupak jdupak force-pushed the borrowck-variance-analysis branch from 6a9bbe2 to a77491d Compare February 29, 2024 08:51
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

a couple of comments but this looks very good and clean :) thanks a lot for this work

@jdupak jdupak force-pushed the borrowck-variance-analysis branch from a77491d to 3e09ddb Compare March 18, 2024 16:58
@jdupak
Copy link
Contributor Author

jdupak commented Mar 18, 2024

@CohenArthur I have split the context for one type processing from the global context to make it reentrant and integrated the global one in the typecheck context.

jdupak added 3 commits March 20, 2024 15:01
gcc/rust/ChangeLog:

	* typecheck/rust-tyty-subst.cc (SubstitutionRef::get_arg_at):
	Add unified API.

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/ChangeLog:

	* Make-lang.in: Add new .cc file.
	* rust-session-manager.cc (Session::compile_crate): Run
	analysis.
	* typecheck/rust-tyty-variance-analysis-private.h: New file.
	* typecheck/rust-tyty-variance-analysis.cc: New file.
	* typecheck/rust-tyty-variance-analysis.h: New file.
	* typecheck/rust-typecheck-context.cc
	(TypeCheckContext::get_variance_analysis_ctx):
	Variance analysis context.
	* typecheck/rust-hir-type-check.h (TypeCheckItem::visit):
	Variance analysis context.

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
	Collect variance info from types.

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
@jdupak jdupak force-pushed the borrowck-variance-analysis branch from 3e09ddb to dc90ea9 Compare March 20, 2024 14:01
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

thanks! that's a lot of very good work :)

@CohenArthur CohenArthur added this pull request to the merge queue Mar 21, 2024
Merged via the queue into Rust-GCC:master with commit ac45444 Mar 21, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants