Skip to content

Conversation

@matthewhall2
Copy link
Contributor

Enables transformation of invokeBasic, linkToStatic, and linkToSpecial calls into jitDispatchJ9Method acall nodes. Codegen recognizes this node in private linakge and produces code to directly call the MethodHandle target at runtime
- using a new PPCJ9HelperCall snippet when the target is interpreted
- otherwise branch and link to jit start pc of target

@matthewhall2 matthewhall2 requested a review from zl-wang November 13, 2025 20:06
Enables transformation of invokeBasic, linkToStatic, and linkToSpecial
calls into jitDispatchJ9Method acall nodes. Codegen recognizes this node
in private linakge and produces code to directly call the MethodHandle
target at runtime
    - using a new PPCJ9HelperCall snippet when the target is interpreted
    - otherwise branch and link to jit start pc of target

Signed-off-by: Matthew Hall <[email protected]>
@matthewhall2
Copy link
Contributor Author

matthewhall2 commented Nov 13, 2025

@zl-wang can I get a review on this please? This is what we discussed with @IBMJimmyk last week

@zl-wang
Copy link
Contributor

zl-wang commented Nov 13, 2025

will do, after i return from vacation next Wed.

@zl-wang
Copy link
Contributor

zl-wang commented Nov 19, 2025

High-level comments:

  1. HelperCallSnippet seemed being used for disjoint purposes across platforms and in OMR side as well. this use (new file) in OpenJ9 PPC codegen looked more aligned with OMR side of story. Please consider how to make it more readable/understandable and less confusing for future newcomers! I was thinking: could we do away without this new file and integrating MH invoke support in existing files (anyway)? or, naming the new file for its specific purpose (MH invocation support)?
  2. rightToLeft or leftToRight argument ordering should be still applicable to the invocation by and large, instead of disabling it as you wrote it, although i understood this thing has never been used in reality to begin with. You only need to special-case the first argument (j9method? if I remembered correctly). The shifted argument list should be identical to a normal java method dispatch in IL representation ... so, the disabling is unexpected at high level.

I will review the details when i get around.

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.

2 participants