[Chapel Merge] Allow explicit task intents on `this`

Branch: refs/heads/main
Revision: 3f0c258
Author: vasslitvinov
Link: Allow explicit task intents on `this` by vasslitvinov · Pull Request #20601 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20601 from vasslitvinov/this-intents

Allow explicit task intents on this

Helps with #19211, specifically task intents for records and/or record fields · Issue #19211 · chapel-lang/chapel · GitHub . While this change does not enable setting default intents for record types, it implements the following:

  • allow users to specify a task intent on this explicitly
  • when there is an explicit intent on this, creation of implicit shadow variables for the fields of this, introduced in #13479, is disabled

This PR implements this for both forall loops and task-parallel constructs, as these two have separate independent implementations (unfortunately, for historical reasons).

Implementation notes