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

Implement &&= and ||= in ChapelBase via new primitive #27102

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

Conversation

arifthpe
Copy link
Contributor

@arifthpe arifthpe commented Apr 11, 2025

Implement these compound assignment operators via module code primitive calls, and (trivially) implement those in Dyno.

All other compound assignment ops are already implemented this way, but these were special-cased in convert-uast to generate a separate op and assign. This PR removes the special casing and adds an analogous implementation in the production compiler.

A small parser modification was required to recognize these tokens as assignment operator names (assignop_ident), so this PR also rebuilds the parser generated files.

Also includes adding a Dyno test for resolving calls to these operators.

Resolves https://github.com/Cray/chapel-private/issues/7291.

[reviewer info placeholder]

Testing:

  • dyno tests
  • paratests
  • spectests unaffected

@arifthpe arifthpe force-pushed the logical-assignment-operators branch from f292410 to 40ecf39 Compare April 11, 2025 20:30
@arifthpe arifthpe mentioned this pull request Apr 11, 2025
4 tasks
@arifthpe arifthpe force-pushed the logical-assignment-operators branch from 40ecf39 to c50debf Compare April 11, 2025 20:45
@arifthpe arifthpe force-pushed the logical-assignment-operators branch from 744be56 to 1a1ffd8 Compare April 11, 2025 21:14
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.

1 participant