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

[dyno] map owned to _owned module code #25617

Merged
merged 17 commits into from
Sep 30, 2024
Merged

Conversation

arezaii
Copy link
Contributor

@arezaii arezaii commented Jul 23, 2024

This adds support for mapping owned to the _owned record implementation in module code. Resolves https://github.com/Cray/chapel-private/issues/6157.

There were many parts needed to make this work.
First, add the manager's scope when evaluating a class receiver's scope.
Then, normalize managed classes to their managers, and then do the can-pass evaluation on the now similar types.

Additional changes were required to allow nil to be instantiated for a nilable class and for accessing a field of the manager while evaluating the body of a type method on owned.

The change includes similar patterns for _owned and _shared so implements some tests for both.

[reviewed by @DanilaFe - thank you!]

@arezaii arezaii force-pushed the dyno-map-owned branch 4 times, most recently from dd3e36b to 765e594 Compare July 25, 2024 20:39
@arezaii arezaii marked this pull request as ready for review August 2, 2024 15:05
@arezaii arezaii force-pushed the dyno-map-owned branch 4 times, most recently from 3204692 to 327c770 Compare August 7, 2024 15:59
@arezaii arezaii force-pushed the dyno-map-owned branch 2 times, most recently from a3d9088 to cf29867 Compare August 14, 2024 19:41
frontend/lib/resolution/Resolver.cpp Outdated Show resolved Hide resolved
frontend/lib/resolution/Resolver.cpp Outdated Show resolved Hide resolved
frontend/lib/resolution/can-pass.cpp Outdated Show resolved Hide resolved
frontend/lib/resolution/resolution-queries.cpp Outdated Show resolved Hide resolved
@arezaii arezaii force-pushed the dyno-map-owned branch 2 times, most recently from e7ee7c4 to 3b7b3fc Compare August 27, 2024 21:28
@arezaii arezaii force-pushed the dyno-map-owned branch 2 times, most recently from 9d3eea5 to 07f3f22 Compare September 3, 2024 18:30
frontend/lib/resolution/Resolver.cpp Show resolved Hide resolved
frontend/lib/resolution/Resolver.cpp Outdated Show resolved Hide resolved
frontend/lib/resolution/resolution-queries.cpp Outdated Show resolved Hide resolved
frontend/lib/resolution/resolution-queries.cpp Outdated Show resolved Hide resolved
@arezaii arezaii changed the title [dyno] start to map owned to _owned module code [dyno] map owned to _owned module code Sep 26, 2024
frontend/lib/resolution/can-pass.cpp Show resolved Hide resolved
frontend/lib/resolution/can-pass.cpp Show resolved Hide resolved
@arezaii arezaii merged commit 32af183 into chapel-lang:main Sep 30, 2024
7 checks passed
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