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

Add HeapBufferType to represent _ddata in Dyno #26065

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

riftEmber
Copy link
Member

@riftEmber riftEmber commented Oct 9, 2024

Add a new HeapBufferType to represent _ddata in Dyno.

  • Supports .eltType and this on _ddata.
  • Adds new PtrType as parent to both this and CPtrType, since they're very similar.
  • Includes testing for HeapBufferType analogous to the testing on CPtrType.

Resolves https://github.com/Cray/chapel-private/issues/6777, https://github.com/Cray/chapel-private/issues/6769 and https://github.com/Cray/chapel-private/issues/6768.

[reviewer info placeholder]

Testing:

  • dyno tests
  • paratest

@riftEmber riftEmber force-pushed the dyno-ddata branch 5 times, most recently from 1531186 to b7476be Compare October 10, 2024 17:43
@riftEmber riftEmber marked this pull request as ready for review October 10, 2024 17:51
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
Signed-off-by: Anna Rift <anna.rift@hpe.com>
@@ -230,8 +230,8 @@ class Type {
}

/** returns true for a type that is a kind of pointer */
bool isPtrType() const {
return isClassType() || isCFnPtrType() || isCVoidPtrType() || isCPtrType();
bool isAnyPtrType() const {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we have to rename it (since isPtrType will now check if it's a subclass of PtrType). But, isAny___ normally checks for "is it the generic type that represents some class of things?" As in, we have AnyImagType as a generic type that means any imag type of any width. So isAnyImagType checks if it is that thing.

I can think of lots of ways out of this situation, but they are all perhaps more of a side trip than I expect you or I want for this PR. E.g., we could rename all of the Any___ types to GenericTypeAny___ or something. If you want to do that, it's fine with me, but needs to be a separate PR.

Calling it isPointerType or isPointerLike or isPtrishType would be the short way.

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