Integrated: 8320575: generic type information lost on mandated parameters of record's compact constructors

2024-05-24 Thread Vicente Romero
On Mon, 11 Dec 2023 23:33:16 GMT, Vicente Romero wrote: > Reflection is not retrieving generic type information for mandated > parameters. This is a known issue which has been explicitly stated in the API > of some reflection methods. Fix for > [JDK-8292275](https://bugs.openjd

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v24]

2024-05-23 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: fixing lines length - Changes: - all: ht

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v23]

2024-05-23 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: more review comments - Changes: - all: ht

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v22]

2024-05-23 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: addressing review comments - Changes: - a

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v21]

2024-05-23 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA 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 mer

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v7]

2024-05-10 Thread Vicente Romero
On Tue, 12 Dec 2023 22:21:29 GMT, Joe Darcy wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixing comment > > As the core reflection code will encounter record classes compiled

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v19]

2024-05-10 Thread Vicente Romero
On Mon, 29 Apr 2024 20:17:29 GMT, Joe Darcy wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> minor refactoring > > test/jdk/java/lang/reflect/records/R10.jcod line 1: > >&

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v20]

2024-05-10 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA 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 mer

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v7]

2024-05-06 Thread Vicente Romero
On Mon, 6 May 2024 16:07:26 GMT, Adam Sotona wrote: >> Hi, >> During performance optimization work on Class-File API as JDK lambda >> generator we found some static initialization killers. >> One of them is `java.lang.classfile.Attributes` with tens of static fields >> initialized with

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v19]

2024-04-29 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: minor refactoring - Changes: - all: https://

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v17]

2024-04-29 Thread Vicente Romero
On Sat, 27 Apr 2024 00:14:23 GMT, Chen Liang wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> code refactoring > > src/java.base/share/classes/java/lang/reflect/Execu

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v18]

2024-04-29 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA 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 mer

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v17]

2024-04-26 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: code refactoring - Changes: - all: https://

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v15]

2024-04-26 Thread Vicente Romero
On Fri, 26 Apr 2024 21:27:55 GMT, Chen Liang wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> special case the new code for records only > > src/java.base/share/classes/java/lang/re

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v16]

2024-04-26 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: additional tests - Changes: - all: https://

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v15]

2024-04-26 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: special case the new code for records only --

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v14]

2024-04-26 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding more tests - Changes: - all: https://

Re: RFR: 8303689: javac -Xlint could/should report on "dangling" doc comments [v9]

2024-04-25 Thread Vicente Romero
On Thu, 25 Apr 2024 23:24:07 GMT, Jonathan Gibbons wrote: >> Please review the updates to support a proposed new >> `-Xlint:dangling-doc-comments` option. >> >> The work can be thought of as in 3 parts: >> >> 1. An update to the `javac` internal class `DeferredLintHandler` so that it >> is

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v10]

2024-04-24 Thread Vicente Romero
On Wed, 24 Apr 2024 15:00:34 GMT, Vicente Romero wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> adding comment to jcod file > > test > Will this fix be backported to JDK 21?

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v13]

2024-04-24 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/java/lang/reflect/records/RecordReflectionT

Re: RFR: 8320575: generic type information lost on mandated parameters [v12]

2024-04-24 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: making the javadoc less general - Changes:

Re: RFR: 8320575: generic type information lost on mandated parameters [v11]

2024-04-24 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA 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 mer

Re: RFR: 8320575: generic type information lost on mandated parameters [v10]

2024-04-24 Thread Vicente Romero
On Thu, 14 Dec 2023 04:00:58 GMT, Vicente Romero wrote: >> Reflection is not retrieving generic type information for mandated >> parameters. This is a known issue which has been explicitly stated in the >> API of some reflection methods. Fix for >> [JDK-8292275](

Re: RFR: 8328481: Implement Module Imports [v11]

2024-04-19 Thread Vicente Romero
On Fri, 19 Apr 2024 13:17:18 GMT, Jan Lahoda wrote: >> This is an implementation of JEP JDK-8315129: Module Import Declarations >> (Preview). Please see the JEP for details: >> https://bugs.openjdk.org/browse/JDK-8315129 >> >> It is mostly straightforward - the module imports are parsed, and

Re: RFR: 8328481: Implement Module Imports [v10]

2024-04-18 Thread Vicente Romero
On Thu, 18 Apr 2024 12:11:19 GMT, Jan Lahoda wrote: >> This is an implementation of JEP JDK-8315129: Module Import Declarations >> (Preview). Please see the JEP for details: >> https://bugs.openjdk.org/browse/JDK-8315129 >> >> It is mostly straightforward - the module imports are parsed, and

Re: RFR: 8330182: Start of release updates for JDK 24

2024-04-16 Thread Vicente Romero
On Mon, 15 Apr 2024 19:01:08 GMT, Joe Darcy wrote: > Get JDK 24 underway. lgtm - Marked as reviewed by vromero (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18787#pullrequestreview-2004323374

Re: RFR: 8324651: Compiler Implementation for Derived Record Creation (Preview) [v10]

2024-04-15 Thread Vicente Romero
On Tue, 9 Apr 2024 09:28:23 GMT, Jan Lahoda wrote: >> This is a patch for javac, that adds the Derived Record Creation >> expressions. The current draft specification for the feature is: >> https://cr.openjdk.org/~gbierman/jep468/jep468-20240326/specs/derived-record-creation-jls.html >> >> The

Re: RFR: 8324651: Compiler Implementation for Derived Record Creation (Preview) [v9]

2024-04-08 Thread Vicente Romero
On Mon, 8 Apr 2024 16:21:19 GMT, Jan Lahoda wrote: >> This is a patch for javac, that adds the Derived Record Creation >> expressions. The current draft specification for the feature is: >> https://cr.openjdk.org/~gbierman/jep468/jep468-20240326/specs/derived-record-creation-jls.html >> >> The

Re: RFR: 8324651: Compiler Implementation for Derived Record Creation (Preview) [v5]

2024-04-04 Thread Vicente Romero
On Thu, 28 Mar 2024 14:08:44 GMT, Jan Lahoda wrote: >> This is a patch for javac, that adds the Derived Record Creation >> expressions. The current draft specification for the feature is: >> https://cr.openjdk.org/~gbierman/jep468/jep468-20240326/specs/derived-record-creation-jls.html >> >>

Re: RFR: JDK-8329624: Add visitors for preview language features

2024-04-03 Thread Vicente Romero
On Wed, 3 Apr 2024 21:38:03 GMT, Joe Darcy wrote: >> src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitorPreview.java >> line 2: >> >>> 1: /* >>> 2: * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights >>> reserved. >> >> general, please check the

Re: RFR: JDK-8329624: Add visitors for preview language features

2024-04-03 Thread Vicente Romero
On Wed, 3 Apr 2024 20:17:39 GMT, Joe Darcy wrote: > When new language features are added, the javax.lang.model may need to be > updated. For certain classes of features, the API update includes introducing > a new set of concrete visitors to handle the language feature. > > The API

Re: RFR: JDK-8303689: javac -Xlint could/should report on "dangling" doc comments

2024-03-28 Thread Vicente Romero
On Wed, 27 Mar 2024 22:04:30 GMT, Jonathan Gibbons wrote: > Please review the updates to support a proposed new > `-Xlint:dangling-doc-comments` option. > > The work can be thought of as in 3 parts: > > 1. An update to the `javac` internal class `DeferredLintHandler` so that it > is possible

Re: RFR: 8297879: javadoc link to preview JEP 1000 has grouping character comma

2024-03-18 Thread Vicente Romero
On Mon, 18 Mar 2024 14:53:44 GMT, Pavel Rappo wrote: > Please review this simple bugfix to properly construct links to preview JEPs. > > The most straightforward fix I could think of was to pass `String` rather > than `int` (`Integer`) to a method, which eventually calls >

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v55]

2024-01-29 Thread Vicente Romero
On Fri, 26 Jan 2024 18:02:58 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Integrated: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-26 Thread Vicente Romero
On Tue, 16 Jan 2024 21:18:55 GMT, Vicente Romero wrote: > Updating ASM to version 9.6, > > Thanks in advance for the reviews, > Vicente This pull request has now been integrated. Changeset: 91d8ea79 Author:Vicente Romero URL: https://git.openjdk.or

Re: RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-26 Thread Vicente Romero
On Fri, 26 Jan 2024 01:36:47 GMT, Mandy Chung wrote: > Looks okay to me. I would rely on your testing for verification. I have run tier1-6 tests, they look OK - PR Comment: https://git.openjdk.org/jdk/pull/17453#issuecomment-1912506728

Re: RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-25 Thread Vicente Romero
On Tue, 16 Jan 2024 21:18:55 GMT, Vicente Romero wrote: > Updating ASM to version 9.6, > > Thanks in advance for the reviews, > Vicente hi Mandy, thanks for your comments, > The change looks okay to me. Most of the changes are doc change. I see many > files are upda

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v45]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 18:26:08 GMT, Aggelos Biboudis wrote: >> test/langtools/tools/javac/patterns/CastConversionMatch.java line 6: >> >>> 4: * @summary Match which involves a cast conversion >>> 5: * @compile/fail/ref=CastConversionMatch.out -XDrawDiagnostics >>> CastConversionMatch.java >>>

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v45]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 15:55:51 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v45]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 15:55:51 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 15:34:33 GMT, Vicente Romero wrote: >> Aggelos Biboudis has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Enhance Javadoc of ExactConversionsSupport (2) >> - Enhance Javadoc of E

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v45]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 15:55:51 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 15:26:54 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v44]

2024-01-24 Thread Vicente Romero
On Wed, 24 Jan 2024 15:26:54 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v41]

2024-01-23 Thread Vicente Romero
On Mon, 22 Jan 2024 18:42:56 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/ > > Aggelos Biboudis has updated the pull request with a

RFR: 8323835: Updating ASM to 9.6 for JDK 23

2024-01-17 Thread Vicente Romero
Updating ASM to version 9.6, Thanks in advance for the reviews, Vicente - Commit messages: - some additional minor changes - more changes - additional changes - 8323835: Updating ASM to 9.6 for JDK 23 Changes: https://git.openjdk.org/jdk/pull/17453/files Webrev:

Re: RFR: 8320575: generic type information lost on mandated parameters [v10]

2023-12-13 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding comment to jcod file - Changes: - a

Re: RFR: 8320575: generic type information lost on mandated parameters [v9]

2023-12-13 Thread Vicente Romero
On Thu, 14 Dec 2023 03:56:11 GMT, Vicente Romero wrote: >> Reflection is not retrieving generic type information for mandated >> parameters. This is a known issue which has been explicitly stated in the >> API of some reflection methods. Fix for >> [JDK-8292275](

Re: RFR: 8320575: generic type information lost on mandated parameters [v9]

2023-12-13 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding a comment to the test - Changes: - a

Re: RFR: 8320575: generic type information lost on mandated parameters [v8]

2023-12-13 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: addressing review comments - Changes: - a

Re: RFR: 8320575: generic type information lost on mandated parameters [v7]

2023-12-13 Thread Vicente Romero
On Tue, 12 Dec 2023 22:21:29 GMT, Joe Darcy wrote: > As the core reflection code will encounter record classes compiled before and > after the javac code generation change, if the old behavior can be triggered > in javac using `--release $OLD`/`--source $OLD`, that would be helpful to >

Re: RFR: 8320575: generic type information lost on mandated parameters [v7]

2023-12-11 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: fixing comment - Changes: - all: https://

Re: RFR: 8320575: generic type information lost on mandated parameters [v6]

2023-12-11 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: simplifying code - Changes: - all: https://

Re: RFR: 8320575: generic type information lost on mandated parameters [v5]

2023-12-11 Thread Vicente Romero
On Tue, 12 Dec 2023 03:56:43 GMT, Vicente Romero wrote: >> Reflection is not retrieving generic type information for mandated >> parameters. This is a known issue which has been explicitly stated in the >> API of some reflection methods. Fix for >> [JDK-8292275](

Re: RFR: 8320575: generic type information lost on mandated parameters [v5]

2023-12-11 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: removing comment - Changes: - all: https://

Re: RFR: 8320575: generic type information lost on mandated parameters [v4]

2023-12-11 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: javadoc - Changes: - all: https://git.open

Re: RFR: 8320575: generic type information lost on mandated parameters [v3]

2023-12-11 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: javadoc - Changes: - all: https://git.open

Re: RFR: 8320575: generic type information lost on mandated parameters [v2]

2023-12-11 Thread Vicente Romero
t; information for mandated parameters if available plus changing the spec of > the related reflection methods. > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: javadoc adjustments - Changes: - all: ht

RFR: 8320575: generic type information lost on mandated parameters

2023-12-11 Thread Vicente Romero
Reflection is not retrieving generic type information for mandated parameters. This is a known issue which has been explicitly stated in the API of some reflection methods. Fix for [JDK-8292275](https://bugs.openjdk.org/browse/JDK-8292275) made the parameters of compact constructors of record

Re: RFR: JDK-8319413: Start of release updates for JDK 23 [v4]

2023-12-01 Thread Vicente Romero
On Thu, 30 Nov 2023 23:49:24 GMT, Joe Darcy wrote: >> Time to start making preparations for JDK 23. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Update symbol files to JDK 22 b26. looks good to me - Marked

Re: RFR: 8319220: Pattern matching switch with a lot of cases is unduly slow [v5]

2023-11-13 Thread Vicente Romero
On Tue, 7 Nov 2023 14:18:41 GMT, Jan Lahoda wrote: >> Consider code like: >> >> void test(Object o) { >> switch (o) { >> case X1 -> {} >> case X2 -> {} >> ...(about 100 cases) >> ``` >> >> javac will compile the switch into a switch whose selector is an indy >> invocation

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v6]

2023-11-09 Thread Vicente Romero
On Tue, 7 Nov 2023 12:29:54 GMT, Jim Laskey wrote: >> Update String Templates for a second preview. With the addition of >> >> - Expression type and throws are determined from the `process` method of the >> processor type and not the processor type. >> >> - Qualified `STR` and `RAW` are

Re: RFR: 8318144: Match on enum constants with body compiles but fails with MatchException [v3]

2023-11-06 Thread Vicente Romero
On Mon, 6 Nov 2023 20:47:06 GMT, Jan Lahoda wrote: >> For code like: >> >> enum E {A {}, B {} } >> Object o = E.A; >> switch (o) { >> case E.A -> System.err.println(o); >> default -> System.err.println("default"); >> } >> >> >> The result is `default`, not `A`, due to incorrect

Re: RFR: 8318144: Match on enum constants with body compiles but fails with MatchException [v2]

2023-11-06 Thread Vicente Romero
On Mon, 6 Nov 2023 18:51:59 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 397: >> >>> 395: >>> 396: try { >>> 397: if (!(value instanceof Enum enumValue)) { >> >> this code seems to be here with the only purpose

Re: RFR: 8318144: Match on enum constants with body compiles but fails with MatchException [v2]

2023-11-06 Thread Vicente Romero
On Mon, 6 Nov 2023 07:34:38 GMT, Jan Lahoda wrote: >> For code like: >> >> enum E {A {}, B {} } >> Object o = E.A; >> switch (o) { >> case E.A -> System.err.println(o); >> default -> System.err.println("default"); >> } >> >> >> The result is `default`, not `A`, due to incorrect

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v12]

2023-11-06 Thread Vicente Romero
On Fri, 3 Nov 2023 12:40:48 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v12]

2023-11-03 Thread Vicente Romero
On Fri, 3 Nov 2023 15:00:41 GMT, Jim Laskey wrote: >> src/java.base/share/native/libjli/java.c line 559: >> >>> 557: >>> 558: /* Build platform specific argument array */ >>> 559: if ((mainType & MAIN_WITHOUT_ARGS) == 0) { >> >> nice, thanks, a minor addition to the condition: `&&

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v12]

2023-11-03 Thread Vicente Romero
On Fri, 3 Nov 2023 12:40:48 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v10]

2023-11-02 Thread Vicente Romero
On Thu, 2 Nov 2023 20:48:45 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v22]

2023-10-17 Thread Vicente Romero
On Tue, 17 Oct 2023 14:44:38 GMT, Aggelos Biboudis wrote: >> This is the proposed patch for Primitive types in patterns, instanceof, and >> switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html > > Aggelos Biboudis

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v19]

2023-10-12 Thread Vicente Romero
On Wed, 11 Oct 2023 15:43:19 GMT, Aggelos Biboudis wrote: >> This is the first draft of a patch for Primitive types in patterns, >> instanceof, and switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html > > Aggelos

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v19]

2023-10-12 Thread Vicente Romero
On Wed, 11 Oct 2023 15:43:19 GMT, Aggelos Biboudis wrote: >> This is the first draft of a patch for Primitive types in patterns, >> instanceof, and switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html > > Aggelos

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v19]

2023-10-12 Thread Vicente Romero
On Wed, 11 Oct 2023 15:43:19 GMT, Aggelos Biboudis wrote: >> This is the first draft of a patch for Primitive types in patterns, >> instanceof, and switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html > > Aggelos

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v19]

2023-10-12 Thread Vicente Romero
On Wed, 11 Oct 2023 15:43:19 GMT, Aggelos Biboudis wrote: >> This is the first draft of a patch for Primitive types in patterns, >> instanceof, and switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html > > Aggelos

Re: RFR: 8308753: Class-File API transition to Preview [v14]

2023-10-04 Thread Vicente Romero
On Wed, 4 Oct 2023 09:30:16 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-10-02 Thread Vicente Romero
On Mon, 2 Oct 2023 07:18:19 GMT, Adam Sotona wrote: >> src/java.base/share/classes/java/lang/classfile/AnnotationElement.java line >> 34: >> >>> 32: import jdk.internal.javac.PreviewFeature; >>> 33: >>> 34: /** >> >> shouldn't we have the preview header applied to all these compilation

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-09-29 Thread Vicente Romero
On Tue, 26 Sep 2023 12:32:37 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-09-29 Thread Vicente Romero
On Tue, 26 Sep 2023 12:32:37 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK

Re: RFR: 8316971: Add Lint warning for restricted method calls [v3]

2023-09-29 Thread Vicente Romero
On Fri, 29 Sep 2023 08:30:07 GMT, Maurizio Cimadamore wrote: >> This patch adds a new lint warning category, namely `-Xlint:restricted` to >> enable warnings on restricted method calls. >> >> The patch is relatively straightforward: javac marks methods that are marked >> with the

Re: RFR: 8316971: Add Lint warning for restricted method calls [v2]

2023-09-29 Thread Vicente Romero
On Fri, 29 Sep 2023 08:14:29 GMT, Maurizio Cimadamore wrote: > > question shouldn't the new Restricted annotation be annotated with the > > @PreviewFeature annotation? it depends on a preview feature > > The Restricted annotation is an internal annotation only. So there is no > value in

Re: RFR: 8316971: Add Lint warning for restricted method calls [v2]

2023-09-28 Thread Vicente Romero
On Thu, 28 Sep 2023 15:36:30 GMT, Maurizio Cimadamore wrote: >> This patch adds a new lint warning category, namely `-Xlint:restricted` to >> enable warnings on restricted method calls. >> >> The patch is relatively straightforward: javac marks methods that are marked >> with the

Re: RFR: 8316971: Add Lint warning for restricted method calls [v2]

2023-09-28 Thread Vicente Romero
On Thu, 28 Sep 2023 15:36:30 GMT, Maurizio Cimadamore wrote: >> This patch adds a new lint warning category, namely `-Xlint:restricted` to >> enable warnings on restricted method calls. >> >> The patch is relatively straightforward: javac marks methods that are marked >> with the

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v15]

2023-09-15 Thread Vicente Romero
On Fri, 15 Sep 2023 09:42:24 GMT, Adam Sotona wrote: >> javap uses proprietary com.sun.tools.classfile library to parse class files. >> >> This patch converts javap to use Classfile API. >> >> Please review. >> >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-07 Thread Vicente Romero
On Thu, 20 Jul 2023 09:11:20 GMT, Adam Sotona wrote: >> javap uses proprietary com.sun.tools.classfile library to parse class files. >> >> This patch converts javap to use Classfile API. >> >> Please review. >> >> Thanks, >> Adam > > Adam Sotona has updated the pull request with a new target

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-06 Thread Vicente Romero
On Thu, 20 Jul 2023 09:11:20 GMT, Adam Sotona wrote: >> javap uses proprietary com.sun.tools.classfile library to parse class files. >> >> This patch converts javap to use Classfile API. >> >> Please review. >> >> Thanks, >> Adam > > Adam Sotona has updated the pull request with a new target

Re: RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]

2023-09-06 Thread Vicente Romero
On Thu, 20 Jul 2023 09:11:20 GMT, Adam Sotona wrote: >> javap uses proprietary com.sun.tools.classfile library to parse class files. >> >> This patch converts javap to use Classfile API. >> >> Please review. >> >> Thanks, >> Adam > > Adam Sotona has updated the pull request with a new target

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v11]

2023-05-18 Thread Vicente Romero
On Thu, 18 May 2023 22:22:25 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8303669: SelectVersion indexes past the end of the argv array [v2]

2023-05-18 Thread Vicente Romero
On Thu, 4 May 2023 09:17:05 GMT, Adam Sotona wrote: >> libjli/java.c's SelectVersion method receives argc and argv but ignores argc >> in some circumstances an instead checks if *argv == 0 in its while loop, >> which results in a segmentation fault if the provided array is not NULL >>

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v11]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 19:17:53 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Refactor source code launcher looks good

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v10]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 17:31:27 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Typo

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 17:22:03 GMT, Rémi Forax wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java >> line 3999: >> >>> 3997: Name name = names.fromString(simplename); >>> 3998: JCModifiers anonMods = F.at(primaryPos) >>> 3999: >>>

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v9]

2023-05-05 Thread Vicente Romero
On Fri, 5 May 2023 16:18:42 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Recommended changes #2

Re: RFR: 8304837: Classfile API throws IOOBE for MethodParameters attribute without parameter names [v3]

2023-04-28 Thread Vicente Romero
On Fri, 24 Mar 2023 06:42:30 GMT, Hannes Greule wrote: >> After merging master into https://github.com/openjdk/jdk/pull/9862, we >> encountered test failures (e.g., >> https://github.com/SirYwell/jdk/actions/runs/4500940829/jobs/7923018438#step:9:2541). >> The Classfile API tries to read from

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v6]

2023-04-24 Thread Vicente Romero
On Mon, 24 Apr 2023 15:16:18 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v6]

2023-04-24 Thread Vicente Romero
On Mon, 24 Apr 2023 15:16:18 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v6]

2023-04-24 Thread Vicente Romero
On Mon, 24 Apr 2023 15:16:18 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v6]

2023-04-24 Thread Vicente Romero
On Mon, 24 Apr 2023 15:16:18 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v5]

2023-04-24 Thread Vicente Romero
On Mon, 24 Apr 2023 13:08:44 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 315: >> >>> 313: Object[] labels = resolvedLabels.resolvedLabels; >>> 314: >>> 315: // Dumbest possible strategy >> >> I guess that given that we

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v5]

2023-04-21 Thread Vicente Romero
On Fri, 21 Apr 2023 16:25:04 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v5]

2023-04-21 Thread Vicente Romero
On Fri, 21 Apr 2023 16:25:04 GMT, Jan Lahoda wrote: >> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: >> >> - the pattern matching for switch and record patterns features are made >> final, together with updates to tests. >> - parenthesized patterns are

  1   2   >