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

Add inline iTable walk for Checkcast on Z #21134

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

Conversation

matthewhall2
Copy link
Contributor

@matthewhall2 matthewhall2 commented Feb 18, 2025

Implements an iTable walk inline for checkcast nodes on Z instead of calling out to the helper

  • adds supportsCheckcastInlineItableWalk() method to J9CodeGenerator
    • defaults to false
    • only Z has a non-default implementation
  • adds InterfaceTest to the checkcast generated sequences when the toClass is known to be an interface at compile time
    • guarded by isCheckcast() and supportsCheckcastInlineItableWalk()

adds superclass check
checks for class depth at compile time to skip over superclass test for
the case when toClassDepth > fromClassDepth

Signed-off-by: Matthew Hall <[email protected]>
When the cast class is known to be an interface at compile time, only
the interface test is generated.
When this is not known, the superclass test will check the modifier
flags and branch to the interface test accordingly.

Signed-off-by: Matthew Hall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant