RFR: 8260517: implement Sealed Classes as a standard feature

2021-04-15 Thread Vicente Romero
Please review this PR that intents to make sealed classes a final feature in 
Java. This PR contains compiler and VM changes. In line with similar PRs, which 
has made preview features final, this one is mostly removing preview related 
comments from APIs plus options in test cases.

Thanks

-

Commit messages:
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - fixing failing regression tests
 - JVM related changes
 - 8260517: Compiler implementation for Sealed Classes

Changes: https://git.openjdk.java.net/jdk/pull/3526/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260517
  Stats: 450 lines in 56 files changed: 48 ins; 282 del; 120 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

2021-04-15 Thread David Holmes
On Fri, 16 Apr 2021 02:11:10 GMT, Vicente Romero  wrote:

>> Please review this PR that intents to make sealed classes a final feature in 
>> Java. This PR contains compiler and VM changes. In line with similar PRs, 
>> which has made preview features final, this one is mostly removing preview 
>> related comments from APIs plus options in test cases. Please also review 
>> the related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
>> 
>> Thanks
>> 
>> note: this PR is related to 
>> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
>> after it.
>
> Vicente Romero has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   removing javax.lang.model changes

Hi Vincente,

Hotspot and hotspot tests all look fine. One query: why was this test removed?

 test/hotspot/jtreg/runtime/sealedClasses/AbstractSealedTest.java

is that functionality tested elsewhere? (The other deleted test seemed 
obviously trivial.)

Thanks,
David

src/hotspot/share/classfile/classFileParser.cpp line 3916:

> 3914: record_attribute_start = cfs->current();
> 3915: record_attribute_length = attribute_length;
> 3916:   } else if (_major_version >= JAVA_17_VERSION) {

Can you update the comment at L3932 to say JAVA_17_VERSION please.

src/hotspot/share/classfile/classFileParser.hpp line 345:

> 343: 
> 344:   bool supports_sealed_types();
> 345:   bool supports_records();

Good catch!

-

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

2021-04-15 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request incrementally with one additional 
commit since the last revision:

  removing javax.lang.model changes

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/6e2a99c6..5aef5108

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=00-01

  Stats: 9 lines in 2 files changed: 6 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v2]

2021-04-15 Thread Vicente Romero
On Fri, 16 Apr 2021 02:10:05 GMT, David Holmes  wrote:

> Hi Vicente,
> 
> Hotspot and hotspot tests all look fine. One query: why was this test removed?
> 
> test/hotspot/jtreg/runtime/sealedClasses/AbstractSealedTest.java
> 
> is that functionality tested elsewhere? (The other deleted test seemed 
> obviously trivial.)
> 
> Thanks,
> David

Hi David, thanks for your comments, yes regarding `test 
test/hotspot/jtreg/runtime/sealedClasses/AbstractSealedTest.java`, it was 
removed because the functionality is tested in 
`test/langtools/tools/javac/sealed/SealedCompilationTests.java`

> src/hotspot/share/classfile/classFileParser.cpp line 3916:
> 
>> 3914: record_attribute_start = cfs->current();
>> 3915: record_attribute_length = attribute_length;
>> 3916:   } else if (_major_version >= JAVA_17_VERSION) {
> 
> Can you update the comment at L3932 to say JAVA_17_VERSION please.

sure

-

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v3]

2021-04-15 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request incrementally with one additional 
commit since the last revision:

  updating comment after review feedback

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/5aef5108..8ebe56fd

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v3]

2021-04-21 Thread Maurizio Cimadamore
On Fri, 16 Apr 2021 03:35:06 GMT, Vicente Romero  wrote:

>> Please review this PR that intents to make sealed classes a final feature in 
>> Java. This PR contains compiler and VM changes. In line with similar PRs, 
>> which has made preview features final, this one is mostly removing preview 
>> related comments from APIs plus options in test cases. Please also review 
>> the related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
>> 
>> Thanks
>> 
>> note: this PR is related to 
>> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
>> after it.
>
> Vicente Romero has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   updating comment after review feedback

Compiler changes look good (I have not checked SymbolGenerator).

Why were some tests removed?

-

Marked as reviewed by mcimadamore (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v3]

2021-04-21 Thread Vicente Romero
On Wed, 21 Apr 2021 14:42:39 GMT, Maurizio Cimadamore  
wrote:

> Compiler changes look good (I have not checked SymbolGenerator).
> 
> Why were some tests removed?

thanks for the review. The removed tests were already covered in langtools 
regression tests, so I only removed duplicated tests

-

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v4]

2021-04-22 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains eight additional 
commits since the last revision:

 - Merge branch 'master' into JDK-8260517
 - updating comment after review feedback
 - removing javax.lang.model changes
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - fixing failing regression tests
 - JVM related changes
 - 8260517: Compiler implementation for Sealed Classes

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/8ebe56fd..43e9cb5f

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=02-03

  Stats: 40790 lines in 1391 files changed: 8730 ins; 27464 del; 4596 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v5]

2021-04-30 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains ten additional 
commits since the last revision:

 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - updating comment after review feedback
 - removing javax.lang.model changes
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - fixing failing regression tests
 - JVM related changes
 - 8260517: Compiler implementation for Sealed Classes

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/43e9cb5f..2744f615

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=03-04

  Stats: 506473 lines in 3844 files changed: 20558 ins; 483521 del; 2394 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v6]

2021-05-01 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request incrementally with one additional 
commit since the last revision:

  restoring jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES, it is 
needed by the build

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/2744f615..304fd76a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=04-05

  Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v6]

2021-05-03 Thread Jan Lahoda
On Sun, 2 May 2021 02:10:26 GMT, Vicente Romero  wrote:

>> Please review this PR that intents to make sealed classes a final feature in 
>> Java. This PR contains compiler and VM changes. In line with similar PRs, 
>> which has made preview features final, this one is mostly removing preview 
>> related comments from APIs plus options in test cases. Please also review 
>> the related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
>> 
>> Thanks
>> 
>> note: this PR is related to 
>> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
>> after it.
>
> Vicente Romero has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   restoring jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES, it is 
> needed by the build

javac changes look good to me.

-

Marked as reviewed by jlahoda (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v7]

2021-05-06 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains 11 additional commits 
since the last revision:

 - Merge branch 'master' into JDK-8260517
 - restoring jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES, it is 
needed by the build
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - updating comment after review feedback
 - removing javax.lang.model changes
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - fixing failing regression tests
 - JVM related changes
 - ... and 1 more: https://git.openjdk.java.net/jdk/compare/10336a26...0208dcf0

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/304fd76a..0208dcf0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=06
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=05-06

  Stats: 18908 lines in 391 files changed: 9887 ins; 4814 del; 4207 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526


Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v8]

2021-05-19 Thread Vicente Romero
> Please review this PR that intents to make sealed classes a final feature in 
> Java. This PR contains compiler and VM changes. In line with similar PRs, 
> which has made preview features final, this one is mostly removing preview 
> related comments from APIs plus options in test cases. Please also review the 
> related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090)
> 
> Thanks
> 
> note: this PR is related to 
> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated 
> after it.

Vicente Romero has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains 12 additional commits 
since the last revision:

 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - restoring jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES, it is 
needed by the build
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - updating comment after review feedback
 - removing javax.lang.model changes
 - Merge branch 'master' into JDK-8260517
 - Merge branch 'master' into JDK-8260517
 - fixing failing regression tests
 - ... and 2 more: https://git.openjdk.java.net/jdk/compare/cc4f43fb...d220bc20

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3526/files
  - new: https://git.openjdk.java.net/jdk/pull/3526/files/0208dcf0..d220bc20

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=07
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3526&range=06-07

  Stats: 40144 lines in 1123 files changed: 19391 ins; 13080 del; 7673 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3526.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3526/head:pull/3526

PR: https://git.openjdk.java.net/jdk/pull/3526