Skip to content

Conversation

@mur47x111
Copy link
Contributor

@mur47x111 mur47x111 commented Nov 14, 2024

The isArray() || !isAbstract() idiom is often used in Graal for expressing if a type is concrete and can be instantiated. This PR overrides ModifiersProvider.isConcrete in ResolvedJavaType to provide this idiom.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8343693: [JVMCI] Override ModifiersProvider.isConcrete in ResolvedJavaType to be isArray() || !isAbstract() (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22111

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 14, 2024

👋 Welcome back yzheng! 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
Copy link

openjdk bot commented Nov 14, 2024

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

8343693: [JVMCI] Override ModifiersProvider.isConcrete in ResolvedJavaType to be isArray() || !isAbstract()

Reviewed-by: never

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 1 new commit pushed to the master branch:

  • d8a2337: 8344895: SM cleanup of module java.xml

Please see this link for an up-to-date comparison between the source branch of this pull request and the master 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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 14, 2024
@openjdk
Copy link

openjdk bot commented Nov 14, 2024

@mur47x111 The following labels will be automatically applied to this pull request:

  • graal
  • hotspot-compiler

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

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org labels Nov 14, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 14, 2024

Webrevs

@dougxc
Copy link
Member

dougxc commented Nov 15, 2024

Please add a test for this in TestResolvedJavaType.java.


/**
* Checks that the method is concrete and not abstract.
* Checks that this element is concrete and not abstract.
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth clarifying that we don't mean isAbstract() here. We specifically mean that it corresponds to a method with a real implementation or a type which can be instantiated.

@tkrodriguez
Copy link
Contributor

I think you need to add a unit test for isConcrete now:

java.lang.AssertionError: test missing for public default boolean jdk.vm.ci.meta.ResolvedJavaType.isConcrete()


/**
* Checks that this element is concrete and not abstract.
* Returns true if a method is with a real implementation, or if a type can
Copy link
Member

Choose a reason for hiding this comment

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

"if this element is a method with a concrete implementation, or a type that can be instantiated"

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 26, 2024
@mur47x111
Copy link
Contributor Author

Thanks for the review!
/integrate

@openjdk
Copy link

openjdk bot commented Nov 26, 2024

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

  • 7ae6069: 8344184: Remove sun.net.ResourceManager after JEP 486 integration
  • 1d5587b: 8344256: Clean up obsolete code in java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java
  • 5e15415: 8344654: Some client tests still expect a SecurityManager after JEP486
  • 3689f39: 8344013: "bad tag in log" assert with +LogCompilation +CITimeVerbose
  • 9458a43: 8318416: Superscript marks should use consistent font style
  • c5de307: 8344992: Remove Security Manager dependencies from java.security.cert API and implementations
  • 65c98e5: 8344420: Remove Security Manager dependencies from javax.security package
  • 2465526: 8344821: Test CheckDefaultArchiveFile.java fails if classes_coh.jsa is not present
  • d752f19: 8343427: Class file load hook crashes on archived classes from multi-release JARs
  • f1b5a6e: 8344565: SM cleanup in jdk/internal and java/lang package private classes
  • ... and 1 more: https://git.openjdk.org/jdk/compare/c329f97f3211bc14aa4211461bb9a7abb073296e...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 26, 2024
@openjdk openjdk bot closed this Nov 26, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 26, 2024
@openjdk
Copy link

openjdk bot commented Nov 26, 2024

@mur47x111 Pushed as commit 8da6435.

💡 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

graal graal-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants