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

Hide details of IL to test for array type class and remove unused symbol references #7334

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hzongaro
Copy link
Member

@hzongaro hzongaro commented May 10, 2024

This pull request changes some J9_PROJECT_SPECIFIC code in Loop Versioner to use the method testIsClassArrayType to hide some of the lower-level details of generating IL to determine whether a class represents an array type class.

Also, a previous pull request — #7330 — introduced duplicate enum constant and method names for accessing the classDepthAndFlags field of j9class in the downstream OpenJ9 project. Now that the old names are no longer used in the downstream project, those duplicate definitions can be removed.

Duplicate symbols that were based on the incorrect field name,
classAndDepthFlags, rather than the correct name, classDepthAndFlags,
are no longer referenced in downstream projects.  This change removes
them.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
The downstream OpenJ9 project defines a new method,
TR_VMBase::testIsClassArrayType, that generates IL to tests whether a
class is an array class.  Change code that generated IL that loaded
classDepthAndFlags field itself to call testIsClassArrayType instead to
hide at least some of the J9-specific details.

Also, generate a comparison of the result of the IL produced by
testIsClassArrayType with zero, rather than comparing with the array
class flag.  A comparison with zero is expected to be preferred on most
platforms.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro hzongaro force-pushed the hide-load-of-classDepthAndFlags branch from 5f83203 to f757802 Compare June 13, 2024 19:48
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.

None yet

1 participant