-
Notifications
You must be signed in to change notification settings - Fork 722
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
Allow multianewarray for 1D arrays on Z #17714
Conversation
Personal build 17174 passed sanity.functional I used a test case with asm to exercise multianewarray for a 1D array and logged the compile. The following line in the log indicates the new code is active:
Bytecode for the test method:
The generated code was:
|
} | ||
else | ||
{ | ||
// trace a message to indicate that inline allocation is disabled for nDims < 2 |
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.
Do we need a comment here? I think text in the Assert message is clear about disabling the inline allocation for multianewarray and also the comment on function makes it clear that for <1 dimensional array it calls helper.
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.
thanks, deleted
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.
Thanks a lot @JamesKingdon for fixing this on Z. Changes looks good to me. Left a comment about small nit-pick.
@joransiu can I request you to launch test on this PR and merge this ?
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.
LGTM. I agree the comment Rahil highlighted is unnecessary.
The existing multianewarray evaluator assumes at least 2 dimensions which is consistent with normal usage. However the spec permits 1D arrays and this is exploited by some languages, e.g. Groovy.
b77b2d9
to
b67e428
Compare
Jenkins test sanity zlinux jdk11,jdk17 |
The existing multianewarray evaluator assumes at least 2 dimensions which is consistent with normal usage. However the spec permits 1D arrays and this is exploited by some languages, e.g. Groovy.
See #17360 for more background and #17358 for the corresponding change on X