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

JDK-8271556: [lworld] java.lang.BootstrapMethodError in .equals() for primitive record #528

Closed
wants to merge 1 commit into from

Conversation

mlchung
Copy link
Member

@mlchung mlchung commented Aug 12, 2021

We want the default choice is to use the primary L-type mirror and only
when there is a contextual need to make a distinction, the Q-type mirror will be an option.

The proposal is to always pass the primary mirror to the recordClass argument
and adjust the bootstrap code to drive method handle creation off of the primitive
value type of the record class instead of recordClass, using recordClass only
for getting the class name for toString.


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8271556: [lworld] java.lang.BootstrapMethodError in .equals() for primitive record

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/528/head:pull/528
$ git checkout pull/528

Update a local copy of the PR:
$ git checkout pull/528
$ git pull https://git.openjdk.java.net/valhalla pull/528/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 528

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/528.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 12, 2021

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

@openjdk
Copy link

@openjdk openjdk bot commented Aug 12, 2021

@mlchung 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:

8271556: [lworld] java.lang.BootstrapMethodError in .equals() for primitive record

Reviewed-by: rriggs

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 3 new commits pushed to the lworld branch:

  • 96f2052: 8272511: [lworld] Disable PhaseIdealLoop::try_sink_out_of_loop until optimization is stable in mainline
  • a5516c1: 8272290: [lworld] Disable CDS if InlineTypePassFieldsAsArgs has changed
  • f85b10b: 8272307: [lworld] [AArch64] TestCallingConventionC1 test63 and test64 get incorrect result

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld branch.
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.

➡️ To integrate this PR with the above commit message to the lworld branch, type /integrate in a new comment.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 12, 2021

Webrevs

Copy link
Contributor

@jespersm jespersm left a comment

The patch also works here. Just a minor stylistic suggestion where a pattern could save a few casts.

if (type instanceof MethodType)
Class<?> receiverType = recordClass.isPrimitiveClass() ? recordClass.asValueType() : recordClass;

if (type instanceof MethodType) {
Copy link
Contributor

@jespersm jespersm Aug 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: Perhaps

if (type instanceof MethodType mType) {
    methodType = mType;
    if (mType.parameterType(0) != receiverType) {

?

Copy link
Member Author

@mlchung mlchung Aug 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. I may fix it in jdk repo directly.

Copy link
Collaborator

@RogerRiggs RogerRiggs left a comment

LGTM

@mlchung
Copy link
Member Author

@mlchung mlchung commented Aug 17, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Aug 17, 2021

Going to push as commit ad20c66.
Since your change was applied there have been 4 commits pushed to the lworld branch:

  • 9d05484: 8272400: [lworld] serviceability/sa/CDSJMapClstats.java fails: No suitable match for type of address
  • 96f2052: 8272511: [lworld] Disable PhaseIdealLoop::try_sink_out_of_loop until optimization is stable in mainline
  • a5516c1: 8272290: [lworld] Disable CDS if InlineTypePassFieldsAsArgs has changed
  • f85b10b: 8272307: [lworld] [AArch64] TestCallingConventionC1 test63 and test64 get incorrect result

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 17, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Aug 17, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 17, 2021

@mlchung Pushed as commit ad20c66.

💡 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
3 participants