Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread David Holmes
On 1/12/2020 10:39 am, Mandy Chung wrote: On Mon, 30 Nov 2020 20:57:32 GMT, Harold Seigel wrote: src/java.base/share/classes/java/lang/Class.java line 4480: 4478: } 4479: 4480: private native Class[] getPermittedSubclasses0(); Does this JVM method return the permitted subclasses or

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Mandy Chung
On Mon, 30 Nov 2020 15:59:07 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing ref

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Mandy Chung
On Mon, 30 Nov 2020 20:57:32 GMT, Harold Seigel wrote: >> src/java.base/share/classes/java/lang/Class.java line 4480: >> >>> 4478: } >>> 4479: >>> 4480: private native Class[] getPermittedSubclasses0(); >> >> Does this JVM method return the permitted subclasses or subinterfaces with >

Re: RFR: 8230501: Class data support for hidden classes [v7]

2020-11-30 Thread Mandy Chung
> Provide the `Lookup::defineHiddenClassWithClassData` API that allows live > objects > be shared between a hidden class and other classes. A hidden class can load > these live objects as dynamically-computed constants via this API. > > Specdiff > http://cr.openjdk.java.net/~mchung/jdk16/webrevs

Integrated: 8230501: Class data support for hidden classes

2020-11-30 Thread Mandy Chung
On Wed, 11 Nov 2020 18:52:10 GMT, Mandy Chung wrote: > Provide the `Lookup::defineHiddenClassWithClassData` API that allows live > objects > be shared between a hidden class and other classes. A hidden class can load > these live objects as dynamically-computed constants via this API. > > Spec

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-11-30 Thread Naoto Sato
On Mon, 30 Nov 2020 20:56:17 GMT, Roger Riggs wrote: >> java.util.HexFormat utility: >> >> - Format and parse hexadecimal strings, with parameters for delimiter, >> prefix, suffix and upper/lowercase >> - Static factories and builder methods to create HexFormat copies with >> modified parame

Re: RFR: 8166026: refactor shell tests to java

2020-11-30 Thread Igor Ignatyev
On Fri, 27 Nov 2020 18:50:19 GMT, Ivan Šipka wrote: > @iignatev could you please review? Thank you. > > note to self: > jtreg test/jdk/java/lang/ProcessBuilder/InheritIO/InheritIoTest.java > test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java > test/jdk/java/lang/Thread/

Re: RFR: JDK-8249836 java/io/IOException/LastErrorString.java should have bug-id as 1st word in @ignore

2020-11-30 Thread Igor Ignatyev
On Fri, 27 Nov 2020 16:11:54 GMT, Mahendra Chhipa wrote: > …id as 1st word in @ignore > > https://bugs.openjdk.java.net/browse/JDK-8249836 LGTM - Marked as reviewed by iignatyev (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1482

Re: RFR: 8256894: define test groups

2020-11-30 Thread Igor Ignatyev
On Tue, 24 Nov 2020 16:13:59 GMT, Ivan Šipka wrote: > Defined new test groups as defined in ticket. @fguallini @frkator, you will need to open a new JBS ticket for this change. test/jdk/TEST.groups line 326: > 324: :jdk_text \ > 325: :core_tools \ > 326: :jdk_other it would seem

Re: RFR: 8256894: define test groups

2020-11-30 Thread Igor Ignatyev
On Wed, 25 Nov 2020 20:31:50 GMT, Ivan Šipka wrote: >> test/jdk/TEST.groups line 327: >> >>> 325: :core_tools \ >>> 326: :jdk_other \ >>> 327: :jdk_core_manual >> >> Please don't add manual tests to jdk_core. > > Removed. aren't they already a part of `jdk_core` test group? e.g. `

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Harold Seigel
On Mon, 30 Nov 2020 19:44:52 GMT, Mandy Chung wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Improving getPermittedSubclasses javadoc. >> - Merge branch 'master' into JDK-8246778 >> - M

Re: RFR: 8159746: (proxy) Support for default methods [v8]

2020-11-30 Thread Mandy Chung
> This proposes a new static `Proxy::invokeDefaultMethod` method to invoke > the given default method on the given proxy instance. > > The implementation looks up a method handle for `invokespecial` instruction > as if called from with the proxy class as the caller, equivalent to calling > `X.supe

Re: RFR: 8257074 Update the ByteBuffers micro benchmark [v4]

2020-11-30 Thread Brian Burkhalter
On Mon, 30 Nov 2020 13:39:12 GMT, Chris Hegarty wrote: >> The ByteBuffers micro benchmark seems to be a little dated. >> >> It should be a useful resource to leverage when analysing the performance >> impact of any potential implementation changes in the byte buffer classes. >> More specifica

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-11-30 Thread Roger Riggs
> java.util.HexFormat utility: > > - Format and parse hexadecimal strings, with parameters for delimiter, > prefix, suffix and upper/lowercase > - Static factories and builder methods to create HexFormat copies with > modified parameters. > - Consistent naming of methods for conversion of byt

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Mandy Chung
On Mon, 30 Nov 2020 15:59:07 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing ref

Re: Lookup.defineAnonymousClass() vs indy

2020-11-30 Thread Mandy Chung
On 11/30/20 12:25 PM, fo...@univ-mlv.fr wrote: The real question is why the descriptor is not rewritten to replace the owning class by the hidden class when lookup.defineHiddenClass is called, i believe this is the behavior of unsafe.defineAnonymousClass. JVM does not do any magic for hidde

Re: Lookup.defineAnonymousClass() vs indy

2020-11-30 Thread forax
> De: "mandy chung" > À: "Remi Forax" , "core-libs-dev" > > Envoyé: Lundi 30 Novembre 2020 19:16:25 > Objet: Re: Lookup.defineAnonymousClass() vs indy > The implementation method to be invoked for this lambda is a static bridge > method > taking this hidden class's instance as the parameter, i.e

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Mandy Chung
On Mon, 30 Nov 2020 15:59:07 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing ref

Integrated: 8180352: Add Stream.toList() method

2020-11-30 Thread Stuart Marks
On Tue, 3 Nov 2020 01:33:32 GMT, Stuart Marks wrote: > This change introduces a new terminal operation on Stream. This looks like a > convenience method for Stream.collect(Collectors.toList()) or > Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this > method directly on

Re: RFR: 8180352: Add Stream.toList() method [v4]

2020-11-30 Thread Stuart Marks
On Wed, 25 Nov 2020 17:14:43 GMT, Peter Levart wrote: >> An alternative with similar performance would be to do a Stream.toArray() >> and then copy that array into new Object[] and then wrap that copy with >> listFromTrustedArrayNullsAllowed(). The difference would be in the >> serialization f

Re: RFR: 8257164: Share LambdaForms for VH linkers/invokers.

2020-11-30 Thread Paul Sandoz
On Thu, 26 Nov 2020 13:13:43 GMT, Vladimir Ivanov wrote: > Introduce sharing of `LambdaForms` for `VarHandle` linkers and invokers. > It reduces the number of LambdaForms needed at runtime. > > Testing: tier1-4 Marked as reviewed by psandoz (Reviewer). - PR: https://git.openjdk.ja

Re: RFR: 8257189: Handle concurrent updates of MH.form better

2020-11-30 Thread Paul Sandoz
On Thu, 26 Nov 2020 21:23:16 GMT, Vladimir Ivanov wrote: > Concurrent updates may lead to redundant LambdaForms created and unnecessary > class loading when those are compiled. > > Most notably, it severely affects MethodHandle customization: when a > MethodHandle is called from multiple thre

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Mandy Chung
On Mon, 30 Nov 2020 15:59:07 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing ref

Re: RFR: 8257164: Share LambdaForms for VH linkers/invokers.

2020-11-30 Thread Vladimir Kozlov
On Thu, 26 Nov 2020 13:13:43 GMT, Vladimir Ivanov wrote: > Introduce sharing of `LambdaForms` for `VarHandle` linkers and invokers. > It reduces the number of LambdaForms needed at runtime. > > Testing: tier1-4 Good. - Marked as reviewed by kvn (Reviewer). PR: https://git.openjdk

Re: RFR: 8159746: (proxy) Support for default methods [v7]

2020-11-30 Thread Alan Bateman
On Mon, 30 Nov 2020 19:14:08 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/reflect/Proxy.java line 1281: >> >>> 1279: * @return a lookup for proxy class of this proxy instance >>> 1280: */ >>> 1281: private static MethodHandles.Lookup >>> proxyClassLookup(Method

Re: RFR: 8159746: (proxy) Support for default methods [v7]

2020-11-30 Thread Mandy Chung
On Mon, 30 Nov 2020 17:28:52 GMT, Alan Bateman wrote: >> Mandy Chung 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 25 additional >> commits si

Re: RFR: 8166026: refactor shell tests to java

2020-11-30 Thread Roger Riggs
On Fri, 27 Nov 2020 18:50:19 GMT, Ivan Šipka wrote: > @iignatev could you please review? Thank you. > > note to self: > jtreg test/jdk/java/lang/ProcessBuilder/InheritIO/InheritIoTest.java > test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java > test/jdk/java/lang/Thread/

Re: RFR: 8253751: Dependencies of automatic modules are not propagated through module layers [v2]

2020-11-30 Thread Alan Bateman
On Wed, 25 Nov 2020 22:09:11 GMT, Mandy Chung wrote: >> Alan Bateman 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 s

Re: Lookup.defineAnonymousClass() vs indy

2020-11-30 Thread Mandy Chung
The implementation method to be invoked for this lambda is a static bridge method taking this hidden class's instance as the parameter, i.e. a descriptor referencing a hidden class, which will fail to resolve.  0: #104 REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lan

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Alan Bateman
On Mon, 30 Nov 2020 15:59:07 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing ref

Integrated: 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String

2020-11-30 Thread Сергей Цыпанов
On Tue, 29 Sep 2020 14:28:52 GMT, Сергей Цыпанов wrote: > Original mail: > https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/069197.html > > Hello, > > while working with `StringBuilder.insert()` I've spotted that its delegate > `AbstractStringBuilder.insert()` is missing

Re: RFR: 8159746: (proxy) Support for default methods [v7]

2020-11-30 Thread Alan Bateman
On Wed, 25 Nov 2020 22:24:40 GMT, Mandy Chung wrote: >> This proposes a new static `Proxy::invokeDefaultMethod` method to invoke >> the given default method on the given proxy instance. >> >> The implementation looks up a method handle for `invokespecial` instruction >> as if called from with th

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-30 Thread Naoto Sato
Hi Roger, Thanks for your thought and I agree with you. Since this is a utility primarily meant for developers, not end users, limiting the "hexadecimal string/character" in Latin-1 seems reasonable. Naoto On 11/30/20 7:42 AM, Roger Riggs wrote: Hi Naoto, There are a couple of ways consist

Re: RFR: 8159746: (proxy) Support for default methods [v7]

2020-11-30 Thread Alan Bateman
On Wed, 25 Nov 2020 22:24:40 GMT, Mandy Chung wrote: >> This proposes a new static `Proxy::invokeDefaultMethod` method to invoke >> the given default method on the given proxy instance. >> >> The implementation looks up a method handle for `invokespecial` instruction >> as if called from with th

Integrated: 8256541: Sort out what version of awk is used in the build system

2020-11-30 Thread Magnus Ihse Bursie
On Thu, 26 Nov 2020 20:58:38 GMT, Magnus Ihse Bursie wrote: > For historical reasons, there exists a variety of different implementations > of awk: awk (the original implementation), gawk (the GNU version), nawk (new > awk, iirc) and the lesser known mawk. > > Things are complicated by the fa

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Jan Lahoda
> This pull request replaces https://github.com/openjdk/jdk/pull/1227. > > From the original PR: > >> Please review the code for the second iteration of sealed classes. In this >> iteration we are: >> >> * Enhancing narrowing reference conversion to allow for stricter >> checking of cast c

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

2020-11-30 Thread Jan Lahoda
On Mon, 30 Nov 2020 09:55:56 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Improving getPermittedSubclasses javadoc. >> - Merge branch 'master' into JDK-8246778 >> -

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-30 Thread Roger Riggs
Hi Naoto, There are a couple of ways consistency can be achieved (and with what). The existing hex conversions from strings to hex all delegate to Character.digit(ch, radix) which allows both digits and letters beyond Latin1. (See Integer.valueOf(string, radix), Long.valueOf(string, radix), et

Re: RFR: 8256541: Sort out what version of awk is used in the build system

2020-11-30 Thread Erik Joelsson
On Thu, 26 Nov 2020 20:58:38 GMT, Magnus Ihse Bursie wrote: > For historical reasons, there exists a variety of different implementations > of awk: awk (the original implementation), gawk (the GNU version), nawk (new > awk, iirc) and the lesser known mawk. > > Things are complicated by the fa

Re: RFR: 8247402: Documentation for Map::compute contains confusing implementation requirements

2020-11-30 Thread Pavel Rappo
On Mon, 30 Nov 2020 13:52:17 GMT, Pavel Rappo wrote: >> @pavelrappo Please see my updated CSR below. Thanks. >> >> # Map::compute should have the implementation requirement match its default >> implementation >> >> ## Summary >> >> The implementation requirement of Map::compute does not match

Re: RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols [v3]

2020-11-30 Thread Jan Lahoda
> Adding support for record classes in the historical data for ct.sym. This > includes a few changes not strictly needed for the change: > -updating and moving tests into test/langtools, so that it is easier to run > them. > -fixing Record attribute reading in javac's ClassReader (used for tests,

Re: RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols [v3]

2020-11-30 Thread Jan Lahoda
On Mon, 30 Nov 2020 12:17:46 GMT, Chris Hegarty wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing tests on Windows - normalizing line endings. > > make/langtools/src/classes/build/tools/symbolgenerator/CreateSym

Re: RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols [v2]

2020-11-30 Thread Jan Lahoda
> Adding support for record classes in the historical data for ct.sym. This > includes a few changes not strictly needed for the change: > -updating and moving tests into test/langtools, so that it is easier to run > them. > -fixing Record attribute reading in javac's ClassReader (used for tests,

Re: RFR: 8247402: Documentation for Map::compute contains confusing implementation requirements

2020-11-30 Thread Pavel Rappo
On Sat, 28 Nov 2020 08:42:52 GMT, John Lin wrote: >> @johnlinp In any case, you'd also need to update the surrounding prose; we >> need to remove this: >> returning the current value or {@code null} if absent:``` > > @pavelrappo Please see my updated CSR below. Thanks. > > # Map::compute shou

Re: RFR: 8257074 Update the ByteBuffers micro benchmark [v4]

2020-11-30 Thread Chris Hegarty
> The ByteBuffers micro benchmark seems to be a little dated. > > It should be a useful resource to leverage when analysing the performance > impact of any potential implementation changes in the byte buffer classes. > More specifically, the impact of such changes on the performance of sharp >

Re: Why having the wrong InnerClasses attribute is an issue for the VM ?

2020-11-30 Thread forax
- Mail original - > De: "David Holmes" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Lundi 30 Novembre 2020 13:44:32 > Objet: Re: Why having the wrong InnerClasses attribute is an issue for the VM > ? > On 30/11/2020 8:04 pm, fo...@univ-mlv.fr wrote: >> - Mail original - >>

Re: Why having the wrong InnerClasses attribute is an issue for the VM ?

2020-11-30 Thread David Holmes
On 30/11/2020 8:04 pm, fo...@univ-mlv.fr wrote: - Mail original - De: "David Holmes" À: "Remi Forax" , "core-libs-dev" Envoyé: Lundi 30 Novembre 2020 08:57:37 Objet: Re: Why having the wrong InnerClasses attribute is an issue for the VM ? On 30/11/2020 5:08 pm, Remi Forax wrote: I

Re: RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols

2020-11-30 Thread Chris Hegarty
On Fri, 27 Nov 2020 13:21:15 GMT, Jan Lahoda wrote: > Adding support for record classes in the historical data for ct.sym. This > includes a few changes not strictly needed for the change: > -updating and moving tests into test/langtools, so that it is easier to run > them. > -fixing Record att

Re: Why having the wrong InnerClasses attribute is an issue for the VM ?

2020-11-30 Thread forax
- Mail original - > De: "David Holmes" > À: "Remi Forax" , "core-libs-dev" > > Envoyé: Lundi 30 Novembre 2020 08:57:37 > Objet: Re: Why having the wrong InnerClasses attribute is an issue for the VM > ? > On 30/11/2020 5:08 pm, Remi Forax wrote: >> I've forgotten a cast in an invokedyn

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview)

2020-11-30 Thread Alan Bateman
On Fri, 27 Nov 2020 16:57:54 GMT, Jan Lahoda wrote: > This pull request replaces https://github.com/openjdk/jdk/pull/1227. > > From the original PR: > >> Please review the code for the second iteration of sealed classes. In this >> iteration we are: >> >> * Enhancing narrowing reference c

Re: "loc: wrong sig" in ZipFileSystem on a valid ZIP file (extra data field of exactly 5 bytes)

2020-11-30 Thread Dawid Weiss
> The ZipFileSystem check is case sensitive: > Ah, that's not obvious at all... and even if this is an undocumented option I'd add a comment in the test or remove it to Map.of() for clarity. That bug entry in Jira doesn't have "affects" pointing at older releases - I think it should since it affec