Re: RFR: 8331189: Implementation of Scoped Values (Third Preview)

2024-05-21 Thread ExE Boss
On Wed, 8 May 2024 09:40:38 GMT, Alan Bateman wrote: > JEP 481 proposes Scoped Values to continue to preview in JDK 23 with one > change. The type of the operation parameter of the callWhere method is > changed to a new functional interface to avoid having the API throw > Exception. With that

Re: RFR: 8307818: Convert Indify tool to Classfile API

2024-05-19 Thread ExE Boss
On Thu, 18 Apr 2024 13:53:34 GMT, Oussama Louati wrote: > An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process

Re: RFR: 8331879: Clean up non-standard use of /// comments in `java.base`

2024-05-17 Thread ExE Boss
On Tue, 7 May 2024 22:23:48 GMT, Jonathan Gibbons wrote: > With the advent of JEP 467, `///` comments may be treated as documentation > comments, and may be subject to the recently new `javac` warning about > "dangling doc comments" in unexpected places. > > In keeping with the policy to keep

Re: RFR: 8330465: Stable Values and Collections (Internal) [v10]

2024-05-16 Thread ExE Boss
On Thu, 16 May 2024 09:01:22 GMT, Per Minborg wrote: >> # Stable Values & Collections (Internal) >> >> ## Summary >> This PR proposes to introduce an internal _Stable Values & Collections_ API, >> which provides immutable value holders where elements are initialized _at >> most once_. Stable

Re: RFR: 8330465: Stable Values and Collections (Internal) [v5]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 16:10:06 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Switch to monomorphic StableValue and use lazy arrays > >

Re: RFR: 8330465: Stable Values and Collections (Internal) [v5]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 15:27:34 GMT, Per Minborg wrote: >> # Stable Values & Collections (Internal) >> >> ## Summary >> This PR proposes to introduce an internal _Stable Values & Collections_ API, >> which provides immutable value holders where elements are initialized _at >> most once_. Stable

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 10:43:52 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/lang/stable/TrustedFieldType.java >> line 14: >> >>> 12: * operations. >>> 13: */ >>> 14: public sealed interface TrustedFieldType >> >> Maybe export this interface to `jdk.unsupported`? > >>

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v12]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 10:55:31 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v10]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 07:20:37 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as

Re: RFR: 8330465: Stable Values and Collections (Internal) [v4]

2024-05-15 Thread ExE Boss
On Wed, 15 May 2024 07:48:42 GMT, Per Minborg wrote: >> # Stable Values & Collections (Internal) >> >> ## Summary >> This PR proposes to introduce an internal _Stable Values & Collections_ API, >> which provides immutable value holders where elements are initialized _at >> most once_. Stable

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v4]

2024-05-15 Thread ExE Boss
On Tue, 14 May 2024 18:10:28 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v3]

2024-05-14 Thread ExE Boss
On Tue, 14 May 2024 13:47:33 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8330465: Stable Values and Collections (Internal)

2024-05-14 Thread ExE Boss
On Tue, 16 Apr 2024 11:47:23 GMT, Per Minborg wrote: > # Stable Values & Collections (Internal) > > ## Summary > This PR proposes to introduce an internal _Stable Values & Collections_ API, > which provides immutable value holders where elements are initialized _at > most once_. Stable Values

Re: RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3]

2024-05-13 Thread ExE Boss
On Mon, 13 May 2024 11:47:38 GMT, Maurizio Cimadamore wrote: >> This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting >> the use of JNI in the following ways: >> >> * `System::load` and `System::loadLibrary` are now restricted methods >> * `Runtime::load` and

Re: RFR: 8331670: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal

2024-05-13 Thread ExE Boss
On Fri, 10 May 2024 13:24:53 GMT, Chen Liang wrote: >> This is the implementation changes for JEP 471. >> >> The methods in sun.misc.Unsafe for on-heap and off-heap access are >> deprecated for removal. This means a removal warning at compile time. No >> methods have been removed. A

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook

2024-05-11 Thread ExE Boss
On Fri, 10 May 2024 21:55:26 GMT, Naoto Sato wrote: > Making sure `restoreEcho` correctly reflects the state in the shutdown > thread, which differs from the application's thread that issues the > `readPassword()` method. src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v6]

2024-05-08 Thread ExE Boss
On Wed, 8 May 2024 20:17:18 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v5]

2024-05-08 Thread ExE Boss
On Wed, 8 May 2024 10:42:27 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v4]

2024-05-07 Thread ExE Boss
On Mon, 6 May 2024 15:18:17 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/lang/constant/ClassDesc.java line 222: >> >>> 220: } >>> 221: if (desc.length() == 1 && desc.charAt(0) == 'V') { >>> 222: throw new IllegalArgumentException(String.format("not

Re: RFR: 8329581: Java launcher no longer prints a stack trace [v8]

2024-05-06 Thread ExE Boss
On Mon, 6 May 2024 16:30:11 GMT, Sonia Zaldana Calles wrote: >> Hi folks, >> >> This PR aims to fix >> [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). >> >> I think the regression got introduced in >> [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). >> >> In the

Re: RFR: 8331320: ClassFile API OutOfMemoryError with certain class files

2024-04-30 Thread ExE Boss
On Tue, 30 Apr 2024 18:18:30 GMT, Paul Sandoz wrote: >> Class files with specifically corrupted tableswitch or lookupswitch >> instructions in the bytecode cause OutOfMemoryError while parsing with >> Class-File API. >> This patch performs additional checks to avoid OOME and adds relevant

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v4]

2024-04-29 Thread ExE Boss
On Thu, 18 Apr 2024 05:54:17 GMT, Adam Sotona wrote: >> Current implementation of `LambdaMetafactory` does not allow to use lambdas >> in hidden classes. Invocation throws `NoClassDefFoundError` instead. >> >> This patch includes lambda implementation in a hidden class under the >> special

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

2024-04-29 Thread ExE Boss
On Wed, 3 Apr 2024 07:13:13 GMT, Jan Lahoda wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java >> line 1415: >> >>> 1413: >>> canonicalConstructorTypes, >>> 1414:

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v2]

2024-04-27 Thread ExE Boss
On Fri, 26 Apr 2024 22:11:07 GMT, Chen Liang wrote: >> Do we need additional tests or are these modifications already covered by >> the existing tests? > > @minborg I have added a test as part of Collection mother-of-all-tests to > ensure spliterator and forEach yields in the same order as

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes [v2]

2024-04-26 Thread ExE Boss
On Fri, 26 Apr 2024 07:43:01 GMT, Adam Sotona wrote: >> ClassFile API dives into the nested constant pool entries without type >> restrictions, while parsing a class file. Validation of the entry is >> performed post-parsing. Specifically corrupted constant pool entry may cause >> infinite

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v12]

2024-04-23 Thread ExE Boss
On Tue, 23 Apr 2024 13:54:42 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >> `List` interface by providing a more

Re: RFR: 8330681: Explicit hashCode and equals for java.lang.runtime.SwitchBootstraps$TypePairs

2024-04-19 Thread ExE Boss
On Fri, 19 Apr 2024 13:23:53 GMT, Claes Redestad wrote: > We can reduce overhead of first use of a switch bootstrap by moving > `typePairToName` into `TypePairs` and by explicitly overriding `hashCode` and > `equals`. The first change avoids loading and initializing the `TypePairs` > class in

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread ExE Boss
On Fri, 5 Apr 2024 00:00:58 GMT, Evemose wrote: > **Subject** > Addition of Predicate-based `indexOf` and `lastIndexOf` methods to > `java.util.List` > > **Motivation** > The motivation behind this proposal is to enhance the functionality of the > `List` interface by providing a more flexible

Re: RFR: 8329596: Add test for virtual threads invoking synchronized native methods

2024-04-07 Thread ExE Boss
On Wed, 3 Apr 2024 10:52:10 GMT, Alan Bateman wrote: > This is a test-only addition to add a test for virtual threads invoking a > synchronized native method and invoking a native method that enter/exits a > monitor with JNI MonitorEnter/MonitorExit. The test has been in the loom repo > for

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v3]

2024-04-03 Thread ExE Boss
On Mon, 29 May 2023 07:25:26 GMT, Jan Lahoda wrote: >> The pattern matching switches are using a bootstrap method >> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. >> Basically, for a switch like: >> >> switch (obj) { >> case String s when s.isEmpty() -> {} >> case

Re: RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode [v2]

2024-04-03 Thread ExE Boss
s all the missing `@throws` Javadoc tags and fixes >> `NewPrimitiveArrayInstruction::of` factory method to perform the argument >> check. >> >> Please review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request incrementally with one ad

Re: RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode

2024-04-03 Thread ExE Boss
On Tue, 2 Apr 2024 09:37:52 GMT, Adam Sotona wrote: > `IllegalArgumentException` thrown by some static factory methods of the > following `java.lang.classfile.instruction` interfaces are not documented: > > - `ArrayLoadInstruction` > - `ArrayStoreInstruction` > - `BranchInstruction` > -

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

2024-04-02 Thread ExE Boss
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: 8329331: Intrinsify Unsafe::setMemory [v2]

2024-04-02 Thread ExE Boss
On Mon, 1 Apr 2024 21:30:19 GMT, Scott Gibbons wrote: >> This code makes an intrinsic stub for `Unsafe::setMemory`. See [this >> PR](https://github.com/openjdk/jdk/pull/16760) for discussion around this >> change. >> >> Overall, making this an intrinsic improves overall performance of >>

Re: RFR: JDK-8325255 jdk.internal.util.ReferencedKeySet::add using wrong test [v4]

2024-03-09 Thread ExE Boss
On Tue, 5 Mar 2024 20:23:56 GMT, Jim Laskey wrote: >> Currently, add is returning intern(e) == null which will always be false. >> The correct test is intern(e) == e , that is, true when element is newly >> added. > > Jim Laskey has updated the pull request incrementally with one additional >

Re: RFR: 8327425: String Template FMT Refactor use call direct instead of MethodHandler

2024-03-07 Thread ExE Boss
On Tue, 3 Oct 2023 06:19:11 GMT, Shaojin Wen wrote: > Currently FormatItem uses MethodHandler to handle latin1 and utf16, which is > not readable. This PR uses direct calls instead of MethodHandler. > > Please review and don't hesitate to critique my approach and patch. It’s `MethodHandle`,

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled

2024-03-04 Thread ExE Boss
On Mon, 4 Mar 2024 13:52:13 GMT, Jan Lahoda wrote: > Currently, JDK modules load by the bootstrap and platform ClassLoaders are > automatically granted the native access. I am working on an upgrade of JLine > inside the `jdk.internal.le` module, and I would like to replace the current >

Re: RFR: JDK-8325255 jdk.internal.util.ReferencedKeySet::add using wrong test [v3]

2024-02-11 Thread ExE Boss
On Tue, 6 Feb 2024 18:43:09 GMT, Jim Laskey wrote: >> Currently, add is returning intern(e) == null which will always be false. >> The correct test is intern(e) == e , that is, true when element is newly >> added. > > Jim Laskey has updated the pull request incrementally with one additional >

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v10]

2024-02-11 Thread ExE Boss
On Mon, 5 Feb 2024 16:59:51 GMT, Jim Laskey wrote: >> ok, `intern(e) == e` is sufficient. > > Created https://bugs.openjdk.org/browse/JDK-8325255 While `intern(e) == e` is (mostly) sufficient, it will return a false positive when `add(e)` is called and `e` is already present in the map, the 

Re: RFR: 8323746: Add PathElement hashCode and equals [v2]

2024-02-03 Thread ExE Boss
On Fri, 2 Feb 2024 07:41:16 GMT, Per Minborg wrote: >> This PR proposes to implement `hashCode()` and `equals()` methods for >> implementations of `PathElement`. >> >> In doing so, the previous `PathElementImpl` was removed and replaced in >> favor of distinct `record` implementations, each

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v10]

2024-02-02 Thread ExE Boss
On Mon, 31 Jul 2023 13:34:30 GMT, Jim Laskey wrote: >> java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent >> caching scheme for Carrier objects. The technique used is generally useful >> for a variety of caching schemes and is being moved to be shared in other >> parts

Re: RFR: 8325169: Reduce String::indexOf overheads

2024-02-02 Thread ExE Boss
On Fri, 2 Feb 2024 13:54:46 GMT, Claes Redestad wrote: > This patch streamlines and specializes various `String::indexOf` methods. > Mainly avoids the need for clamping and doing checks that are redundant in > almost all cases, moving the checks to the API boundary where they are > needed. >

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

2024-02-01 Thread ExE Boss
On Wed, 31 Jan 2024 10:03:23 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

Re: RFR: JDK-8263261 Extend String::translateEscapes to support unicode escapes [v13]

2024-01-29 Thread ExE Boss
On Fri, 26 Jan 2024 17:36:52 GMT, Jim Laskey wrote: >> Currently String::translateEscapes does not support unicode escapes, >> reported as a IllegalArgumentException("Invalid escape sequence: ..."). >> String::translateEscapes should translate unicode escape sequences to >> provide full

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]

2024-01-27 Thread ExE Boss
On Fri, 12 Jan 2024 14:35:01 GMT, Per Minborg wrote: >> This PR proposes to add a clarification that an `Arena` always returns >> zeroed-out segments for `Arena::allocate` methods. >> >> Note that other overloaded methods refer to the abstract `Arena::allocate` >> method via implementation

Re: RFR: 8322149: ConcurrentHashMap smarter presizing for copy constructor and putAll [v3]

2024-01-17 Thread ExE Boss
On Thu, 18 Jan 2024 05:32:26 GMT, jmehrens wrote: >> Joshua Cao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> putAll presize based on sum on both map sizes > > src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java

Re: RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type

2024-01-14 Thread ExE Boss
On Mon, 6 Nov 2023 07:30:41 GMT, Chen Liang wrote: > API changes as discussed on the mailing list: > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html > > Additional questions: > 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE`

Re: RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type

2024-01-14 Thread ExE Boss
On Mon, 6 Nov 2023 07:30:41 GMT, Chen Liang wrote: > API changes as discussed on the mailing list: > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html > > Additional questions: > 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE`

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v4]

2023-12-23 Thread ExE Boss
On Thu, 21 Dec 2023 12:49:02 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes. >> >> This patch converts it to use Classfile API. >> >> It is continuation of https://github.com/openjdk/jdk/pull/10991 >> >> Any comments and

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v5]

2023-12-23 Thread ExE Boss
On Sat, 23 Dec 2023 12:40:33 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minor StackCounter fix > > src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java > line 49: > >>

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v5]

2023-12-21 Thread ExE Boss
On Thu, 21 Dec 2023 18:30:40 GMT, Rob Spoor wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update src/java.base/share/classes/java/lang/runtime/ObjectMethods.java >> >>

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v4]

2023-12-21 Thread ExE Boss
On Thu, 21 Dec 2023 14:47:43 GMT, ExE Boss wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8322292: Tiny improvement > > src/java.base/share/classes/java/lang/runtime/ObjectMe

Re: RFR: 8322292: Rearrange comparison of fields in Record.equals() [v4]

2023-12-21 Thread ExE Boss
On Wed, 20 Dec 2023 10:11:58 GMT, Sergey Tsypanov wrote: >> Currently if we create a record it's fields are compared in their >> declaration order. This might be ineffective in cases when two objects have >> "heavy" fields equals to each other, but different "lightweight" fields >> (heavy and

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes

2023-12-16 Thread ExE Boss
On Fri, 15 Dec 2023 12:54:27 GMT, Adam Sotona wrote: > java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-16 Thread ExE Boss
On Fri, 15 Dec 2023 12:26:50 GMT, Adam Sotona wrote: >> java.base java.lang.invoke package heavily uses ASM to generate lambdas and >> method handles. >> >> This patch converts ASM calls to Classfile API. >> >> This PR is continuation of https://github.com/openjdk/jdk/pull/12945 >> >> Any

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

2023-12-15 Thread ExE Boss
On Fri, 15 Dec 2023 12:26:50 GMT, Adam Sotona wrote: >> java.base java.lang.invoke package heavily uses ASM to generate lambdas and >> method handles. >> >> This patch converts ASM calls to Classfile API. >> >> This PR is continuation of https://github.com/openjdk/jdk/pull/12945 >> >> Any

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles

2023-12-15 Thread ExE Boss
On Thu, 14 Dec 2023 12:39:52 GMT, Adam Sotona wrote: > java.base java.lang.invoke package heavily uses ASM to generate lambdas and > method handles. > > This patch converts ASM calls to Classfile API. > > This PR is continuation of https://github.com/openjdk/jdk/pull/12945 > > Any comments

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one

2023-12-08 Thread ExE Boss
On Wed, 6 Dec 2023 23:31:26 GMT, Roger Riggs wrote: > In the compact string implementation of non-latin1 (UTF16) strings the length > is constrained by VM implementation limit on the size a byte array that can > be allocated. To produce a useful exception the implementation checks the >

Re: RFR: 8321270: Virtual Thread.yield consumes parking permit

2023-12-05 Thread ExE Boss
On Mon, 4 Dec 2023 16:08:32 GMT, Alan Bateman wrote: > When a virtual thread continues after Thread.yield it currently consumes > thread's parking permit. This is an oversight, the parking permit should only > be consumed when continuing after park. > > The changes are straight-forward. The

Re: RFR: 8319761: Simplify fields of Array VarHandles

2023-11-08 Thread ExE Boss
On Sun, 24 Sep 2023 13:17:05 GMT, Chen Liang wrote: > 1. Primitive array VHs are now singletons and no longer need to record their > array base and offset in their object themselves. > 2. Moved Unsafe offset calculation to a utility method, like `index` in > VarHandleByteArrayView. Note that

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread ExE Boss
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461) These should probably use `{@snippet ...}`: src/java.base/share/classes/java/util/stream/Gatherer.java line 82: > 80: * } > 81: * gatherer.finisher().accept(state,

Re: RFR: 8187655: jdk.lambda.vm.InterfaceAccessFlagsTest.testPrivateMethodCall needs update after nestmates support [v2]

2023-11-07 Thread ExE Boss
On Tue, 7 Nov 2023 18:34:42 GMT, Mandy Chung wrote: >> `jdk.lambda.vm.InterfaceAccessFlagsTest` uses `ClassToInterfaceConverter` to >> mechanically convert a classfile for a Class into an in-memory class >> representation of an equivalent Interface. `testPrivateMethodCall` tests >> to

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs

2023-11-06 Thread ExE Boss
On Mon, 30 Oct 2023 18:34:44 GMT, Roger Riggs wrote: > Strings, after construction, are immutable but may be constructed from > mutable arrays of bytes, characters, or integers. > The string constructors should guard against the effects of mutating the > arrays during construction that might

Re: RFR: 8316493: Remove the caching fields in AbstractMap [v10]

2023-10-26 Thread ExE Boss
On Thu, 19 Oct 2023 13:36:01 GMT, Per Minborg wrote: >> This PR outlines a solution for making immutable maps `@ValueBased` by >> removing cacheing of certain values in `AbstractMap`. >> >> By removing these caching fields in `AbstractMap`, we can make the immutable >> maps `@ValueBased` and

Re: RFR: 8317993: Add capturing factories to classes in java.util.function package

2023-10-17 Thread ExE Boss
On Tue, 17 Oct 2023 08:05:09 GMT, Per Minborg wrote: > This PR proposes to add a number of "capturing factories" in classes in the > `java.util.function` package. > > The PR additionally (an optionally) proposes to add a new function > `UnaryOperator::andThenUnary` to allow composition while

Re: RFR: 8316150: Refactor get chars and string size

2023-10-16 Thread ExE Boss
On Wed, 13 Sep 2023 01:24:05 GMT, Shaojin Wen wrote: > 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method The `throws Throwable` declarations are no 

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

2023-10-03 Thread ExE Boss
On Tue, 3 Oct 2023 14:11:08 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: 8312522: Implementation of Foreign Function & Memory API [v32]

2023-09-30 Thread ExE Boss
On Thu, 28 Sep 2023 13:33:32 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8316150: Refactor get chars and string size [v15]

2023-09-23 Thread ExE Boss
On Sat, 23 Sep 2023 17:44:51 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request

Re: RFR: 8316150: Refactor get chars and string size [v6]

2023-09-22 Thread ExE Boss
On Fri, 22 Sep 2023 07:19:27 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float)

2023-09-21 Thread ExE Boss
On Thu, 21 Sep 2023 12:51:56 GMT, Raffaello Giulietti wrote: > By correctly sizing an intermediate `byte[]` and making use of the internal > `newStringNoRepl()` method, one allocation per conversion can be avoided when > the runtime uses compact strings. These constant names should be in 

Re: RFR: 8316493: Make immutable maps @ValueBased

2023-09-19 Thread ExE Boss
On Thu, 7 Sep 2023 11:13:44 GMT, Per Minborg wrote: > This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the

Re: RFR: 8268829: Provide an optimized way to walk the stack with Class object only [v12]

2023-09-17 Thread ExE Boss
On Thu, 7 Sep 2023 19:27:14 GMT, Mandy Chung wrote: >> 8268829: Provide an optimized way to walk the stack with Class object only >> >> `StackWalker::walk` creates one `StackFrame` per frame and the current >> implementation >> allocates one `StackFrameInfo` and one `MemberName` objects per

Re: RFR: 8316235: Optimization for DateTimeFormatter::format

2023-09-13 Thread ExE Boss
On Wed, 13 Sep 2023 14:56:15 GMT, 温绍锦 wrote: > In many scenarios, DateTimeFormatter::format is a slower operation. > > For example, the following business scenarios > 1. The json library > gson/jackson/[fastjson2](https://github.com/alibaba/fastjson2) formats >

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v21]

2023-09-13 Thread ExE Boss
ng >> linux-x86 as a test bed. >> 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API >> required. The `Linker::nativeLinker` method is not longer allowed to throw >> an `UnsupportedO... > > Jorn Vernee has updated the pull request incrementally wit

Re: RFR: 8315999: Improve Date toString performance [v9]

2023-09-12 Thread ExE Boss
On Tue, 12 Sep 2023 17:23:00 GMT, 温绍锦 wrote: >> improve date toString performance, includes: >> >> java.util.Date.toString >> java.util.Date.toGMTString >> java.time.Instant.toString >> java.time.LocalDate.toString >> java.time.LocalDateTime.toString >> java.time.LocalTime.toString > > 温绍锦 has

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v20]

2023-09-11 Thread ExE Boss
On Mon, 11 Sep 2023 15:37:11 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8311207: Cleanup for Optimization for UUID.toString [v14]

2023-09-08 Thread ExE Boss
On Fri, 8 Sep 2023 20:36:31 GMT, 温绍锦 wrote: >> [PR 14578 ](https://github.com/openjdk/jdk/pull/14578) still has unresolved >> discussions, continue to make improvements. >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v16]

2023-09-08 Thread ExE Boss
On Thu, 7 Sep 2023 13:07:50 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles

2023-09-06 Thread ExE Boss
On Wed, 6 Sep 2023 19:47:19 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 3534: >> >>> 3532: * This method is only used to implement the unsupported >>> 3533: * >>> sun.reflect.ReflectionFactory::newConstructorForSerialization

Re: RFR: 8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles

2023-09-06 Thread ExE Boss
On Wed, 6 Sep 2023 18:34:29 GMT, Mandy Chung wrote: > This reimplements > `sun.reflect.ReflectionFactory::newConstructorForSerialization` with method > handles. > > This API currently generates the bytecode which fails the verification > because `new C; invokespecial A()` where the given

Re: RFR: 8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles

2023-09-06 Thread ExE Boss
On Wed, 6 Sep 2023 18:34:29 GMT, Mandy Chung wrote: > This reimplements > `sun.reflect.ReflectionFactory::newConstructorForSerialization` with method > handles. > > This API currently generates the bytecode which fails the verification > because `new C; invokespecial A()` where the given

Re: RFR: 8313452: Improve Classfile API attributes handling safety [v2]

2023-09-06 Thread ExE Boss
On Wed, 6 Sep 2023 12:28:05 GMT, Adam Sotona wrote: >> This PR improved Classfile API attributes handling safety by introduction of >> attribute stability indicator >> and by extension of UnknownAttributesOption to more general >> AttributesProcessingOption. > > Adam Sotona has updated the

Re: RFR: 8315678: Classfile API ConstantPool::entryCount and ConstantPool::entryByIndex methods are confusing [v2]

2023-09-06 Thread ExE Boss
On Tue, 5 Sep 2023 15:25:04 GMT, Adam Sotona wrote: >> Classfile API `ConstantPool::entryCount` and `ConstantPool::entryByIndex` >> methods are confusing and unsafe to use without knowledge of constant pool >> specification. >> This patch renames `ConstantPool::entryCount` to

Re: RFR: 8314260: Unable to load system libraries on Windows when using a SecurityManager [v2]

2023-09-05 Thread ExE Boss
On Tue, 5 Sep 2023 09:38:17 GMT, Per Minborg wrote: >> This PR proposes to read the system environment variable "SystemRoot" using >> a privileged operation so it will work in the event a default >> SecurityManager is in place. >> >> As the `SecurityManager` is deprecated for removal, no

Re: RFR: 8313961: Enhance identification of special serialization methods [v2]

2023-08-21 Thread ExE Boss
On Mon, 21 Aug 2023 16:04:49 GMT, Raffaello Giulietti wrote: >> This improves the identification of the serialization magic fields and >> methods. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Removed a

Re: RFR: 8312522: Implementation of Foreign Function & Memory API

2023-08-01 Thread ExE Boss
On Tue, 1 Aug 2023 10:29:06 GMT, Jorn Vernee wrote: > This patch contains the implementation of the foreign linker & memory API JEP > for Java 22. The initial patch is composed of commits brought over directly > from the [panama-foreign repo](https://github.com/openjdk/panama-foreign). > The

Re: RFR: 8311500: StackWalker.getCallerClass() throws UOE if invoked reflectively [v3]

2023-07-14 Thread ExE Boss
On Tue, 11 Jul 2023 15:47:35 GMT, Volker Simonis wrote: >> As the included jtreg test demonstrates, `StackWalker.getCallerClass()` can >> throw an `UnsupportedOperationException` if called reflectively. Currently >> this only happens if we invoke `StackWalker.getCallerClass()` recursively >>

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v22]

2023-07-11 Thread ExE Boss
On Fri, 7 Jul 2023 17:15:38 GMT, Mandy Chung wrote: >> Chen Liang 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 of the PR. The pull request contains one >> new commit

Re: RFR: 8311207: Cleanup for Optimization for UUID.toString [v6]

2023-07-09 Thread ExE Boss
On Fri, 7 Jul 2023 23:42:51 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/util/UUID.java line 475: >> >>> 473: long msb = mostSigBits; >>> 474: byte[] buf = new byte[36]; >>> 475: UNSAFE.putLongUnaligned( >> >> I understood that since UUID was not used during

Re: RFR: 8311207: Optimization for j.u.UUID.toString [v3]

2023-07-01 Thread ExE Boss
On Sat, 1 Jul 2023 03:22:06 GMT, 温绍锦 wrote: >> [PR 14578 ](https://github.com/openjdk/jdk/pull/14578) still has unresolved >> discussions, continue to make improvements. >> >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v22]

2023-06-25 Thread ExE Boss
On Sun, 25 Jun 2023 12:20:17 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v21]

2023-06-24 Thread ExE Boss
On Fri, 23 Jun 2023 23:25:25 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/lang/Long.java line 493: >> >>> 491: | H256[((int) lsb) & 0xff]); >>> 492: >>> 493: return new String(buf, LATIN1); >> >> Note that this isn’t correct when `COMPACT_STRINGS` is 

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v21]

2023-06-23 Thread ExE Boss
On Fri, 23 Jun 2023 11:24:23 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v14]

2023-06-22 Thread ExE Boss
On Thu, 22 Jun 2023 11:07:09 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

Re: RFR: 8310502 : optimization for UUID#toString [v4]

2023-06-21 Thread ExE Boss
On Wed, 21 Jun 2023 14:53:22 GMT, Roger Riggs wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> add annotation Stable > > src/java.base/share/classes/java/lang/Long.java line 563: > >> 561:

Re: RFR: 8310242: Clarify the name parameter to Class::forName [v4]

2023-06-18 Thread ExE Boss
On Sun, 18 Jun 2023 18:56:39 GMT, Jens Lidestrom wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> missing 'L' for the array class name > > src/java.base/share/classes/java/lang/Class.java line 427: > >> 425: *

Re: RFR: 8309838: Classfile API Util.toBinaryName and other cleanup

2023-06-12 Thread ExE Boss
On Mon, 12 Jun 2023 09:45:18 GMT, Chen Liang wrote: > Thanks to @exe-boss for the reviews in #13082. This cleanup patch fixed the > typos you pointed out and removed other redundancies in classfile Util as > well. src/java.base/share/classes/jdk/internal/classfile/impl/Util.jav

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v9]

2023-06-11 Thread ExE Boss
On Wed, 7 Jun 2023 14:15:10 GMT, Chen Liang wrote: >> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with >> proper privileges, with tests. >> >> This addition is useful in case classes at runtime are not loaded from the >> system class loader, such as Proxy. This is

Re: RFR: 8305104: Remove the old core reflection implementation [v3]

2023-06-11 Thread ExE Boss
On Thu, 8 Jun 2023 16:46:55 GMT, Mandy Chung wrote: >> JEP 416 integrated in JDK 18 and since then, only a couple minor issues has >> been reported. Those issues were related with exception being thrown with >> invalid arguments. We propose to remove the old core reflection >>

  1   2   3   >