Skip to content

8306698: Add overloads to MethodTypeDesc::of#13599

Closed
liach wants to merge 2 commits intoopenjdk:masterfrom
liachmodded:feature/mtd-of
Closed

8306698: Add overloads to MethodTypeDesc::of#13599
liach wants to merge 2 commits intoopenjdk:masterfrom
liachmodded:feature/mtd-of

Conversation

@liach
Copy link
Member

@liach liach commented Apr 22, 2023

Please review this patch adding two new convenience methods that allows easier access to MethodTypeDesc instances and its associated CSR as well. This is a necessity to allow #13186 to reduce array copies in a few scenarios; the implementation of the two methods will be updated there.

Javadoc: https://cr.openjdk.org/~liach/8306698/1/java.base/java/lang/constant/MethodTypeDesc.html


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Change requires CSR request JDK-8306699 to be approved
  • Commit message must refer to an issue

Issues

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13599/head:pull/13599
$ git checkout pull/13599

Update a local copy of the PR:
$ git checkout pull/13599
$ git pull https://git.openjdk.org/jdk.git pull/13599/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13599

View PR using the GUI difftool:
$ git pr show -t 13599

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13599.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 22, 2023

👋 Welcome back liach! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Apr 22, 2023
@openjdk
Copy link

openjdk bot commented Apr 22, 2023

@liach The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Apr 22, 2023
@mlbridge
Copy link

mlbridge bot commented Apr 22, 2023

Webrevs

@liach
Copy link
Member Author

liach commented Apr 28, 2023

Please review this patch, adding two factory methods for MethodTypeDesc for convenience. Thank you!

@liach
Copy link
Member Author

liach commented May 9, 2023

Can any developer for the constant API area take a look at this patch? This API enables sharing of immutable list for method type symbols.

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label May 18, 2023
@liach
Copy link
Member Author

liach commented May 23, 2023

@mlchung Since you appear to be back, can you review this patch that allows future immutable-list parameter type sharing and benefit the Classfile API for JDK 21? I would be grateful if you can review a few other java.lang.invoke improvements I submitted as well.

@mlchung
Copy link
Member

mlchung commented May 23, 2023

yes, I'm back from vacation.

This change looks fine. Can you update the copyright header to 2023?

@mlchung
Copy link
Member

mlchung commented May 23, 2023

What is the plan for https://git.openjdk.org/jdk/pull/13186? It seems that keeping argTypes in an array is okay. In any case, we can do the discussion in PR 13186 after this one is integrated.

@liach
Copy link
Member Author

liach commented May 23, 2023

I plan to keep it. Migration to an immutable list to optimize parameterList while it doesn't affect the performance of other accessors. Meanwhile, the list passed by the user code to the factory can be shared safely if it's immutable, while we shouldn't trust the vararg array to the factory.

@liach
Copy link
Member Author

liach commented May 23, 2023

yes, I'm back from vacation.

This change looks fine. Can you update the copyright header to 2023?

The copyright year was already updated to 2023 when covariant override for resolveConstantDesc was added.

@openjdk
Copy link

openjdk bot commented May 23, 2023

@liach This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8306698: Add overloads to MethodTypeDesc::of

Reviewed-by: mchung

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 486 new commits pushed to the master branch:

  • 6b27dad: 8301154: SunPKCS11 KeyStore deleteEntry results in dangling PrivateKey entries
  • ed0e956: 8308716: ProblemList java/util/concurrent/ScheduledThreadPoolExecutor/BasicCancelTest.java with genzgc on windows-x64
  • bddf483: 8303942: os::write should write completely
  • ab241b3: 8306706: Support out-of-line code generation for MachNodes
  • 710453c: 8308016: Use snippets in java.io package
  • e9320f3: 8308116: jdk.test.lib.compiler.InMemoryJavaCompiler.compile does not close files
  • 97d3b27: 8307523: [vectorapi] Optimize MaskFromLongBenchmark.java
  • bb0ff48: 8305091: Change ChaCha20 cipher init behavior to match AES-GCM
  • c0c4d77: 8308544: Fix compilation regression from JDK-8306983 on musl libc
  • 9e196b3: 8308565: HttpClient: Sanitize logging while stopping
  • ... and 476 more: https://git.openjdk.org/jdk/compare/8d696aea9e1cefca97a760c017a5fde545facaa9...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@mlchung) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 23, 2023
@liach
Copy link
Member Author

liach commented May 23, 2023

/integrate

I shall integrate this improvement, so that I can provide patches that:

  1. improve parameterList allocation and parameter immutable list sharing.
  2. improve conversion performance from/to descriptor strings (with caching, array sharing).

All of these can benefit the Classfile API.

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 23, 2023
@openjdk
Copy link

openjdk bot commented May 23, 2023

@liach
Your change (at version dc2a5a5) is now ready to be sponsored by a Committer.

@mlchung
Copy link
Member

mlchung commented May 23, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented May 23, 2023

Going to push as commit 8ffa264.
Since your change was applied there have been 486 commits pushed to the master branch:

  • 6b27dad: 8301154: SunPKCS11 KeyStore deleteEntry results in dangling PrivateKey entries
  • ed0e956: 8308716: ProblemList java/util/concurrent/ScheduledThreadPoolExecutor/BasicCancelTest.java with genzgc on windows-x64
  • bddf483: 8303942: os::write should write completely
  • ab241b3: 8306706: Support out-of-line code generation for MachNodes
  • 710453c: 8308016: Use snippets in java.io package
  • e9320f3: 8308116: jdk.test.lib.compiler.InMemoryJavaCompiler.compile does not close files
  • 97d3b27: 8307523: [vectorapi] Optimize MaskFromLongBenchmark.java
  • bb0ff48: 8305091: Change ChaCha20 cipher init behavior to match AES-GCM
  • c0c4d77: 8308544: Fix compilation regression from JDK-8306983 on musl libc
  • 9e196b3: 8308565: HttpClient: Sanitize logging while stopping
  • ... and 476 more: https://git.openjdk.org/jdk/compare/8d696aea9e1cefca97a760c017a5fde545facaa9...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 23, 2023
@openjdk openjdk bot closed this May 23, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 23, 2023
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label May 23, 2023
@openjdk
Copy link

openjdk bot commented May 23, 2023

@mlchung @liach Pushed as commit 8ffa264.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants