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

8244796: [lworld] Javac does not compile test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore #46

Closed
wants to merge 4 commits into from

Conversation

@sadayapalam
Copy link
Collaborator

@sadayapalam sadayapalam commented May 14, 2020

Summary: Implement temporary typing rules for value class literals, these being:

o Given a value class V that implements an interface I
    - Class<V>, Class<? extends V>, Class<? super V> are all malformed for the time being.
    - V.class and v.getClass() are to be typed temporarily as Class<? extends Object & I>

Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8244796: [lworld] Javac does not compile test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore

Reviewers

  • Jim Laskey (jlaskey - no project role)

Download

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

sadayapalam added 4 commits May 13, 2020
…aluetypes/UnsafeTest.java anymore

Summary: Temporary workarounds to type value class literals
…aluetypes/UnsafeTest.java anymore

Summary: Temporary workarounds to type value class literals
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 14, 2020

👋 Welcome back sadayapalam! 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 May 14, 2020

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

8244796: [lworld] Javac does not compile test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore

Reviewed-by: jlaskey
  • 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 /solves command.

Since the source branch of this PR was last updated there have been 2 commits pushed to the lworld branch:

  • df9b1ac: 8244934: [lworld] Copyright header format
  • 2e5a958: 8244810: [lworld] Decommission arrayStorageProperties from Klass:array_klass() et el

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge lworld into your branch, and then specify the current head hash when integrating, like this: /integrate df9b1ac7fdabe55181fdcff1e4e249e117d92f24.

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

@sadayapalam
Copy link
Collaborator Author

@sadayapalam sadayapalam commented May 14, 2020

/solves 8244799

@mlbridge
Copy link

@mlbridge mlbridge bot commented May 14, 2020

Webrevs

@mlbridge
Copy link

@mlbridge mlbridge bot commented May 14, 2020

Mailing list message from Remi Forax on valhalla-dev:

----- Mail original -----

De: "Srikanth Adayapalam" <sadayapalam at openjdk.java.net>
?: "valhalla-dev" <valhalla-dev at openjdk.java.net>
Envoy?: Jeudi 14 Mai 2020 03:40:04
Objet: [lworld] RFR: 8244796: [lworld] Javac does not compile
test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore

Summary: Implement temporary typing rules for value class literals, these being:

o Given a value class V that implements an interface I
- Class<V>, Class<? extends V>, Class<? super V> are all malformed for the time
being.
- V.class and v.getClass() are to be typed temporarily as Class<? extends Object
& I>

Hi Srikanth,
why V.class is not typed as Class<? extends V.ref> ?

R?mi

@mlbridge
Copy link

@mlbridge mlbridge bot commented May 14, 2020

Mailing list message from Srikanth on valhalla-dev:

On 14/05/20 2:09 pm, Remi Forax wrote:

----- Mail original -----

De: "Srikanth Adayapalam" <sadayapalam at openjdk.java.net>
?: "valhalla-dev" <valhalla-dev at openjdk.java.net>
Envoy?: Jeudi 14 Mai 2020 03:40:04
Objet: [lworld] RFR: 8244796: [lworld] Javac does not compile
test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore
Summary: Implement temporary typing rules for value class literals, these being:

o Given a value class V that implements an interface I
    \- Class\<V>\, Class\<\? extends V>\, Class\<\? super V> are all malformed for the time
    being\.
    \- V\.class and v\.getClass\(\) are to be typed temporarily as Class\<\? extends Object
    \& I>

Hi Srikanth,
why V.class is not typed as Class<? extends V.ref> ?

I would say the operative word is "temporary" - this fix is basically so
we can make things malleable enough to compile code that we used to
compile with the type system as it existed in LW2 - to buy us time so to
speak - to evolve all the rules around bounds checking in the LW3 world
where an inline type V is not a subtype of jlO.

As for that specific typing, in the language model V is not a subtype of
V.ref and we haven't figured out all the nuances of how inline
widening/narrowing conversions interact with bounds checking.

Srikanth

R?mi

-------------

Commit messages:
- Additional fixes for typing of value class literals.
- Merge branch 'JDK-8244796' of https://github.com/sadayapalam/valhalla into
JDK-8244796
- 8244796: Javac does not compile
test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore
- 8244796: Javac does not compile
test/hotspot/jtreg/runtime/valhalla/valuetypes/UnsafeTest.java anymore

@sadayapalam
Copy link
Collaborator Author

@sadayapalam sadayapalam commented May 14, 2020

/integrate

@openjdk openjdk bot closed this May 14, 2020
@openjdk openjdk bot added the integrated label May 14, 2020
@openjdk
Copy link

@openjdk openjdk bot commented May 14, 2020

@sadayapalam The following commits have been pushed to lworld since your change was applied:

  • df9b1ac: 8244934: [lworld] Copyright header format
  • 2e5a958: 8244810: [lworld] Decommission arrayStorageProperties from Klass:array_klass() et el

Your commit was automatically rebased without conflicts.

Pushed as commit 122aa79.

@sadayapalam sadayapalam deleted the JDK-8244796 branch May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants