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

Make VP erase interface types in array types from signatures #16316

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

jdmpapin
Copy link
Contributor

The verifier treats interface types as java/lang/Object even within array component types. In particular, when any parameter, instance or static field, or return type is declared with a signature naming an array of an interface type, its value is guaranteed to be a reference array, but not necessarily the named array type. For example, if a parameter is declared to be of type List[], it can actually be any Object[].


There is one preparatory refactoring commit:

  • Factor VP interface type signature detection logic into its own method

The definition of the method is copied verbatim from the definition
currently in OMR. Once merged, this copy will allow the Java-specific
logic to be removed from OMR while still using it in OpenJ9.

Factoring the logic into its own method allows for it to be fixed (to
handle array-of-interface types) in a single place.
The verifier treats interface types as java/lang/Object even within
array component types. In particular, when any parameter, instance or
static field, or return type is declared with a signature naming an
array of an interface type, its value is guaranteed to be a reference
array, but not necessarily the named array type. For example, if a
parameter is declared to be of type List[], it can actually be any
Object[].
@jdmpapin jdmpapin added comp:jit depends:omr Pull request is dependent on a corresponding change in OMR labels Nov 13, 2022
@jdmpapin
Copy link
Contributor Author

This depends on eclipse-omr/omr#6814

@jdmpapin
Copy link
Contributor Author

@vijaysun-omr, could you please review?

@vijaysun-omr vijaysun-omr self-assigned this Nov 18, 2022
@vijaysun-omr
Copy link
Contributor

Jenkins test sanity all jdk17

@vijaysun-omr
Copy link
Contributor

Checks have passed. Merging.

@vijaysun-omr vijaysun-omr merged commit 880fce0 into eclipse-openj9:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit depends:omr Pull request is dependent on a corresponding change in OMR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants