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

8268885: duplicate checkcast when destination type is not first type of intersection type #5235

Conversation

vicente-romero-oracle
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle commented Aug 23, 2021

Please review this PR which is fixing the following bug: javac is generating duplicate checkcast for cases like:

class IntersectionTypeTest {
    interface I1 {}
    interface I2 {}
    static class C {}
    void test() {
        I2 i = (I1 & I2) new C();
    }
}

basically when an intersection type is used in a cast expression and the target is not the type in the intersection.

TIA

PS. I also ran the JCK tests for this patch, same results as without the patch


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8268885: duplicate checkcast when destination type is not first type of intersection type

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5235

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 23, 2021

👋 Welcome back vromero! 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 the rfr Pull request is ready for review label Aug 23, 2021
@openjdk
Copy link

openjdk bot commented Aug 23, 2021

@vicente-romero-oracle The following label will be automatically applied to this pull request:

  • compiler

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 compiler compiler-dev@openjdk.org label Aug 23, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 23, 2021

Webrevs

@vicente-romero-oracle
Copy link
Contributor Author

ping

Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@openjdk
Copy link

openjdk bot commented Sep 9, 2021

@vicente-romero-oracle 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:

8268885: duplicate checkcast when destination type is not first type of intersection type

Reviewed-by: jlahoda

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 193 new commits pushed to the master branch:

  • 96614da: 8272903: Missing license header in ArenaAllocator.java
  • e3bda63: 8273489: Zero: Handle UseHeavyMonitors on all monitorenter paths
  • c81690d: 8273498: compiler/c2/Test7179138_1.java timed out
  • 4866eaa: 8273409: Receiver type narrowed by CCP does not always trigger post-parse call devirtualization
  • 5ca26cb: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests
  • f6cc173: 8273539: [PPC64] gtest build error after JDK-8264207
  • 9690df7: 8273476: G1: refine G1CollectedHeap::par_iterate_regions_array_part_from
  • 00e059d: 8133686: HttpURLConnection.getHeaderFields and URLConnection.getRequestProperties methods return field values in reverse order
  • aa93111: 8273483: Zero: Clear pending JNI exception check in native method handler
  • 8c16f48: 8273487: Zero: Handle "zero" variant in runtime tests
  • ... and 183 more: https://git.openjdk.java.net/jdk/compare/b690f29699180149d33b6a83de10697790587a87...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 9, 2021
@vicente-romero-oracle
Copy link
Contributor Author

@lahodaj thanks for the review

@vicente-romero-oracle
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 9, 2021

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

  • ef4a532: 8263773: Reenable German localization for builds at Oracle
  • 96614da: 8272903: Missing license header in ArenaAllocator.java
  • e3bda63: 8273489: Zero: Handle UseHeavyMonitors on all monitorenter paths
  • c81690d: 8273498: compiler/c2/Test7179138_1.java timed out
  • 4866eaa: 8273409: Receiver type narrowed by CCP does not always trigger post-parse call devirtualization
  • 5ca26cb: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests
  • f6cc173: 8273539: [PPC64] gtest build error after JDK-8264207
  • 9690df7: 8273476: G1: refine G1CollectedHeap::par_iterate_regions_array_part_from
  • 00e059d: 8133686: HttpURLConnection.getHeaderFields and URLConnection.getRequestProperties methods return field values in reverse order
  • aa93111: 8273483: Zero: Clear pending JNI exception check in native method handler
  • ... and 184 more: https://git.openjdk.java.net/jdk/compare/b690f29699180149d33b6a83de10697790587a87...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 9, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 9, 2021
@openjdk
Copy link

openjdk bot commented Sep 9, 2021

@vicente-romero-oracle Pushed as commit dd1209e.

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

@vicente-romero-oracle vicente-romero-oracle deleted the JDK-8268885 branch September 9, 2021 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org integrated Pull request has been integrated
2 participants