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

Rename JVM_GetClassName #4836

Merged
merged 1 commit into from
Feb 23, 2019
Merged

Conversation

keithc-ca
Copy link
Contributor

  • name changed to JVM_InitClassName for Java 11 and Java 13+

@@ -75,7 +75,10 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
<export name="_JVM_GetClassConstantPool@8" />
<export name="_JVM_GetClassContext@4" />
<export name="_JVM_GetClassLoader@8" />
<export name="_JVM_GetClassName@8" />
<export name="_JVM_GetClassName@8">
<include-if condition="spec.java12 or not spec.java11"/>
Copy link
Member

Choose a reason for hiding this comment

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

It would be clearer to use spec.java8 or spec.java12.
Won't this do the wrong thing for java14?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, spec.java12 implies JAVA_SPEC_VERSION >= 12.

@@ -329,6 +332,9 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
<export name="JVM_GetNestHost"/>
<export name="JVM_GetNestMembers"/>
<export name="JVM_AreNestMates"/>
<export name="JVM_InitClassName">
<exclude-if condition="spec.java12 and not spec.java13"/>
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem right, it should be excluded for java8 and java12

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This group, jdk11, is only used for Java 11+ (which excludes it for Java 8).

See my comment above: The condition excludes the export for Java 12+, but not Java 13+ (which means only for Java 12).

#if (JAVA_SPEC_VERSION < 11) || (JAVA_SPEC_VERSION == 12)
JVM_GetClassName
#else /* (JAVA_SPEC_VERSION < 11) || (JAVA_SPEC_VERSION == 12) */
JVM_InitClassName
Copy link
Member

Choose a reason for hiding this comment

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

How do we know the implementation for JVM_InitClassName is the same as for JVM_GetClassName?

Copy link
Contributor Author

@keithc-ca keithc-ca Feb 22, 2019

Choose a reason for hiding this comment

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

Class.java seems to use the methods the same way: I think openjdk just changed the name not its behavior. I take that back: the new version is expected to initialize the name field. I'll fix that.

Copy link
Member

Choose a reason for hiding this comment

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

Note that since this isn't used, a stub that asserts would be fine.

* name changed to JVM_InitClassName for Java 11 and Java 13+
* JVM_InitClassName caches the result in the 'name' field

Signed-off-by: Keith W. Campbell <keithc@ca.ibm.com>
@keithc-ca
Copy link
Contributor Author

Updated JVM_InitClassName to save the result in the name field.

@pshipton
Copy link
Member

jenkins test sanity win,plinux jdk8,jdk11,jdk12

@pshipton pshipton merged commit 14bf9fd into eclipse-openj9:master Feb 23, 2019
@keithc-ca keithc-ca deleted the classname branch February 25, 2019 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants