RFR: 8319324: FFM: Reformat javadocs

2023-11-05 Thread Per Minborg
This PR proposes to reformat all the JavaDocs for the FFM API. This would bring the FFM API docs more in line with the existing Java documentation (see below). Occasional drive-by fixes are also included in this PR (such as spelling and capitalization). I am aware this PR will (if approved) ma

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

2023-11-05 Thread Jan Lahoda
> 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 classes being compared. > Thanks for @liach for noting the solution

RFR: 8319463: ClassSignature should have superclass and superinterfaces as ClassTypeSig

2023-11-05 Thread Chen Liang
Discovered while writing a test for #16513 that `ClassSignature.superclassSignature()` does not return a `ClassTypeSig`, yet [JVM Spec](https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.7.9.1-4100) requires it to be one. This patch adds such a requirement to the accessors,

RFR: 8319462: Signature.ClassTypeSig::classDesc() incorrect for inner class types

2023-11-05 Thread Chen Liang
Observed this erroneous implementation while browsing, and included a quick test against javac output class file to confirm the correct implementation. @asotona Please take a look. - Commit messages: - 8319462: Signature.ClassTypeSig::classDesc() incorrect for inner class types Ch

Re: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 [v2]

2023-11-05 Thread Quan Anh Mai
On Fri, 3 Nov 2023 23:22:27 GMT, Claes Redestad wrote: >> https://github.com/cassioneri/eaf suggest this code for leap year >> calculation: >> >> public static boolean isLeap(long year) { >> int d = year % 100 != 0 ? 4 : 16; >> return (year & (d - 1)) == 0; >> } >> >> .

Re: RFR: 8180892: Correct handling of annotations on parameters [v2]

2023-11-05 Thread Chen Liang
On Sun, 8 Oct 2023 17:01:37 GMT, Joe Darcy wrote: >> @liach , thank you for working on this fix. I've given the changes an >> initial skim, but will need to do a more thorough review before approving or >> offering suggestions for changes. My top priority for the next few weeks >> will be JDK

Re: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 [v2]

2023-11-05 Thread Claes Redestad
On Fri, 3 Nov 2023 23:22:27 GMT, Claes Redestad wrote: >> https://github.com/cassioneri/eaf suggest this code for leap year >> calculation: >> >> public static boolean isLeap(long year) { >> int d = year % 100 != 0 ? 4 : 16; >> return (year & (d - 1)) == 0; >> } >> >> .

Re: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 [v2]

2023-11-05 Thread Cassio Neri
On Sun, 5 Nov 2023 22:14:50 GMT, Claes Redestad wrote: >> Thanks for your interest in my work. I'd love to assist porting our >> algorithms to Java. Notice, however, that I'm not a Java programmer and I >> don't have the complete picture of what goes on in the JVM. What follows is >> based on

Re: RFR: 8319423: Improve Year.isLeap by checking divisibility by 16 [v2]

2023-11-05 Thread Claes Redestad
On Sat, 4 Nov 2023 20:12:58 GMT, Cassio Neri wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Apply similar optimization to GregorianCalendar, sun.util.calendar > > Thanks for your interest in my work. I'd love to

Re: RFR: 8319378: Spec for j.util.Timer::purge and j.util.Timer::cancel could be improved

2023-11-05 Thread Jaikiran Pai
On Fri, 3 Nov 2023 20:40:11 GMT, Justin Lu wrote: > Please review this PR which clarifies the definition of a _cancelled_ task in > _j.util.Timer::purge_ and _j.util.Timer::cancel_. > > Timer::purge claims that its return value is the number of tasks in the queue > that were cancelled. This ca

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v3]

2023-11-05 Thread Jatin Bhateja
On Fri, 3 Nov 2023 00:22:55 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restricting masked sub-word gather to AVX512 target to align with integral >> gather support. > > src/hotspot/

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v3]

2023-11-05 Thread Jatin Bhateja
On Fri, 3 Nov 2023 23:20:49 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restricting masked sub-word gather to AVX512 target to align with integral >> gather support. > > src/hotspot/

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v3]

2023-11-05 Thread Jatin Bhateja
On Fri, 3 Nov 2023 20:00:30 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restricting masked sub-word gather to AVX512 target to align with integral >> gather support. > > src/hotspot/

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v4]

2023-11-05 Thread Jatin Bhateja
> Hi All, > > This patch optimizes sub-word gather operation for x86 targets with AVX2 and > AVX512 features. > > Following is the summary of changes:- > > 1) Intrinsify sub-word gather with high performance backend implementation > based on hybrid algorithm which initially partially unrolls s

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v3]

2023-11-05 Thread Jatin Bhateja
On Sun, 5 Nov 2023 12:58:33 GMT, Jatin Bhateja wrote: >> src/hotspot/cpu/x86/x86.ad line 4074: >> >>> 4072: BasicType elem_bt = Matcher::vector_element_basic_type(this); >>> 4073: assert(!is_subword_type(elem_bt), "sanity"); // T_INT, T_LONG, >>> T_FLOAT, T_DOUBLE >>> 4074: __ vpcmp

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v3]

2023-11-05 Thread Jatin Bhateja
On Fri, 3 Nov 2023 23:07:44 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restricting masked sub-word gather to AVX512 target to align with integral >> gather support. > > src/hotspot/