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

[wip] Resolve array types with module code in dyno #26628

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

riftEmber
Copy link
Member

@riftEmber riftEmber commented Jan 30, 2025

Add support for array type expressions using default rectangular or associative domains.

Part of https://github.com/Cray/chapel-private/issues/6730.

Future work:

  • Implement noinit, which will adjust this implementation code's initElts

[reviewer info placeholder]

Depends on #26679 which should be merged first.

Testing:

  • dyno tests
  • paratest

@riftEmber riftEmber force-pushed the resolve-array-type branch 13 times, most recently from 257083c to abacc66 Compare February 4, 2025 21:06
@riftEmber riftEmber force-pushed the resolve-array-type branch 7 times, most recently from bfc24ed to 21f3629 Compare February 5, 2025 18:28
@riftEmber riftEmber changed the title [wip] dyno resolve array module code [wip] Resolve array type expressions with module code in dyno Feb 5, 2025
riftEmber added a commit that referenced this pull request Feb 5, 2025
Fix a bug where Dyno would consider forwarded method candidates even
when non-forwarded function candidates were found, for a call within a
method.

We only want to search for forwarding candidates if we haven't found any
non-forwarding candidates. However, when resolving a call in a method,
we first try resolving it as a function and then as a method with an
implicit receiver. If we find function candidates, we still want to
search for method candidates, but we do not want to search for
forwarding method candidates even if there are no non-forwarding method
candidates. This PR adds logic to skip that.

Added a test for the fixed case, where the test would previously
encounter ambiguity between the non-forwarded function and forwarded
method.

This bug was incidentally causing query recursion in
Cray/chapel-private#7087, where the definition
of `chpl__promotionType` on `_array` relies on the correct search order.

Resolves Cray/chapel-private#7087.

[reviewed by @DanilaFe , thanks!]

Testing:
- [x] dyno tests
- [x] paratest
- [x] fixes Cray/chapel-private#7087 (in
combination with [basic array
resolution](#26628))
@riftEmber riftEmber force-pushed the resolve-array-type branch 6 times, most recently from 64a6fe8 to a8b3ea1 Compare February 7, 2025 18:50
@riftEmber riftEmber changed the title [wip] Resolve array type expressions with module code in dyno [wip] Dyno resolve rectangular and associative array types Feb 7, 2025
DanilaFe and others added 26 commits February 7, 2025 13:38
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
@riftEmber riftEmber changed the title [wip] Dyno resolve rectangular and associative array types Resolve array types with module code in dyno Feb 7, 2025
@riftEmber riftEmber changed the title Resolve array types with module code in dyno [wip] Resolve array types with module code in dyno Feb 7, 2025
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