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

Value Types: Fix VP constraint for null-restricted array class #7579

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a7ehuo
Copy link
Contributor

@a7ehuo a7ehuo commented Dec 2, 2024

If null-restricted array is enabled and the class is an array class, the null-restricted array class and the nullable array class share the same signature. The null-restricted array can be viewed as a sub-type of the nullable array. Therefore, the constraint cannot be fixed class.

Related: eclipse-openj9/openj9#20522

@a7ehuo a7ehuo requested a review from vijaysun-omr as a code owner December 2, 2024 14:49
@a7ehuo a7ehuo requested review from hzongaro and removed request for vijaysun-omr December 2, 2024 14:50
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Dec 2, 2024

@hzongaro May I ask you to review this change? Thank you!

@a7ehuo a7ehuo changed the title Fix VP constraint for null-restricted array class Value Types: Fix VP constraint for null-restricted array class Dec 4, 2024
Copy link
Contributor

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

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

I think the changes look correct, but I have a couple of thoughts about how things might be arranged differently.

compiler/optimizer/VPConstraint.cpp Outdated Show resolved Hide resolved
compiler/optimizer/VPConstraint.cpp Outdated Show resolved Hide resolved
If null-restricted array is enabled and the class is an array class,
the null-restricted array class and the nullable array class share
the same signature. The null-restricted array can be viewed
as a sub-type of the nullable array. Therefore, the constraint cannot
be fixed class.

Related: eclipse-openj9/openj9#20522
Signed-off-by: Annabelle Huo <[email protected]>
@a7ehuo a7ehuo force-pushed the valuetype-fix-vp-constraint-for-nullRestrictedArray branch from c197ea8 to 2cb7621 Compare December 11, 2024 13:36
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Dec 11, 2024

@hzongaro All comments are addressed. Ready for another review. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants