Re: RFR: 8339735: Remove references to Applet in core-libs/security APIs

2024-09-17 Thread Alan Bateman
On Wed, 18 Sep 2024 06:25:57 GMT, Sean Coffey wrote: >> src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html >> line 74: >> >>> 72: volatile (or access to the variable must be >>> 73: synchronized). >>> 74: For example, suppose your application contains the following

Re: RFR: 8339735: Remove references to Applet in core-libs/security APIs

2024-09-17 Thread Alan Bateman
On Tue, 17 Sep 2024 23:14:16 GMT, Justin Lu wrote: > Please review this PR which removes occurrences of 'applet' within the > corelibs specification. Applet has been deprecated since JDK9, and may be a > confusing term for new Java developers, so it should be removed from the > documentation.

Re: RFR: 8337302: Undefined type variable results in null [v5]

2024-09-17 Thread duke
On Tue, 17 Sep 2024 15:23:41 GMT, Rafael Winterhalter wrote: >> When a type uses a type variable without a declaration, no exception is >> thrown. This change triggers a `TypeNotFoundException` to be thrown. > > Rafael Winterhalter has updated the pull request incrementally with one > addition

Re: RFR: 8339735: Remove references to Applet in core-libs/security APIs

2024-09-17 Thread Sean Coffey
On Tue, 17 Sep 2024 23:36:16 GMT, Naoto Sato wrote: >> Please review this PR which removes occurrences of 'applet' within the >> corelibs specification. Applet has been deprecated since JDK9, and may be a >> confusing term for new Java developers, so it should be removed from the >> documentat

Re: RFR: 8336895: BufferedReader doesn't read full \r\n line ending when it doesn't fit in buffer [v4]

2024-09-17 Thread Jaikiran Pai
On Wed, 28 Aug 2024 18:04:33 GMT, Brian Burkhalter wrote: >> Add some verbiage stating that two buffered readers or input streams should >> not be used to read from the same reader or input stream, respectively. > > Brian Burkhalter has updated the pull request incrementally with one > addition

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v3]

2024-09-17 Thread Chen Liang
On Wed, 18 Sep 2024 03:04:50 GMT, Ioi Lam wrote: >> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> The implementation of java.lang.invoke uses SoftReferences so that unused >> MethodHandles, LambdaForms, etc, can b

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v3]

2024-09-17 Thread David Holmes
On Wed, 18 Sep 2024 03:04:50 GMT, Ioi Lam wrote: >> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> The implementation of java.lang.invoke uses SoftReferences so that unused >> MethodHandles, LambdaForms, etc, can b

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v7]

2024-09-17 Thread Joe Darcy
On Wed, 18 Sep 2024 04:12:48 GMT, David Holmes wrote: > Great to see this further simplification. > > I agree no CSR request needed as all that happens is the error message > changes. > > Thanks I agree no CSR is needed. Having worked on the launcher many years back, including adding the ori

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v7]

2024-09-17 Thread David Holmes
On Tue, 17 Sep 2024 11:27:39 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to remove the >> (internal) `SelectVersion()` function from the java launcher and also update >> the code comments in the launcher to match the current implementation? >> >> As note

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v3]

2024-09-17 Thread Ioi Lam
> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > The implementation of java.lang.invoke uses SoftReferences so that unused > MethodHandles, LambdaForms, etc, can be garbage collected. > > However, if we want to store j

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v2]

2024-09-17 Thread Ioi Lam
> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > The implementation of java.lang.invoke uses SoftReferences so that unused > MethodHandles, LambdaForms, etc, can be garbage collected. > > However, if we want to store j

Re: RFR: 8328313: Archived module graph should allow identical --module-path to be specified during dump time and run time

2024-09-17 Thread David Holmes
On Tue, 17 Sep 2024 23:44:40 GMT, Calvin Cheung wrote: > Prior to this patch, if `--module-path` is specified in the command line: > during CDS dump time, full module graph will not be included in the CDS > archive; > during run time, full module graph will not be used. > > With this patch, the

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache

2024-09-17 Thread David Holmes
On Tue, 17 Sep 2024 23:48:11 GMT, Ioi Lam wrote: > This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > The implementation of java.lang.invoke uses SoftReferences so that unused > MethodHandles, LambdaForms, etc, can be gar

RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache

2024-09-17 Thread Ioi Lam
This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & Linking](https://bugs.openjdk.org/browse/JDK-8315737). The implementation of java.lang.invoke uses SoftReferences so that unused MethodHandles, LambdaForms, etc, can be garbage collected. However, if we want to store java.lang.invok

RFR: 8328313: Archived module graph should allow identical --module-path to be specified during dump time and run time

2024-09-17 Thread Calvin Cheung
Prior to this patch, if `--module-path` is specified in the command line: during CDS dump time, full module graph will not be included in the CDS archive; during run time, full module graph will not be used. With this patch, the full module graph will be included in the CDS archive with the `--mo

Re: RFR: 8339735: Remove references to Applet in core-libs/security APIs

2024-09-17 Thread Naoto Sato
On Tue, 17 Sep 2024 23:14:16 GMT, Justin Lu wrote: > Please review this PR which removes occurrences of 'applet' within the > corelibs specification. Applet has been deprecated since JDK9, and may be a > confusing term for new Java developers, so it should be removed from the > documentation.

RFR: 8339735: Remove references to Applet in core-libs/security APIs

2024-09-17 Thread Justin Lu
Please review this PR which removes occurrences of 'applet' within the corelibs specification. Applet has been deprecated since JDK9, and may be a confusing term for new Java developers, so it should be removed from the documentation. Primarily, usages where 'applet' is used interchangeably with

Re: Does API for transformation of class files in Class-FIle API solves the same problem as code generationg annotation processors?

2024-09-17 Thread Chen Liang
Hi Olex, ClassFile API provides a general-purpose API to interact with byte data for the class file format. It does not control, nor can it control, where the byte data comes from or where the byte data goes. So, the API doesn't know if you are upgrading old formats, such as migrating to value c

Re: Does API for transformation of class files in Class-FIle API solves the same problem as code generationg annotation processors?

2024-09-17 Thread Olexandr Rotan
Sorry for followup letter, just mentioned that I wrote that annotations CAN change the semantics, while I meant CANNOT. With this typo letter makes little to none sense, so correction is important On Tue, Sep 17, 2024, 22:51 Olexandr Rotan wrote: > When I said that bytecode modification is unsaf

Re: RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms [v3]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 22:40:34 GMT, Claes Redestad wrote: >> This PR exploits the observation that in many of the cases where we call >> `methodType.invokerType()` we immediately translate it into a `Name[]` where >> the only effect is to create an array with an additional leading >> `BasicType.

Re: RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms [v3]

2024-09-17 Thread Claes Redestad
> This PR exploits the observation that in many of the cases where we call > `methodType.invokerType()` we immediately translate it into a `Name[]` where > the only effect is to create an array with an additional leading > `BasicType.L_TYPE` argument. Only in a subset of cases will a correspondi

Re: RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms [v2]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 22:28:17 GMT, Claes Redestad wrote: >> This PR exploits the observation that in many of the cases where we call >> `methodType.invokerType()` we immediately translate it into a `Name[]` where >> the only effect is to create an array with an additional leading >> `BasicType.

Re: RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms [v2]

2024-09-17 Thread Claes Redestad
> This PR exploits the observation that in many of the cases where we call > `methodType.invokerType()` we immediately translate it into a `Name[]` where > the only effect is to create an array with an additional leading > `BasicType.L_TYPE` argument. Only in a subset of cases will a correspondi

Integrated: 8340132: Remove internal CpException for reading malformed utf8

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 03:24:08 GMT, Chen Liang wrote: > Remove an internal exception for invalid utf8 entry format; it should have > been an IllegalArgumentException but was an arbitrary subtype of > RuntimeException. Converted to throw ConstantPoolException, and consolidated > into a single met

Re: Does API for transformation of class files in Class-FIle API solves the same problem as code generationg annotation processors?

2024-09-17 Thread Olexandr Rotan
When I said that bytecode modification is unsafe, I was mainly regarding type safety. Compiler does a load of work to not let through invalid code, and processors that modify ast still have to pass symbol resolution checks, type checks and many other ones, while bytecode modification basically has

Re: Does API for transformation of class files in Class-FIle API solves the same problem as code generationg annotation processors?

2024-09-17 Thread Bernd
Hello,To me bytecode is a standardized interface and creating or modifying bytecode is legal and not inherently unsafe.If annotation processor authors want to use bytecode modifications they now get an additional tool for that but it doesn’t change the general usage.In the end us

Does API for transformation of class files in Class-FIle API solves the same problem as code generationg annotation processors?

2024-09-17 Thread Olexandr Rotan
Hello there. I am writing to address the overlap between class file transformation using the ClassFile API and the work done by code-generating annotation processors, and whether they ultimately solve the same problem. Annotations such as @Async and @Transactional in popular frameworks are good ex

Re: RFR: 8340200: Misspelled constant `AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES`

2024-09-17 Thread David M . Lloyd
On Tue, 17 Sep 2024 17:31:58 GMT, Alan Bateman wrote: > Looks like test/jdk/jdk/classfile/OptionsTest.java was missed. Ah. I did a code search in the IDE but I forgot that my import doesn't have complete test coverage; I should have grep'd to be sure. Sorry about that. - PR Commen

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-17 Thread Sandhya Viswanathan
On Tue, 17 Sep 2024 18:21:43 GMT, Paul Sandoz wrote: > > Adding link to UTF-8 decoding use case for convenience and reminder: > > https://github.com/AugustNagro/utf8.java/blob/master/src/main/java/com/augustnagro/utf8/Utf8.java. > > Another related link to base 64 decoding > https://github.com

Re: RFR: 8336895: BufferedReader doesn't read full \r\n line ending when it doesn't fit in buffer [v4]

2024-09-17 Thread Brian Burkhalter
On Wed, 28 Aug 2024 18:04:33 GMT, Brian Burkhalter wrote: >> Add some verbiage stating that two buffered readers or input streams should >> not be used to read from the same reader or input stream, respectively. > > Brian Burkhalter has updated the pull request incrementally with one > addition

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-09-17 Thread Dhamoder Nalla
On Wed, 11 Sep 2024 08:48:42 GMT, Kevin Walls wrote: > OK thanks, so the change only affects SYSTEM accounts, and such accounts > already see a different temp path to non-SYSTEM accounts. > > Newer and older Java versions run by a SYSTEM account will have different > temp paths, therefore the

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-17 Thread Paul Sandoz
On Thu, 22 Aug 2024 18:43:56 GMT, Paul Sandoz wrote: > Adding link to UTF-8 decoding use case for convenience and reminder: > https://github.com/AugustNagro/utf8.java/blob/master/src/main/java/com/augustnagro/utf8/Utf8.java. Another related link to base 64 decoding https://github.com/simdutf/Si

Integrated: 8340323: Test jdk/classfile/OptionsTest.java fails after JDK-8340200

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 17:51:19 GMT, Chen Liang wrote: > A rename to a typo in preview enum constants missed a usage in tier1 tests. > This fixes the typo. This pull request has now been integrated. Changeset: 5dc9723c Author:Chen Liang URL: https://git.openjdk.org/jdk/commit/5dc9723c

Re: RFR: 8340323: Test jdk/classfile/OptionsTest.java fails after JDK-8340200

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 17:51:19 GMT, Chen Liang wrote: > A rename to a typo in preview enum constants missed a usage in tier1 tests. > This fixes the typo. `open/test/jdk/:tier1_part3` confirmed passing, integrating. Thanks for the review! - PR Comment: https://git.openjdk.org/jdk/p

Re: RFR: 8340323: Test jdk/classfile/OptionsTest.java fails after JDK-8340200

2024-09-17 Thread Alan Bateman
On Tue, 17 Sep 2024 17:51:19 GMT, Chen Liang wrote: > A rename to a typo in preview enum constants missed a usage in tier1 tests. > This fixes the typo. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21044#pullrequestreview-2310484262

RFR: 8340323: Test jdk/classfile/OptionsTest.java fails after JDK-8340200

2024-09-17 Thread Chen Liang
A rename to a typo in preview enum constants missed a usage in tier1 tests. This fixes the typo. - Commit messages: - 8340323: Test jdk/classfile/OptionsTest.java fails after JDK-8340200 Changes: https://git.openjdk.org/jdk/pull/21044/files Webrev: https://webrevs.openjdk.org/?re

Re: RFR: 8340200: Misspelled constant `AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES`

2024-09-17 Thread Chen Liang
On Mon, 16 Sep 2024 12:56:14 GMT, David M. Lloyd wrote: > Please review this small change to fix a misspelling. The constant is not > used directly; rather it is used by ordinal, which explains why the error was > not found sooner. Created https://bugs.openjdk.org/browse/JDK-8340323 to fix thi

Re: RFR: 8340200: Misspelled constant `AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES`

2024-09-17 Thread Alan Bateman
On Mon, 16 Sep 2024 12:56:14 GMT, David M. Lloyd wrote: > Please review this small change to fix a misspelling. The constant is not > used directly; rather it is used by ordinal, which explains why the error was > not found sooner. Looks like test/jdk/jdk/classfile/OptionsTest.java was missed.

Integrated: 8339934: Simplify Math.scalb(double) method

2024-09-17 Thread Raffaello Giulietti
On Wed, 11 Sep 2024 12:45:50 GMT, Raffaello Giulietti wrote: > `Math.scalb(double)` can be simplified, removing a loop and using > larger/smaller factors. This pull request has now been integrated. Changeset: 28d009ce Author:Raffaello Giulietti URL: https://git.openjdk.org/jdk/com

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Paul Sandoz
On Tue, 17 Sep 2024 07:02:12 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template >> line 2974: >> >>> 2972: final $abstractvectortype$ selectFromTemplate(Class>> Vector<$Boxbitstype$>> indexVecClass, >>> 2973:

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Paul Sandoz
On Tue, 17 Sep 2024 07:02:15 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template >> line 561: >> >>> 559: for (int i = 0; i < vlen; i++) { >>> 560: int index = ((int)vecPayload1[i]); >>> 561: res[i] = in

Integrated: 8340200: Misspelled constant `AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES`

2024-09-17 Thread David M . Lloyd
On Mon, 16 Sep 2024 12:56:14 GMT, David M. Lloyd wrote: > Please review this small change to fix a misspelling. The constant is not > used directly; rather it is used by ordinal, which explains why the error was > not found sooner. This pull request has now been integrated. Changeset: 3e14fb9

Re: RFR: 8340200: Misspelled constant `AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES`

2024-09-17 Thread duke
On Mon, 16 Sep 2024 12:56:14 GMT, David M. Lloyd wrote: > Please review this small change to fix a misspelling. The constant is not > used directly; rather it is used by ordinal, which explains why the error was > not found sooner. @dmlloyd Your change (at version d74e7908602eb50c8a89ee5767aa

Integrated: 8339574: Behavior of File.is{Directory, File, Hidden} is not documented with respect to symlinks

2024-09-17 Thread Brian Burkhalter
On Thu, 5 Sep 2024 21:05:38 GMT, Brian Burkhalter wrote: > Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. This pull request has now been integrated. Changeset: 64e3a9ee Author:Brian Burkhalter URL:

Re: RFR: 8337302: Undefined type variable results in null [v5]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 15:23:41 GMT, Rafael Winterhalter wrote: >> When a type uses a type variable without a declaration, no exception is >> thrown. This change triggers a `TypeNotFoundException` to be thrown. > > Rafael Winterhalter has updated the pull request incrementally with one > addition

Re: RFR: 8337302: Undefined type variable results in null [v5]

2024-09-17 Thread Rafael Winterhalter
> When a type uses a type variable without a declaration, no exception is > thrown. This change triggers a `TypeNotFoundException` to be thrown. Rafael Winterhalter has updated the pull request incrementally with one additional commit since the last revision: 8337302: Add comment with class t

Re: RFR: 8337302: Undefined type variable results in null [v4]

2024-09-17 Thread Rafael Winterhalter
On Fri, 16 Aug 2024 04:46:13 GMT, Chen Liang wrote: >> test/jdk/java/lang/reflect/Generics/TestMissingTypeVariable.java line 43: >> >>> 41: public class TestMissingTypeVariable { >>> 42: >>> 43: public static void main(String[] args) throws Exception { >> >> To make the test more understan

Re: RFR: 8337302: Undefined type variable results in null [v4]

2024-09-17 Thread Rafael Winterhalter
On Tue, 17 Sep 2024 14:11:50 GMT, Chen Liang wrote: >> Rafael Winterhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8337302: Fix copyright years. > > @raphw Your patch is ready and you can integrate it with the `/integrate` > com

Re: RFR: 8337302: Undefined type variable results in null [v5]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 15:23:41 GMT, Rafael Winterhalter wrote: >> When a type uses a type variable without a declaration, no exception is >> thrown. This change triggers a `TypeNotFoundException` to be thrown. > > Rafael Winterhalter has updated the pull request incrementally with one > addition

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v3]

2024-09-17 Thread Claes Redestad
On Tue, 17 Sep 2024 02:04:51 GMT, Chen Liang wrote: >> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through >> `ClassDesc` comparison and reusing descriptor hash to calculate internal >> name hash if possible. No suitable device to run benchmarks so need to find >> something

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v4]

2024-09-17 Thread David M . Lloyd
On Tue, 17 Sep 2024 13:37:19 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update javadoc >> - Rename utility class > > I think a better approach to this problem might be converting these static

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v5]

2024-09-17 Thread Per Minborg
> This PR suggests introducing an internal class in `java.base` to simplify the > use of some `MethodHandles.Lookup` operations. > > While the utility of the methods might appear to be limited in classes with > many static `VarHandle`/`MethodHandle` variables, it should be noted that the > clas

Re: RFR: 8337302: Undefined type variable results in null [v4]

2024-09-17 Thread Chen Liang
On Tue, 13 Aug 2024 23:41:06 GMT, Rafael Winterhalter wrote: >> When a type uses a type variable without a declaration, no exception is >> thrown. This change triggers a `TypeNotFoundException` to be thrown. > > Rafael Winterhalter has updated the pull request incrementally with one > addition

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v4]

2024-09-17 Thread Roger Riggs
On Tue, 17 Sep 2024 13:05:24 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v3]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 02:04:51 GMT, Chen Liang wrote: >> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through >> `ClassDesc` comparison and reusing descriptor hash to calculate internal >> name hash if possible. No suitable device to run benchmarks so need to find >> something

Re: RFR: 8340200: Misspelled constant `AttributesProcessingOption.DROP_UNSTABLE_ATRIBUTES`

2024-09-17 Thread Chen Liang
On Mon, 16 Sep 2024 12:56:14 GMT, David M. Lloyd wrote: > Please review this small change to fix a misspelling. The constant is not > used directly; rather it is used by ordinal, which explains why the error was > not found sooner. This should be ready to integrate. Feel free to issue the inte

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v3]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 02:04:51 GMT, Chen Liang wrote: >> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through >> `ClassDesc` comparison and reusing descriptor hash to calculate internal >> name hash if possible. No suitable device to run benchmarks so need to find >> something

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v3]

2024-09-17 Thread Claes Redestad
On Tue, 17 Sep 2024 02:04:51 GMT, Chen Liang wrote: >> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through >> `ClassDesc` comparison and reusing descriptor hash to calculate internal >> name hash if possible. No suitable device to run benchmarks so need to find >> something

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v4]

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 13:05:24 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v2]

2024-09-17 Thread Eirik Bjørsnøs
On Tue, 17 Sep 2024 12:33:34 GMT, Alan Bateman wrote: > I think your proposal looks generally okay, not sure about naming it > "MethodHandlesInternal" with "internal" in the package name as it's more like > a class of utility methods. Perhaps `MethodHandlesSupport`, like `jdk.internal.util.Arr

Re: RFR: 8339704: Refactor StringConcatHelper simpleConcat [v6]

2024-09-17 Thread Shaojin Wen
On Tue, 10 Sep 2024 13:24:33 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line >> 529: >> >>> 527: mh = simpleConcat3(paramType0); >>> 528: mh = MethodHandles.insertArguments(mh, 0, prefix); >>> 529:

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v4]

2024-09-17 Thread Per Minborg
> This PR suggests introducing an internal class in `java.base` to simplify the > use of some `MethodHandles.Lookup` operations. > > While the utility of the methods might appear to be limited in classes with > many static `VarHandle`/`MethodHandle` variables, it should be noted that the > clas

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v3]

2024-09-17 Thread Per Minborg
On Mon, 16 Sep 2024 12:01:26 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v2]

2024-09-17 Thread Alan Bateman
On Tue, 17 Sep 2024 07:24:29 GMT, Per Minborg wrote: > If you wish to add public methods anyhow, I think we should consider this > under a separate issue. I think it's a request for 10+ find methods to sit along the existing methods so it might be confusing too. I think your proposal looks g

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v3]

2024-09-17 Thread Kasper Nielsen
On Tue, 17 Sep 2024 12:17:06 GMT, Chen Liang wrote: > I think the original poster means to find a VH in the lookup class. I actually meant what Per is hinting at. Defining static MethodHandle/VarHandle in a class at class initialization time, without the ceremony of handling ReflectiveOperatio

Re: RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms

2024-09-17 Thread Chen Liang
On Tue, 17 Sep 2024 09:28:02 GMT, Claes Redestad wrote: > This PR exploits the observation that in many of the cases where we call > `methodType.invokerType()` we immediately translate it into a `Name[]` where > the only effect is to create an array with an additional leading > `BasicType.L_TY

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v3]

2024-09-17 Thread Chen Liang
On Mon, 16 Sep 2024 12:01:26 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v6]

2024-09-17 Thread Jaikiran Pai
On Tue, 17 Sep 2024 11:09:03 GMT, Jaikiran Pai wrote: > Now that you mention it, one part of the changes in this PR, moves the checks > and error reporting for the -version:, -jre-restrict-search and > -jre-no-restrict-search options to the ParseArguments function. I think we > can just get ri

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v7]

2024-09-17 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to remove the > (internal) `SelectVersion()` function from the java launcher and also update > the code comments in the launcher to match the current implementation? > > As noted in https://bugs.openjdk.org/browse/JDK-8340114, the > `Sel

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v6]

2024-09-17 Thread Jaikiran Pai
On Tue, 17 Sep 2024 08:55:44 GMT, David Holmes wrote: > But I remain unclear as to why the new thread has to "start again" rather > than continuing with the launch process That's unclear to me as well. As a separate task, I do plan to look into the historical changes in this area to understand

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v6]

2024-09-17 Thread Jaikiran Pai
On Mon, 16 Sep 2024 13:55:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to remove the >> (internal) `SelectVersion()` function from the java launcher and also update >> the code comments in the launcher to match the current implementation? >> >> As note

Re: RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms

2024-09-17 Thread Jorn Vernee
On Tue, 17 Sep 2024 09:28:02 GMT, Claes Redestad wrote: > This PR exploits the observation that in many of the cases where we call > `methodType.invokerType()` we immediately translate it into a `Name[]` where > the only effect is to create an array with an additional leading > `BasicType.L_TY

RFR: 8340280: Avoid calling MT.invokerType() when creating LambdaForms

2024-09-17 Thread Claes Redestad
This PR exploits the observation that in many of the cases where we call `methodType.invokerType()` we immediately translate it into a `Name[]` where the only effect is to create an array with an additional leading `BasicType.L_TYPE` argument. Only in a subset of cases will a corresponding `inv

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v6]

2024-09-17 Thread David Holmes
On Mon, 16 Sep 2024 13:55:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to remove the >> (internal) `SelectVersion()` function from the java launcher and also update >> the code comments in the launcher to match the current implementation? >> >> As note

Re: RFR: 8340114: Remove outdated SelectVersion() function from the launcher and update the code comments explaining the code flow [v6]

2024-09-17 Thread David Holmes
On Mon, 16 Sep 2024 14:02:21 GMT, Jaikiran Pai wrote: >> In the context of the 2 platforms - macosx and unix, the recursive >> invocation still continues to happen. >> >> For macosx, the `CreateExecutionEnvironment` unconditionally, through an >> internal `MacOSXStartup` function, spawns a new

Re: RFR: 8286851: Deprecate for removal several of the undocumented java launcher options

2024-09-17 Thread Jaikiran Pai
On Tue, 17 Sep 2024 06:28:54 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to deprecate several > outdated and undocumented java launcher options? This addresses > https://bugs.openjdk.org/browse/JDK-8286851. > > Specifically, the non-standard launcher opti

Re: RFR: 8286851: Deprecate for removal several of the undocumented java launcher options

2024-09-17 Thread David Holmes
On Tue, 17 Sep 2024 06:28:54 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to deprecate several > outdated and undocumented java launcher options? This addresses > https://bugs.openjdk.org/browse/JDK-8286851. > > Specifically, the non-standard launcher opti

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v2]

2024-09-17 Thread Per Minborg
On Mon, 16 Sep 2024 10:19:26 GMT, Kasper Nielsen wrote: > This would actually be super useful in a public API. I use the same "trick" > in some of my projects. Not because I care too much about the classfile size. > But it is just a lot easier on the eye. While I understand it would be conveni

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v13]

2024-09-17 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > following new vector operators. > > > . SUADD : Saturating unsigned addition. > . SADD: Saturating signed addition. > . SUSUB : Saturating unsigned subtraction. > . SSUB:

Re: RFR: 8340132: Remove internal CpException for reading malformed utf8

2024-09-17 Thread Adam Sotona
On Tue, 17 Sep 2024 03:24:08 GMT, Chen Liang wrote: > Remove an internal exception for invalid utf8 entry format; it should have > been an IllegalArgumentException but was an arbitrary subtype of > RuntimeException. Converted to throw ConstantPoolException, and consolidated > into a single met

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 07:40:33 GMT, Emanuel Peter wrote: >> Patch includes tests for all the species (combination of vector type and >> sizes), each vector kernel is validated against equivalent scalar >> implementation, scenario which you are referring is implicitly handled >> though tests. > >

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-17 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:43:42 GMT, Emanuel Peter wrote: >> Original API did throw IndexOutOfBoundsException, but later on we have moved >> away from exception throwing semantics to wrapping semantics. >> Please find details at following comment >> https://github.com/openjdk/jdk/pull/20508#issueco

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 18:35:42 GMT, Paul Sandoz wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Disabling VectorLoadShuffle bypassing optimization to comply with >> rearrange semantics at IR level. > > src/jdk.incu

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 07:27:44 GMT, Emanuel Peter wrote: >> Please at least add a comment why you are not following my suggestion. I >> feel like the work I put in to review is not being respected when comments >> are just silently resolved without any action or comment. > > I really do think tha

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 07:45:51 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Disabling VectorLoadShuffle bypassing optimization to comply with >> rearrange semantics at IR level. > > src/hotspo

Re: RFR: 8338023: Support two vector selectFrom API [v11]

2024-09-17 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl