Re: RFR: 8270056: Generated lambda class can not access protected static method of target class [v2]

2021-07-08 Thread Yi Yang
> Generated lambda class can not access protected static method of the target > class. The following exception is thrown when executing the attached > reproducible program: > > > Exception in thread "main" java.lang.IllegalAccessError: class > AccessProtectedStaticMethodFromSuper$B$$Lambda$15/

Re: RFR: JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers

2021-07-08 Thread Alexey Semenyuk
On Thu, 8 Jul 2021 19:25:33 GMT, Andy Herrick wrote: > JDK-8269387: jpackage --add-launcher should have option to not create > shortcuts for additional launchers src/jdk.jpackage/share/classes/jdk/jpackage/internal/AddLauncherArguments.java line 39: > 37: > 38: /* > 39: * AddLauncherArgumen

Re: [jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for aarch64 platforms

2021-07-08 Thread Mikhailo Seledtsov
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. Yumin, Ioi, thanks for the review. All relev

[jdk17] Integrated: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for aarch64 platforms

2021-07-08 Thread Mikhailo Seledtsov
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. This pull request has now been integrated. Ch

RFR: 8260265: UTF-8 by Default

2021-07-08 Thread Naoto Sato
This is an implementation for the `JEP 400: UTF-8 by Default`. The gist of the changes is `Charset.defaultCharset()` returning `UTF-8` and `file.encoding` system property being added in the spec, but another notable modification is in `java.io.PrintStream` where it continues to use the `Console`

Re: RFR: Merge jdk17 [v2]

2021-07-08 Thread Jesper Wilhelmsson
> Forwardport JDK 17 -> JDK 18 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 192 commits: - Merge - 8269827: JMH tests for AES/GCM byte[] and bytebuffers Reviewed-by: ecaspole, weijun - 8268965: TCP Conn

Integrated: Merge jdk17

2021-07-08 Thread Jesper Wilhelmsson
On Thu, 8 Jul 2021 22:06:32 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: dfd6b2be Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/dfd6b2be7d2cc312bf550a475be91072259f88af Stats: 675 li

RFR: Merge jdk17

2021-07-08 Thread Jesper Wilhelmsson
Forwardport JDK 17 -> JDK 18 - Commit messages: - Merge - 8269722: NPE in HtmlDocletWriter - 8270109: ProblemList 4 SA tests on macOS-aarch64 - 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF - 8269738: AssertionError

Re: [jdk17] RFR: 8268826: Cleanup Override in Context-Specific Deserialization Filters [v7]

2021-07-08 Thread Brent Christian
On Wed, 7 Jul 2021 14:55:18 GMT, Roger Riggs wrote: >> Remove the unnecessary special case "OVERRIDE" in jdk.serialFilterFactory >> property. >> Fix description in the example of a filter allowing platform classes. >> Suppress some warnings about use of SecurityManager in tests. > > Roger Riggs

Re: RFR: JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers

2021-07-08 Thread Alexey Semenyuk
On Thu, 8 Jul 2021 19:25:33 GMT, Andy Herrick wrote: > JDK-8269387: jpackage --add-launcher should have option to not create > shortcuts for additional launchers Review test/jdk/tools/jpackage/share/AddLShortcutTest.java line 46: > 44: */ > 45: > 46: /* Why do you need two jtreg @test-s if

Re: RFR: JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers

2021-07-08 Thread Alexey Semenyuk
On Thu, 8 Jul 2021 19:25:33 GMT, Andy Herrick wrote: > JDK-8269387: jpackage --add-launcher should have option to not create > shortcuts for additional launchers test/jdk/tools/jpackage/share/AddLShortcutTest.java line 2: > 1: /* > 2: * Copyright (c) 2018, 2020, Oracle and/or its affiliates.

Re: RFR: JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers

2021-07-08 Thread Alexey Semenyuk
On Thu, 8 Jul 2021 19:25:33 GMT, Andy Herrick wrote: > JDK-8269387: jpackage --add-launcher should have option to not create > shortcuts for additional launchers src/jdk.jpackage/share/classes/jdk/jpackage/internal/AppImageFile.java line 259: > 257: for (var name : names) { > 258:

Re: RFR: JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers

2021-07-08 Thread Kevin Rushforth
On Thu, 8 Jul 2021 19:25:33 GMT, Andy Herrick wrote: > JDK-8269387: jpackage --add-launcher should have option to not create > shortcuts for additional launchers This will need a CSR (so you or someone with a Reviewer role should indicate this with the `/csr` command). Also, can you summarize

RFR: JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers

2021-07-08 Thread Andy Herrick
JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers - Commit messages: - JDK-8269387: jpackage --add-launcher should have option to not create shortcuts for additional launchers - JDK-8269387: jpackage --add-launcher should have

Re: [jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for aarch64 platforms

2021-07-08 Thread Mikhailo Seledtsov
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. Thanks Ioi. I have updated the issue descripti

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} for java.base [v11]

2021-07-08 Thread Mandy Chung
On Thu, 8 Jul 2021 03:12:24 GMT, Yi Yang wrote: >> After JDK-8265518(#3615), it's possible to replace all variants of >> checkIndex by >> Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in >> the whole JDK codebase. > > Yi Yang has refreshed the contents of this pull req

Re: RFR: 8270056: Generated lambda class can not access protected static method of target class

2021-07-08 Thread Mandy Chung
On Thu, 8 Jul 2021 02:32:45 GMT, Yi Yang wrote: > Generated lambda class can not access protected static method of the target > class. The following exception is thrown when executing the attached > reproducible program: > > > Exception in thread "main" java.lang.IllegalAccessError: class >

[jdk17] Integrated: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF

2021-07-08 Thread Brian Burkhalter
On Wed, 30 Jun 2021 23:00:24 GMT, Brian Burkhalter wrote: > Modify the specification of > `java.io.ByteArrayInputStream#read(byte[],int,int)` to indicate that `-1` is > returned instead of `0` when the stream is at its end and the third > parameter, `len`, is zero. This pull request has now b

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Joe Darcy
PS The benefit of an intrinsic in a case like this is being to use a platform-optimized implementation, trading off native instruction, floating-point branch, and bitwise conversion costs. -Joe On 7/8/2021 4:26 AM, Joe Darcy wrote: On 7/8/2021 3:50 AM, Andrew Haley wrote: On Thu, 8 Jul 2021

Re: RFR: 6506405: Math.abs(float) is slow [v5]

2021-07-08 Thread Brian Burkhalter
> Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 6506405: Add some tests - Changes: - all: https://gi

Re: RFR: 6506405: Math.abs(float) is slow [v4]

2021-07-08 Thread Joe Darcy
On Thu, 8 Jul 2021 15:53:18 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 6506405: Math.abs(float) is slow [v4]

2021-07-08 Thread Brian Burkhalter
> Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 6506405: Set MAG_BIT_MASKs to bit-wise complements of SIGN_BIT_MASKs

Re: RFR: 6506405: Math.abs(float) is slow [v3]

2021-07-08 Thread Joe Darcy
On Thu, 8 Jul 2021 15:34:16 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has refreshed the contents of this pull request, and > previous commits have been removed. The increme

Re: RFR: 6506405: Math.abs(float) is slow [v3]

2021-07-08 Thread Brian Burkhalter
> Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. Brian Burkhalter has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Brian Burkhalter
On Thu, 8 Jul 2021 01:05:16 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > >

RFR: 8268231: Aarch64: Use ldp in intrinsics for String.compareTo

2021-07-08 Thread Wang Huang
Dear all, Can you do me a favor to review this patch. This patch use `ldp` to implement String.compareTo. * We add a JMH test case * Here is the result of this test case Benchmark |(size)| Mode| Cnt|Score | Error |Units -|-

RFR: 8270057: Use Objects.checkFromToIndex for j.u.c.CopyOnWriteArrayList

2021-07-08 Thread Yi Yang
After JDK-8265518(#3615), it's possible to replace all variants of checkIndex by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in the whole JDK codebase. As Mandy suggested, I create this PR for changes involving JUC changes. - Commit messages: - replace

[jdk17] Integrated: 8268766: Desugaring of pattern matching enum switch should be improved

2021-07-08 Thread Jan Lahoda
On Wed, 16 Jun 2021 15:15:25 GMT, Jan Lahoda wrote: > Currently, an enum switch with patterns is desugared in a very non-standard, > and potentially slow, way. It would be better to use the standard > `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs to > accept enum c

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Joe Darcy
On 7/8/2021 3:50 AM, Andrew Haley wrote: On Thu, 8 Jul 2021 09:43:35 GMT, Andrew Haley wrote: Moves between GPRs and FPRs are often slow. There's a 10-cycle latency on some AArch64, so we avoid it whenever we can. Mind you, we don't care about this patch because we always generate FABS from

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Andrew Haley
On Thu, 8 Jul 2021 09:43:35 GMT, Andrew Haley wrote: > Moves between GPRs and FPRs are often slow. There's a 10-cycle latency on > some AArch64, so we avoid it whenever we can. Mind you, we don't care about > this patch because we always generate FABS from an intrinsic anyway. For avoidance of

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Andrew Haley
On Thu, 8 Jul 2021 01:05:16 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 8268113: Re-use Long.hashCode() where possible [v9]

2021-07-08 Thread Сергей Цыпанов
> There is a few JDK classes duplicating the contents of Long.hashCode() for > hash code calculation. They should explicitly delegate to Long.hashCode(). Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated c

Re: RFR: 8263561: Re-examine uses of LinkedList [v4]

2021-07-08 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: -

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v9]

2021-07-08 Thread Maurizio Cimadamore
On Thu, 8 Jul 2021 09:17:16 GMT, Jan Lahoda wrote: >> Currently, an enum switch with patterns is desugared in a very non-standard, >> and potentially slow, way. It would be better to use the standard >> `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs >> to accept enu

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v9]

2021-07-08 Thread Jan Lahoda
> Currently, an enum switch with patterns is desugared in a very non-standard, > and potentially slow, way. It would be better to use the standard > `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs to > accept enum constants as labels in order to allow this. A complicat

Re: RFR: 8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available [v6]

2021-07-08 Thread Сергей Цыпанов
> Hello, from discussion in https://github.com/openjdk/jdk/pull/3464 I've found > out, that in a few of JDK core classes, e.g. in `j.l.Class` expressions like > `baseName.replace('.', '/') + '/' + name` are not compiled into > `invokedynamic`-based code, but into one using `StringBuilder`. This

Re: RFR: 8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available [v5]

2021-07-08 Thread Сергей Цыпанов
On Wed, 12 May 2021 13:12:07 GMT, Claes Redestad wrote: >> But isn't `componentType.descriptorString()` does this itself? Also >> multi-dimensional arrays are quite an infrequent usecase, aren't they? > > Yeah, it's just an optimization. Current code wouldbuild "[[..[[LFoo;" by > recursively go

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-08 Thread Florian Weimer
On Thu, 8 Jul 2021 00:45:48 GMT, Joe Darcy wrote: > However, the bitwise conversion should now be fast everywhere. Doesn't it require moves between general-purpose and floating-point registers? Those have to go through memory for some targets (including old x86, where the ISA supports it, but

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Uwe Schindler
On Thu, 8 Jul 2021 01:05:16 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-08 Thread Uwe Schindler
On a quick review of version 2, I noticed that the double constant is declared as integer with same value like the float one. I think that's wrong, but I wonder why the asserts still pass. Uwe Am July 8, 2021 1:05:16 AM UTC schrieb Brian Burkhalter : >> Please consider this change to make the `