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-8247663: [lworld] LambdaMetaFactory should allow an inline value projection type to convert to its reference projection type #102

Closed
wants to merge 3 commits into from

Conversation

@mlchung
Copy link
Member

@mlchung mlchung commented Jul 1, 2020

This patch fixes LambdaMetaFactory to allow inline value projection type to convert to its reference projection type.

Class::isAssignableFrom and Class::asSubclass are the APIs to determine if a given type can be safely cast to this Class.

  • Class::isAssignableFrom tests if a given type can be converted to this Class via a widening reference conversion.
  • Class::asSubclass tests if a given type can be converted to this Class via a narrowing conversion.

The current thought is to keep Class::isAssignableFrom and Class::asSubclass to respect the class file hierarchy and a cast is needed when converting from V.val to V.ref. LambdaMetaFactory and other frameworks will need to extend the type adaptability check to support inline types.

I considered adding Class::isConvertibleFrom method but we should wait for more use cases proving the need of such convenience method. This check can be done by calling Class::referenceType and Class::valueType.


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8247663: [lworld] LambdaMetaFactory should allow an inline value projection type to convert to its reference projection type

Reviewers

  • Roger Riggs (rriggs - Committer) ⚠️ Review applies to 1cde585

Download

$ git fetch https://git.openjdk.java.net/valhalla pull/102/head:pull/102
$ git checkout pull/102

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 1, 2020

👋 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.

@openjdk
Copy link

@openjdk openjdk bot commented Jul 1, 2020

@mlchung This change now passes all automated pre-integration checks, type /integrate in a new comment to proceed. After integration, the commit message will be:

8247663: [lworld] LambdaMetaFactory should allow an inline value projection type to convert to its reference projection type

Reviewed-by: rriggs
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

There are currently no new commits on the lworld branch since the last update of the source branch of this PR. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you would like to avoid potential automatic rebasing, specify the current head hash when integrating, like this: /integrate 701567c094ea4b88cf71a79b9567fd7b1569cad8.

➡️ 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 Jul 1, 2020

Webrevs

@mlchung
Copy link
Member Author

@mlchung mlchung commented Jul 8, 2020

/integrate

@openjdk openjdk bot closed this Jul 8, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Jul 8, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jul 8, 2020

@mlchung
Pushed as commit 83d6a22.

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