Skip to content

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

Merged
vijaysun-omr merged 2 commits into
eclipse-openj9:masterfrom
jdmpapin:vp-iface-array
Nov 21, 2022
Merged

Make VP erase interface types in array types from signatures#16316
vijaysun-omr merged 2 commits into
eclipse-openj9:masterfrom
jdmpapin:vp-iface-array

Conversation

@jdmpapin

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

This depends on eclipse-omr/omr#6814

@jdmpapin

Copy link
Copy Markdown
Contributor Author

@vijaysun-omr, could you please review?

@vijaysun-omr vijaysun-omr self-assigned this Nov 18, 2022
@vijaysun-omr

Copy link
Copy Markdown
Contributor

Jenkins test sanity all jdk17

@vijaysun-omr

Copy link
Copy Markdown
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