Re: RFR: 8284853: Fix various 'expected' typo [v2]

2022-04-14 Thread Yi Yang
On Thu, 14 Apr 2022 09:28:17 GMT, Andrey Turbanov wrote: >> Found various typos of expected: `exepected`, `exept`, `epectedly`, >> `expeced`, `Unexpeted`, etc. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8284853:

Re: RFR: 8273790: Potential cyclic dependencies between Gregorian and CalendarSystem [v2]

2021-09-24 Thread Yi Yang
On Sat, 25 Sep 2021 03:38:24 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.java.net/browse/JDK-8273790? >> >> As noted in that issue, trying to class load >> `sun.util.calendar.CalendarSystem` and

Re: RFR: 8273401: Remove JarIndex support in URLClassPath [v2]

2021-09-08 Thread Yi Yang
On Wed, 8 Sep 2021 06:22:38 GMT, wxiang wrote: >> There is a bug for URLClassPath.findResources with JarIndex. >> With some discussions about the bug, the current priority is to remove the >> JAR index support in URLClassPath, >> and don’t need to do anything to the jar tool in the short

Re: RFR: 8271396: Spelling errors

2021-07-28 Thread Yi Yang
On Wed, 3 Feb 2021 19:12:25 GMT, Emmanuel Bourg wrote: > This PR fixes the following spelling errors: > > choosen -> chosen > commad -> command > hiearchy -> hierarchy > leagacy -> legacy > minium -> minimum > subsytem -> subsystem > unamed -> unnamed Hi, I've filed

[jdk17] Integrated: 8270056: Generated lambda class can not access protected static method of target class

2021-07-13 Thread Yi Yang
On Tue, 13 Jul 2021 03:06:12 GMT, Yi Yang wrote: > Hi all, > > this pull request contains a backport of commit 07e90524 from the openjdk/jdk > repository. > > The commit being backported was authored by Yi Yang on 13 Jul 2021 and was > reviewed by Mandy Chung. > >

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

2021-07-12 Thread Yi Yang
Hi all, this pull request contains a backport of commit 07e90524 from the openjdk/jdk repository. The commit being backported was authored by Yi Yang on 13 Jul 2021 and was reviewed by Mandy Chung. Thanks! - Commit messages: - Backport 07e90524576f159fc16523430f1db62327c89a3b

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

2021-07-12 Thread Yi Yang
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 refre

Integrated: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} for java.base

2021-07-12 Thread Yi Yang
On Wed, 16 Jun 2021 08:08:47 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. This pull request has now been integrated.

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

2021-07-12 Thread Yi Yang
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.la

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

2021-07-12 Thread Yi Yang
On Mon, 12 Jul 2021 02:57:26 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

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

2021-07-11 Thread Yi Yang
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 refre

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

2021-07-11 Thread Yi Yang
esolved method) and 2) > does not force accepting an implClass as the first argument when invoking a > static method. > > Testing: > - test/jdk/java/ with release mode > - presubmit tests Yi Yang has updated the pull request incrementally with one additional commit since the last rev

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

2021-07-08 Thread Yi Yang
esolved method) and 2) > does not force accepting an implClass as the first argument when invoking a > static method. > > Testing: > - test/jdk/java/ with release mode > - presubmit tests Yi Yang has updated the pull request incrementally with one additional commit since the l

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

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

2021-07-07 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. Yi Yang has refreshed the contents of this pull request, and previous commits have bee

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

2021-07-07 Thread Yi Yang
On Wed, 7 Jul 2021 17:08:19 GMT, Mandy Chung wrote: >>> Does "client changes" means changes involving src/java.desktop and >>> test/java/awt? >> >> src/java.desktop, test/java/awt, and test/javax/imageio > >> > src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java >> >

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

2021-07-07 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

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v10]

2021-07-06 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. Yi Yang has updated the pull request incrementally with two additional commits since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v8]

2021-07-06 Thread Yi Yang
On Tue, 6 Jul 2021 19:06:43 GMT, Mandy Chung wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> tests rely on IOOBE exception message > > test/jdk/java/lang/StringBuffer/Exc

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v9]

2021-07-06 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. Yi Yang has updated the pull request incrementally with four additional commits since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-07-05 Thread Yi Yang
On Mon, 5 Jul 2021 06:01:23 GMT, Yi Yang wrote: >> Class loading order is different to class initialization order. >> >> There are a lot more tests than just tier1. :) I don't expect many, if any, >> tests to be looking for a specific IOOBE message, and I can't see

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-07-05 Thread Yi Yang
On Thu, 17 Jun 2021 05:16:14 GMT, David Holmes 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. > > Class loading order is different to class

Withdrawn: 8269384: Determine native byte order for StringUTF16 via ByteOrder

2021-06-28 Thread Yi Yang
On Fri, 25 Jun 2021 13:40:54 GMT, Yi Yang wrote: > Prefer using ByteOrder to compute byte order for StringUTF16 to determining > byte order by native method StringUTF16.isBigEndian. This pull request has been closed without being integrated. - PR: https://git.openjdk.java.n

Re: RFR: 8269384: Determine native byte order for StringUTF16 via ByteOrder

2021-06-28 Thread Yi Yang
On Fri, 25 Jun 2021 13:40:54 GMT, Yi Yang wrote: > Prefer using ByteOrder to compute byte order for StringUTF16 to determining > byte order by native method StringUTF16.isBigEndian. Thanks for the detailed clarification! The purpose of this PR is to skip the native call and use ByteOrde

Withdrawn: 8269383: (bf) ByteOrder should expose methods to test if platform is big or little endian

2021-06-27 Thread Yi Yang
On Fri, 25 Jun 2021 13:30:56 GMT, Yi Yang wrote: > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is > littl

Re: RFR: 8269383: (bf) ByteOrder should expose methods to test if platform is big or little endian

2021-06-27 Thread Yi Yang
On Fri, 25 Jun 2021 13:30:56 GMT, Yi Yang wrote: > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is > littl

Re: RFR: 8269384: Determine native byte order for StringUTF16 via ByteOrder

2021-06-27 Thread Yi Yang
On Fri, 25 Jun 2021 13:40:54 GMT, Yi Yang wrote: > Prefer using ByteOrder to compute byte order for StringUTF16 to determining > byte order by native method StringUTF16.isBigEndian. Hi Aleksey, do you have a concrete issue/discussion about bootstrapping problems? I don't see it because

Re: RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

2021-06-25 Thread Yi Yang
25, 2021 at 8:45 AM Yi Yang wrote: > > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is > little-en

Re: RFR: 8269383: (bf) ByteOrder should expose methods to test if platform is big or little endian

2021-06-25 Thread Yi Yang
On Fri, 25 Jun 2021 13:30:56 GMT, Yi Yang wrote: > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is > littl

RFR: 8269384: Determine native byte order for StringUTF16 via ByteOrder

2021-06-25 Thread Yi Yang
Prefer using ByteOrder to compute byte order for StringUTF16 to determining byte order by native method StringUTF16.isBigEndian. - Commit messages: - replace Changes: https://git.openjdk.java.net/jdk/pull/4596/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=4596=00

RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

2021-06-25 Thread Yi Yang
Hi, can I have a review of this change that adds two new utility methods for java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of ByteOrder.nativeOrder() is to check if the underlying platform is little-endian/big-endian. There is no reason to only provide

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v8]

2021-06-22 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. Yi Yang has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v7]

2021-06-21 Thread Yi Yang
On Tue, 22 Jun 2021 02:39:01 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 Yan

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v7]

2021-06-21 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. Yi Yang has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v6]

2021-06-21 Thread Yi Yang
On Mon, 21 Jun 2021 20:49:56 GMT, Paul Sandoz wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> more replacement 2 > > src/java.base/share/classes/jdk/internal/util/Precon

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v6]

2021-06-20 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. Yi Yang has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v5]

2021-06-20 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. Yi Yang has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v4]

2021-06-20 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. Yi Yang has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v3]

2021-06-20 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. Yi Yang has updated the pull request incrementally with one additional commit since the last revisio

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v2]

2021-06-20 Thread Yi Yang
On Fri, 18 Jun 2021 18:03:44 GMT, Paul Sandoz wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> restore IndexOfOufBoundsException; split exception line > > src/java.base/share/classes/

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v2]

2021-06-18 Thread Yi Yang
On Fri, 18 Jun 2021 05:54:01 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 Yan

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v2]

2021-06-18 Thread Yi Yang
On Thu, 17 Jun 2021 15:45:47 GMT, Paul Sandoz wrote: >> src/java.base/share/classes/java/util/Base64.java line 934: >> >>> 932: if (closed) >>> 933: throw new IOException("Stream is closed"); >>> 934: Preconditions.checkFromIndexSize(len, off, b.length,

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v2]

2021-06-17 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. Yi Yang has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v2]

2021-06-17 Thread Yi Yang
On Thu, 17 Jun 2021 10:19:43 GMT, Alan Bateman wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> restore IndexOfOufBoundsException; split exception line > > src/jav

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-06-16 Thread Yi Yang
On Thu, 17 Jun 2021 01:51:41 GMT, David Holmes wrote: > I skimmed through all these and the changes seem fine in principal. > I have two mild concerns: > > 1. How does this change the class initialization order on VM startup? > 2. Do any tests need adjusting due to potential changes in the

RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-06-16 Thread Yi Yang
After JDK-8265518, it's possible to replace all variants of checkIndex by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in the whole JDK codebase. - Commit messages: - use checkIndex globally Changes: https://git.openjdk.java.net/jdk/pull/4507/files

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v13]

2021-06-14 Thread Yi Yang
On Sat, 12 Jun 2021 08:22:32 GMT, Thomas Stuefe wrote: > Hi Yi, > > you may need to add the option to the obsolete-flags-table though as > described in arguments.cpp: > >

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v13]

2021-06-12 Thread Yi Yang
On Sat, 12 Jun 2021 06:50:48 GMT, Thomas Stuefe wrote: > This change removed a product flag so I wonder how it could be integrated > without a CSR? It's a diagnostic product flag, so it’ okay to remove it without issuing CSR. But I am not 100% sure. @dholmes-ora, do you have any comment

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v13]

2021-06-11 Thread Yi Yang
On Fri, 11 Jun 2021 18:05:45 GMT, Igor Veresov wrote: > I guess you need to do the "integrate" command again. Okay,thank you all for taking time to look at this - PR: https://git.openjdk.java.net/jdk/pull/3615

Integrated: 8265518: C1: Intrinsic support for Preconditions.checkIndex

2021-06-11 Thread Yi Yang
On Thu, 22 Apr 2021 06:55:41 GMT, Yi Yang wrote: > The JDK codebase re-created many variants of checkIndex(`grep -I -r > 'cehckIndex' jdk/`). A notable variant is java.nio.Buffer.checkIndex, which > annotated with @IntrinsicCandidate and it only has a corresponding C1 > intri

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v13]

2021-06-09 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v12]

2021-06-09 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-06-02 Thread Yi Yang
On Tue, 1 Jun 2021 17:43:45 GMT, Igor Veresov wrote: >> Thank you @veresov! >> >> I'm glad to have more comments from hotspot-compiler group. >> >> Later, I'd like to integrate it if there are no more comments/objections. >> >> Thanks! >> Yang > > @kelthuzadx Sorry about the delay. Could

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v11]

2021-06-01 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v10]

2021-06-01 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-05-24 Thread Yi Yang
On Fri, 30 Apr 2021 19:20:54 GMT, Igor Veresov wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> better check1-4 > > Looks like now the test fails in the pre-submit tests? Thank you @ve

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-05-24 Thread Yi Yang
On Fri, 30 Apr 2021 19:20:54 GMT, Igor Veresov wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> better check1-4 > > Looks like now the test fails in the pre-submit tests? Hi @veresov,

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-05-07 Thread Yi Yang
On Fri, 30 Apr 2021 19:20:54 GMT, Igor Veresov wrote: > Looks like now the test fails in the pre-submit tests? Hi Igor, Can you take a look at the latest version? Now it passes all pre-submit tests. Best Regards, Yang - PR: https://git.openjdk.java.net/jdk/pull/3615

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-05-07 Thread Yi Yang
On Fri, 30 Apr 2021 17:30:33 GMT, Paul Sandoz wrote: > It was my hope this would eventually happen when we added > `Objects.checkIndex` and the underlying intrinsic. Very good! Hi Paul, Thank you for noticing this PR. > It was my hope this would eventually happen when we added >

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v9]

2021-05-07 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v8]

2021-05-06 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v7]

2021-05-06 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v6]

2021-04-29 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v5]

2021-04-29 Thread Yi Yang
On Thu, 29 Apr 2021 10:13:05 GMT, Daniel Fuchs wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AssertionError when expected exception was not thrown > > test/hotspot/jtreg/compiler/c1/

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v5]

2021-04-29 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v4]

2021-04-29 Thread Yi Yang
On Thu, 29 Apr 2021 09:30:50 GMT, Daniel Fuchs wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove extra newline > > test/hotspot/jtreg/compiler/c1/TestCheckIndexC1Intrinsic.java line

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v4]

2021-04-28 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v3]

2021-04-28 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOC

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v2]

2021-04-28 Thread Yi Yang
On Wed, 28 Apr 2021 17:32:18 GMT, Igor Veresov wrote: > Do we need to keep this flag? Exactly, the flag should be removed. Thanks, Yang - PR: https://git.openjdk.java.net/jdk/pull/3615

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v2]

2021-04-26 Thread Yi Yang
On Fri, 23 Apr 2021 03:50:54 GMT, Yi Yang wrote: >> The JDK codebase re-created many variants of checkIndex(`grep -I -r >> 'cehckIndex' jdk/`). A notable variant is java.nio.Buffer.checkIndex, which >> annotated with @IntrinsicCandidate and it only has a corresponding C1 &g

Re: RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v2]

2021-04-22 Thread Yi Yang
JDK code, I think we > can firstly implement its C1 counterpart. There are also a few kinds of stuff > we can do later: > > 1. Replace all variants of checkIndex by Objects.checkIndex in the whole JDK > codebase. > 2. Remove Buffer.checkIndex and obsolete/deprecate InlineNIOChec

Re: RFR: 8265039: Adjust javadoc for ByteArray*Stream and InputStream

2021-04-12 Thread Yi Yang
On Mon, 5 Apr 2021 08:37:15 GMT, Сергей Цыпанов wrote: > Hello, > > to avoid cases detected in > [https://github.com/openjdk/jdk/pull/2992](https://github.com/openjdk/jdk/pull/2992) > I propose to modify JavaDoc of `ByteArray*Stream` to explicitly mention > redundancy of wrapping with

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Yi Yang
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversion in ObjectStreamClass

2021-03-13 Thread Yi Yang
On Sat, 13 Mar 2021 11:35:48 GMT, Сергей Цыпанов wrote: >> Nice cleanup. I can help file a JBS issue if @c-cleary doesn't notice your >> comment. > > @kelthuzadx hi! I'd appreciate this, as there's no JBS issue for this ( Hi @stsypanov, I've created it

Re: RFR: 8263552: Use String.valueOf() for char-to-String conversion in ObjectStreamClass

2021-03-13 Thread Yi Yang
On Mon, 22 Feb 2021 12:04:14 GMT, Conor Cleary wrote: >> This is a very simple and trivial improvement about getting rid of pointless >> char wrapping into array > > src/java.base/share/classes/java/io/ObjectStreamClass.java line 833: > >> 831: String fname = in.readUTF(); >> 832: