-
Notifications
You must be signed in to change notification settings - Fork 397
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
Update System.arraycopy to support null restricted value type arrays #7084
Update System.arraycopy to support null restricted value type arrays #7084
Conversation
@hzongaro May I ask you to review this change? Thank you! |
0bdfa3f
to
8bb98cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Mostly minor comments
8bb98cf
to
d0bf0ce
Compare
eclipse.omr x86-64 macOS test failed. It looks to be an known issue #6516
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments, plus I think there might be another case where a run-time test for null-restricted component types is needed.
Required by JEP 401: If null restricted value type is enabled, we need to preform null check on the value being stored in order to throw a `NullPointerException` if the array is null-restricted and the value to write is null. If it is this case, `System.arraycopy` cannot be transformed into arraycopy instructions. Based on whether or not the source array and the destination array are null restricted value type, and whether or not they are flattened, VP decides whether or not transform `System.arraycopy`. Fixes: eclipse-openj9/openj9#17196,eclipse-openj9/openj9#17586 Signed-off-by: Annabelle Huo <[email protected]>
d0bf0ce
to
71ddb70
Compare
@hzongaro All comments are addressed. Ready for another review. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Jenkins build all |
Required by JEP 401: If null restricted value type is enabled, we need to preform null check on the value being stored in order to throw a
NullPointerException
if the array is null-restricted and the value to write is null. If it is this case,System.arraycopy
cannot be transformed into arraycopy instructions.Based on whether or not the source array and the destination array are null restricted value type, and whether or not they are flattened, VP decides whether or not transform
System.arraycopy
.Fixes: eclipse-openj9/openj9#17196, eclipse-openj9/openj9#17586