Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-02 Thread Jorn Vernee
On Wed, 2 Nov 2022 17:21:11 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/runtime/TemplateSu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-02 Thread Jorn Vernee
On Tue, 1 Nov 2022 00:09:21 GMT, David Schlosnagle wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/runtime/TemplateSupport.java line 201: > >>

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-02 Thread Jorn Vernee
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v3]

2022-10-26 Thread Jorn Vernee
On Wed, 26 Oct 2022 05:18:45 GMT, Ioi Lam wrote: >> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show >> how invokedynamic call sites are resolved. >> >> For example: >> >> >> public class StrConcat { >> static String hello = "Hello"; >> static String world

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 19:43:14 GMT, Jorn Vernee wrote: >> Is it possible to use filter/findfirst without using lambdas? I want to >> avoid recursion inside the tracing code. >> >> I am not sure about dumping the call stack. It seems an overkill and not >> use

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 19:37:06 GMT, Ioi Lam wrote: > Is it possible to use filter/findfirst without using lambdas? I want to avoid > recursion inside the tracing code. You could do this I believe (if I've eye-balled that correctly :)): Suggestion: String callerName = caller.getName();

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 17:34:15 GMT, Ioi Lam wrote: >> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show >> how invokedynamic call sites are resolved. >> >> For example: >> >> >> public class StrConcat { >> static String hello = "Hello"; >> static String world

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 18:54:19 GMT, Jorn Vernee wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @JornVernee comments > > src/java.base/share/classes/java/lang/invoke/MethodHandleNativ

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite

2022-10-25 Thread Jorn Vernee
On Mon, 24 Oct 2022 22:15:49 GMT, Ioi Lam wrote: > I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show > how invokedynamic call sites are resolved. > > For example: > > > public class StrConcat { > static String hello = "Hello"; > static String world =

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 12:50:05 GMT, Jorn Vernee wrote: >> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show >> how invokedynamic call sites are resolved. >> >> For example: >> >> >> public class StrConcat { >> sta

Re: RFR: 8295155: Incorrect javadoc of java.base module

2022-10-11 Thread Jorn Vernee
On Tue, 11 Oct 2022 15:48:56 GMT, Raffaello Giulietti wrote: > Simple doc correction. Marked as reviewed by jvernee (Reviewer). - PR: https://git.openjdk.org/jdk/pull/10658

Integrated: 8290059: Do not use std::thread in panama tests

2022-07-28 Thread Jorn Vernee
On Thu, 21 Jul 2022 18:48:14 GMT, Jorn Vernee wrote: > This patch removes the use of std::thread from the `java.lang.foreign` tests, > and switches to the OS specific thread APIs, in order to change things such > as the stack size on some platforms where this is required in the fu

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-28 Thread Jorn Vernee
On Fri, 22 Jul 2022 18:44:30 GMT, Thomas Stuefe wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > Hi @JornVernee, > > good job and thanks for doing it so quickly. Lo

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-27 Thread Jorn Vernee
On Wed, 27 Jul 2022 06:43:45 GMT, David Holmes wrote: > > Does run_in_new_thread seem good enough? > > No, sorry, the fact it both runs and joins is a critical aspect. `run_async` > in `CompleteableFuture` just does the "run in new thread" part, whereas the > `get()` on the returned

Re: RFR: 8290059: Do not use std::thread in panama tests [v5]

2022-07-27 Thread Jorn Vernee
by adding a small header-only library that exposes a function to > run code in freshly spawned threads (`run_async`). > > Testing: Running the affected tests on platforms that implement the linker. Jorn Vernee has updated the pull request incrementally with one additional com

Re: [jdk19] RFR: 8291006: java/foreign/TestUnsupportedPlatform fails after JDK-8290455

2022-07-26 Thread Jorn Vernee
On Tue, 26 Jul 2022 09:44:53 GMT, Maurizio Cimadamore wrote: > This patch removes java/foreign/TestUnsupportedPlatform, which has been > superseded by TestUnsupportedLinker, and is no longer required. > This old test relies on unspecified behavior and should be removed. Marked as reviewed by

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Fri, 22 Jul 2022 16:45:55 GMT, Jorn Vernee wrote: >> This patch removes the use of std::thread from the `java.lang.foreign` >> tests, and switches to the OS specific thread APIs, in order to change >> things such as the stack size on some platforms where this is required

Re: RFR: 8290059: Do not use std::thread in panama tests [v4]

2022-07-26 Thread Jorn Vernee
by adding a small header-only library that exposes a function to > run code in freshly spawned threads (`run_async`). > > Testing: Running the affected tests on platforms that implement the linker. Jorn Vernee has updated the pull request incrementally with one additional commit since t

Re: RFR: 8290059: Do not use std::thread in panama tests [v3]

2022-07-26 Thread Jorn Vernee
by adding a small header-only library that exposes a function to > run code in freshly spawned threads (`run_async`). > > Testing: Running the affected tests on platforms that implement the linker. Jorn Vernee has updated the pull request incrementally with one additional commit since t

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Tue, 26 Jul 2022 13:39:50 GMT, Jorn Vernee wrote: >> The intent was to exit the test with a non-zero exit code, in order to avoid >> any accidental false positives. >> >> I could return the error code from `GetLastError` and from the respective >> pthrea

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Tue, 26 Jul 2022 12:58:09 GMT, Jorn Vernee wrote: >> test/lib/native/testlib_threads.h line 50: >> >>> 48: static void fatal(const char* message) { >>> 49: perror(message); >>> 50: exit(-1); >> >> Won't work as intended for Windows

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Sat, 23 Jul 2022 05:58:42 GMT, David Holmes wrote: > `run_async` is an odd name for this, especially as the fact you create then > join mean it doesn't run asynchronously at all - it runs synchronously in > another thread. I took the name from the CompleteableFuture API [1], although in

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Fri, 22 Jul 2022 18:37:02 GMT, Thomas Stuefe wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > test/lib/native/testlib_threads.h line 61: > >> 59: helper->

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Fri, 22 Jul 2022 18:32:56 GMT, Thomas Stuefe wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > test/lib/native/testlib_threads.h line 50: > >> 48: static

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Jorn Vernee
On Fri, 22 Jul 2022 14:56:16 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > Looks good! @mcimadamore Thanks for the comments. I've cleaned up

Re: RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Jorn Vernee
On Fri, 22 Jul 2022 15:09:13 GMT, Christoph Langer wrote: >> This patch removes the use of std::thread from the `java.lang.foreign` >> tests, and switches to the OS specific thread APIs, in order to change >> things such as the stack size on some platforms where this is required in >> the

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Jorn Vernee
by adding a small header-only library that exposes a function to > run code in freshly spawned threads (`run_async`). > > Testing: Running the affected tests on platforms that implement the linker. Jorn Vernee has updated the pull request incrementally with one additional commit since

Re: [jdk19] RFR: 8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms

2022-07-21 Thread Jorn Vernee
On Thu, 21 Jul 2022 12:06:37 GMT, Maurizio Cimadamore wrote: > The javadoc for `Linker` states that some operations throw > `UnsupportedOperationException` when called on an unsupported platform. These > operations are: > > * `Linker::nativeLinker` > * `VaList::empty` > * `VaList::make` > *

Re: [jdk19] RFR: 8290524: Typo in javadoc of MemorySegment/MemoryAddress

2022-07-19 Thread Jorn Vernee
On Tue, 19 Jul 2022 11:07:27 GMT, Maurizio Cimadamore wrote: > This patch fixes several `toRowLongValue` instead of `toRawLongValue` > scattered in the javadoc for accessor methods in `MemorySegment` and > `MemoryAddress`. Marked as reviewed by jvernee (Reviewer). - PR:

Re: RFR: JDK-8290460: Alpine: disable some panama tests that rely on std::thread

2022-07-18 Thread Jorn Vernee
On Mon, 18 Jul 2022 14:21:19 GMT, Thomas Stuefe wrote: > Until [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059) is solved, > I'd like to disable > > - java/foreign/TestUpcallAsync.java > - java/foreign/enablenativeaccess/TestEnableNativeAccess.java > > on muslc to take load from our

[jdk19] Integrated: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-12 Thread Jorn Vernee
On Wed, 29 Jun 2022 13:40:01 GMT, Jorn Vernee wrote: > This patch changes all VaList implementations to throw > `NoSuchElementException` when out of bounds reads occur on a VaList that is > created using the Java builder API. The docs are updated accordingly. > > For VaLists t

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM [v4]

2022-07-11 Thread Jorn Vernee
their > bounds, so we can not throw exceptions in that case. > > Testing: `jdk_foreign` test suite on all platforms that implement VaList. Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - Merge bra

[jdk19] Integrated: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0

2022-07-08 Thread Jorn Vernee
On Mon, 4 Jul 2022 13:01:34 GMT, Jorn Vernee wrote: > This PR updates the spec and implementation to throw an > `IllegalArgumentException` when an attempt is made to convert a Java string > containing null characters to a C string. > > Testing: local run of the `jdk_fore

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v6]

2022-07-08 Thread Jorn Vernee
On Wed, 6 Jul 2022 21:50:36 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Turn non-closeable view back into

[jdk19] Integrated: 8289223: Canonicalize header ids in foreign API javadocs

2022-07-08 Thread Jorn Vernee
On Mon, 27 Jun 2022 16:44:17 GMT, Jorn Vernee wrote: > https://github.com/openjdk/jdk/pull/8817 added a button to copy a link to a > section of javadoc to the clipboard. For the copy button to appear, the > header needs to have an `id`. > > This cleanup PR canonicalizes

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Jorn Vernee
On Wed, 6 Jul 2022 17:05:51 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert implicit vs. heap session changes > > src/java.base/sh

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Jorn Vernee
On Fri, 17 Jun 2022 18:39:03 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Revert implicit vs. heap session

Re: [jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0

2022-07-07 Thread Jorn Vernee
On Mon, 4 Jul 2022 13:01:34 GMT, Jorn Vernee wrote: > This PR updates the spec and implementation to throw an > `IllegalArgumentException` when an attempt is made to convert a Java string > containing null characters to a C string. > > Testing: local run of the `jdk_foreign` te

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Jorn Vernee
On Fri, 17 Jun 2022 18:39:03 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Revert implicit vs. heap session

Re: [jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0 [v2]

2022-07-06 Thread Jorn Vernee
> This PR updates the spec and implementation to throw an > `IllegalArgumentException` when an attempt is made to convert a Java string > containing null characters to a C string. > > Testing: local run of the `jdk_foreign` test suite. Jorn Vernee has updated the pull reques

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-06 Thread Jorn Vernee
On Tue, 5 Jul 2022 11:13:15 GMT, Maurizio Cimadamore wrote: >> This patch changes all VaList implementations to throw >> `NoSuchElementException` when out of bounds reads occur on a VaList that is >> created using the Java builder API. The docs are updated accordingly. >> >> For VaLists that

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-06 Thread Jorn Vernee
On Tue, 5 Jul 2022 11:03:30 GMT, Maurizio Cimadamore wrote: >> This patch changes all VaList implementations to throw >> `NoSuchElementException` when out of bounds reads occur on a VaList that is >> created using the Java builder API. The docs are updated accordingly. >> >> For VaLists that

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-06 Thread Jorn Vernee
On Tue, 5 Jul 2022 15:07:32 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/foreign/VaList.java line 61: >> >>> 59: * Particularly, variable argument lists created using {@link >>> #make(Consumer, MemorySession)} are able to detect out-of-

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM [v3]

2022-07-05 Thread Jorn Vernee
their > bounds, so we can not throw exceptions in that case. > > Testing: `jdk_foreign` test suite on all platforms that implement VaList. Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision: hmtl -> html ---

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM [v2]

2022-07-05 Thread Jorn Vernee
their > bounds, so we can not throw exceptions in that case. > > Testing: `jdk_foreign` test suite on all platforms that implement VaList. Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision: Review comments -

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM [v2]

2022-07-05 Thread Jorn Vernee
On Tue, 5 Jul 2022 15:14:20 GMT, Jorn Vernee wrote: >> This seems a bit too much. >> >> The class javadoc further up already describes a va list as "a stateful >> cursor used to iterate over a set of arguments". If that description is >> in

[jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0

2022-07-04 Thread Jorn Vernee
This PR updates the spec and implementation to throw an `IllegalArgumentException` when an attempt is made to convert a Java string containing null characters to a C string. Testing: local run of the `jdk_foreign` test suite. - Commit messages: - Throw IAE when converting string

[jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM

2022-07-04 Thread Jorn Vernee
This patch changes all VaList implementations to throw `NoSuchElementException` when out of bounds reads occur on a VaList that is created using the Java builder API. The docs are updated accordingly. For VaLists that are created from native addresses, we don't know their bounds, so we can not

Re: [jdk19] RFR: 8289228: SegmentAllocator::allocateArray null handling is too lax [v2]

2022-06-27 Thread Jorn Vernee
On Mon, 27 Jun 2022 20:40:43 GMT, Maurizio Cimadamore wrote: >> Recent fix for JDK-8289188 relaxed behavior or >> `SegmentAllocator::allocateArray` too much w.r.t. nulls. This patch reverts >> null handling to what it used to be. > > Maurizio Cimadamore has updated the pull request

Re: [jdk19] RFR: 8289228: SegmentAllocator::allocateArray null handling is too lax

2022-06-27 Thread Jorn Vernee
On Mon, 27 Jun 2022 16:47:32 GMT, Maurizio Cimadamore wrote: > Recent fix for JDK-8289188 relaxed behavior or > `SegmentAllocator::allocateArray` too much w.r.t. nulls. This patch reverts > null handling to what it used to be. Should test/jdk/java/foreign/TestNulls.java also be reverted?

Re: [jdk19] RFR: 8289223: Canonicalize header ids in foreign API javadocs

2022-06-27 Thread Jorn Vernee
On Mon, 27 Jun 2022 16:57:10 GMT, Maurizio Cimadamore wrote: >> > href="https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/8817__;!!ACWV5N9M2RV99hQ!Ooc0KcgMe7NsDGNiGbF-wfC_tK6POSNyLNDIHsrms0gVVdXsgnVAAbWZpHXSYWbAAmkJrTeqEh4N1h-1f8ZwKplq$;>https://github.com/openjdk/jdk/pull/8817 >>

[jdk19] RFR: 8289223: Canonicalize header ids in foreign API javadocs

2022-06-27 Thread Jorn Vernee
https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/8817__;!!ACWV5N9M2RV99hQ!Kkp_j7PnK9AJEJUL817VN56eVeunFZsJPCPgXLt_Dgb1QE4PxZokFGCEF_Cf7KNASIrlkM5xZTNXSGd6ve264vZm$ added a button to copy a link to a section of javadoc to the clipboard. This cleanup PR canonicalizes all header ids

Re: RFR: 8278863: Add method ClassDesc::ofInternalName [v2]

2022-06-17 Thread Jorn Vernee
review. >> >> Thank you, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since the last revision: > > Update test/jdk/java/lang/constant/ClassDescTest.java > > Co-authored-by: Jorn Vernee Thanks for explaining. - Marked as reviewed by jvernee (Reviewer). PR: https://git.openjdk.org/jdk/pull/9201

Re: RFR: 8288667: Reduce runtime of java.text microbenchmarks

2022-06-17 Thread Jorn Vernee
On Fri, 17 Jun 2022 12:59:17 GMT, Claes Redestad wrote: > - Refactor micro using a range of parameters to a simpler benchmark that > tests different values in one pass > - Reduce iterations and their runtimes, but add forks (important to be able > to detect run-to-run variation anomalies) > >

Re: RFR: 8278863: Add method ClassDesc::ofInternalName

2022-06-17 Thread Jorn Vernee
On Fri, 17 Jun 2022 14:19:11 GMT, Adam Sotona wrote: > The symbolic constants API (`java.lang.constant`) was designed, in part, to > provide bytecode parsing and generation APIs with a validated, common, > symbolic form for constants in Java class files. > > There is an easy way to create a

Re: RFR: 8287809: Revisit implementation of memory session

2022-06-15 Thread Jorn Vernee
On Wed, 15 Jun 2022 18:06:44 GMT, Maurizio Cimadamore wrote: > This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 Already reviewed in the mainline repo. - Marked as reviewed by jvernee (Reviewer). PR: https://git.openjdk.org/jdk19/pull/22

<    4   5   6   7   8   9