Integrated: 8333086: Using Console.println is unnecessarily slow due to JLine initalization

2024-06-05 Thread Jan Lahoda
On Thu, 30 May 2024 13:50:33 GMT, Jan Lahoda wrote: > Consider these two programs: > > > public class SystemPrint { > public static void main(String... args) { > System.err.println("Hello!"); > } > } > > and: > > public class

Re: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization [v3]

2024-06-05 Thread Jan Lahoda
/ IOPrint > Hello! > > real0m0,051s > user0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding > JLine i

Re: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization [v2]

2024-06-05 Thread Jan Lahoda
/ IOPrint > Hello! > > real0m0,051s > user0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding > JLin

Re: RFR: 8330182: Start of release updates for JDK 24 [v9]

2024-05-30 Thread Jan Lahoda
On Thu, 30 May 2024 18:39:19 GMT, Chen Liang wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update symbol files for JDK 23 build 25. > > src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-N.sym.txt line 1: >

RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization

2024-05-30 Thread Jan Lahoda
Consider these two programs: public class SystemPrint { public static void main(String... args) { System.err.println("Hello!"); } } and: public class IOPrint { public static void main(String... args) { java.io.IO.println("Hello!"); } } They do the same

Re: RFR: 8333103: Re-examine the console provider loading

2024-05-30 Thread Jan Lahoda
On Wed, 29 May 2024 19:51:36 GMT, Naoto Sato wrote: > There is an initialization code in `Console` class that searches for the > Console implementations. Refactoring the init code not to use lambda/stream > would reduce the (initial) number of loaded classes by about 100 for > java.base

Re: RFR: 8332597: Remove redundant methods from j.l.classfile.ClassReader API [v2]

2024-05-28 Thread Jan Lahoda
On Fri, 24 May 2024 16:41:33 GMT, Adam Sotona wrote: >> j.l.classfile.ClassReader instance is exposed in the Class-File API through >> j.l.classfile.AttributeMapper::readAttribute method only. >> ClassReader only purpose is to serve as a tool for reading content of a >> custom attribute in a

Re: RFR: 8332505: JEP 457: ClassRemapper forgets to remap bootstrap method references

2024-05-28 Thread Jan Lahoda
On Mon, 20 May 2024 08:03:28 GMT, Adam Sotona wrote: > Class-File API `ClassRemapper` component suppose to remap all classes > referenced in a class file. > Actual implementation missed remapping of bootstrap methods referenced from > `invokedynamic` instructions. > This patch fixes the

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v7]

2024-05-24 Thread Jan Lahoda
On Wed, 22 May 2024 13:58:21 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest

Re: RFR: 8305457: Implement java.io.IO [v14]

2024-05-24 Thread Jan Lahoda
On Fri, 24 May 2024 11:30:19 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git

Re: RFR: 8305457: Implement java.io.IO [v13]

2024-05-24 Thread Jan Lahoda
On Thu, 23 May 2024 17:14:19 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git

Re: RFR: 8332528: Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations [v4]

2024-05-23 Thread Jan Lahoda
On Thu, 23 May 2024 11:09:14 GMT, Claes Redestad wrote: >> We can fold the call to `Objects.checkIndex` into the code generated in >> generateTypeSwitchSkeleton instead of doing so by filtering the MH argument. >> This loads 9 less classes (of which 8 generated LFs and Species classes) on >>

Re: RFR: 8332528: Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations [v3]

2024-05-23 Thread Jan Lahoda
On Tue, 21 May 2024 09:01:32 GMT, Claes Redestad wrote: >> We can fold the call to `Objects.checkIndex` into the code generated in >> generateTypeSwitchSkeleton instead of doing so by filtering the MH argument. >> This loads 9 less classes (of which 8 generated LFs and Species classes) on >>

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v5]

2024-05-17 Thread Jan Lahoda
On Sun, 5 May 2024 15:22:15 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest

Re: RFR: 8330276: Console methods with explicit Locale [v7]

2024-05-15 Thread Jan Lahoda
On Wed, 15 May 2024 17:05:17 GMT, Naoto Sato wrote: >> Proposing new overloaded methods in `java.io.Console` class that explicitly >> take a `Locale` argument. Existing methods rely on the default locale, so >> the users won't be able to format their prompts/outputs in a certain locale >>

Integrated: 8331535: Incorrect prompt for Console.readLine

2024-05-13 Thread Jan Lahoda
On Fri, 3 May 2024 10:11:02 GMT, Jan Lahoda wrote: > When JLine reads a line, there may be a prompt provided. However, JLine will > not interpret the prompt literally, it will handle `%` specially. As a > consequence, doing: > > System.console().readLine("%%s"); &

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v6]

2024-05-10 Thread Jan Lahoda
ormat` is used, which will convert > `%%s` to `%s`, and then JLine will interpret the `%`. The proposed solution > is to duplicate the `%`, so that JLine will print it. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Update test/jd

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v5]

2024-05-10 Thread Jan Lahoda
ormat` is used, which will convert > `%%s` to `%s`, and then JLine will interpret the `%`. The proposed solution > is to duplicate the `%`, so that JLine will print it. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Fixing

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v4]

2024-05-07 Thread Jan Lahoda
ormat` is used, which will convert > `%%s` to `%s`, and then JLine will interpret the `%`. The proposed solution > is to duplicate the `%`, so that JLine will print it. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Adding anoth

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v3]

2024-05-06 Thread Jan Lahoda
ormat` is used, which will convert > `%%s` to `%s`, and then JLine will interpret the `%`. The proposed solution > is to duplicate the `%`, so that JLine will print it. Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now co

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v2]

2024-05-06 Thread Jan Lahoda
On Fri, 3 May 2024 21:59:40 GMT, Pavel Rappo wrote: >>> Ideally, we should have separate tests that make sure that jdk.internal.le >>> is the default impl. >> >> We have a test that checks if `System.console()` returns the correct Console >> (or null) from the expected module >>

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v2]

2024-05-06 Thread Jan Lahoda
On Fri, 3 May 2024 11:20:52 GMT, Pavel Rappo wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. > > src/jdk.internal.le/share/

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v4]

2024-05-06 Thread Jan Lahoda
On Wed, 17 Apr 2024 09:20:24 GMT, Jan Lahoda wrote: >> Consider code like: >> >> public class MainClass { >> public MainClass() { >> System.out.println("Constructor called!"); >> } >> public static void

Withdrawn: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static

2024-05-06 Thread Jan Lahoda
On Fri, 12 Apr 2024 10:16:36 GMT, Jan Lahoda wrote: > Consider code like: > > public class MainClass { > public MainClass() { > System.out.println("Constructor called!"); > } > public static void main() { >

Integrated: 8331708: jdk/internal/jline/RedirectedStdOut.java times-out on macosx-aarch64

2024-05-06 Thread Jan Lahoda
On Mon, 6 May 2024 08:28:50 GMT, Jan Lahoda wrote: > When integrating: > https://github.com/openjdk/jdk/pull/18996 > > I've forgot to push one last commit which was stabilizing the test of Mac > OS/X. I am sorry for that. > > The test will create a pseudo terminal, a

RFR: 8331708: jdk/internal/jline/RedirectedStdOut.java times-out on macosx-aarch64

2024-05-06 Thread Jan Lahoda
When integrating: https://github.com/openjdk/jdk/pull/18996 I've forgot to push one last commit which was stabilizing the test of Mac OS/X. I am sorry for that. The test will create a pseudo terminal, and change the current process stdin/stdout to write into the pty. But, there's nothing

Re: RFR: 8331535: Incorrect prompt for Console.readLine [v2]

2024-05-06 Thread Jan Lahoda
ormat` is used, which will convert > `%%s` to `%s`, and then JLine will interpret the `%`. The proposed solution > is to duplicate the `%`, so that JLine will print it. Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webre

Integrated: 8330998: System.console() writes to stderr when stdout is redirected

2024-05-06 Thread Jan Lahoda
On Mon, 29 Apr 2024 11:44:50 GMT, Jan Lahoda wrote: > Consider code like: > > public class ConsoleTest { > public static void main(String... args) { > System.console().printf("Hello!"); > } > } > > > When run as: > > $ java Consol

Integrated: 8328481: Implement JEP 476: Module Import Declarations (Preview)

2024-05-05 Thread Jan Lahoda
On Thu, 4 Apr 2024 07:30:34 GMT, Jan Lahoda wrote: > This is an implementation of JEP JDK-8315129: Module Import Declarations > (Preview). Please see the JEP for details: > https://bugs.openjdk.org/browse/JDK-8315129 > > It is mostly straightforward - the module imp

RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Jan Lahoda
When JLine reads a line, there may be a prompt provided. However, JLine will not interpret the prompt literally, it will handle `%` specially. As a consequence, doing: System.console().readLine("%%s"); will not print `%s`, as first `String.format` is used, which will convert `%%s` to `%s`,

Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-03 Thread Jan Lahoda
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Looks good to me, thanks! - Marked as reviewed by jlahoda (Reviewer). PR Review:

Re: RFR: 8330998: System.console() writes to stderr when stdout is redirected [v2]

2024-05-01 Thread Jan Lahoda
On Mon, 29 Apr 2024 18:41:44 GMT, Naoto Sato wrote: > Looks good to me. Left some minor suggestions. BTW, should we file an issue > at the `JLine` project, not to redirect to stderr, or suggest a new config > (sorry if it has already been taken care of)? The code to choose the output stream

Re: RFR: 8328481: Implement Module Imports [v13]

2024-05-01 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8330998: System.console() writes to stderr when stdout is redirected [v3]

2024-04-30 Thread Jan Lahoda
a pty and to attach to it, and should run in a separate VM, as it leaves the > VM attached to the terminal. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Adjusting test, as suggested. - Changes: - all: https://git.o

Re: RFR: 8330998: System.console() writes to stderr when stdout is redirected [v2]

2024-04-30 Thread Jan Lahoda
On Mon, 29 Apr 2024 20:21:23 GMT, Archie Cobbs wrote: > > Of course the question is if it should write to stderr or /dev/tty like > > mechanism.. > > I was wondering the same thing. My understanding of the definition of > "console" is a bidirectional byte channel with a keyboard & screen on

Re: RFR: 8330998: System.console() writes to stderr when stdout is redirected [v2]

2024-04-29 Thread Jan Lahoda
a pty and to attach to it, and should run in a separate VM, as it leaves the > VM attached to the terminal. Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The p

Re: RFR: 8320575: generic type information lost on mandated parameters of record's compact constructors [v17]

2024-04-29 Thread Jan Lahoda
On Fri, 26 Apr 2024 23:54:17 GMT, Vicente Romero wrote: >> Reflection is not retrieving generic type information for mandated >> parameters. This is a known issue which has been explicitly stated in the >> API of some reflection methods. Fix for >>

RFR: 8330998: System.console() writes to stderr when stdout is redirected

2024-04-29 Thread Jan Lahoda
Consider code like: public class ConsoleTest { public static void main(String... args) { System.console().printf("Hello!"); } } When run as: $ java ConsoleTest.java >/dev/null it prints `Hello!` to stderr, instead of to stdout (where it would be redirected). The proposed

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

2024-04-29 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request with a new target base due to a merge or

Re: RFR: 8328481: Implement Module Imports [v12]

2024-04-23 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

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

2024-04-19 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request with a new target base due to a merge or

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

2024-04-19 Thread Jan Lahoda
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: 8328481: Implement Module Imports [v11]

2024-04-19 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v10]

2024-04-18 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v9]

2024-04-18 Thread Jan Lahoda
On Thu, 18 Apr 2024 10:47:11 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updating JEP number and caption. > > src/jdk.compiler/share/classes

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

2024-04-18 Thread Jan Lahoda
On Mon, 15 Apr 2024 18:25:02 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 issue

Re: RFR: 8328481: Implement Module Imports [v8]

2024-04-18 Thread Jan Lahoda
On Thu, 18 Apr 2024 05:43:03 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing ListModuleDeps test. > > src/java.base/share/classes/jdk/internal/javac/Preview

Re: RFR: 8328481: Implement Module Imports [v9]

2024-04-18 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v8]

2024-04-17 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v7]

2024-04-17 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v6]

2024-04-17 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v4]

2024-04-17 Thread Jan Lahoda
own from the constructor are effectively > ignored, and the launcher will continue with the next variant. This seems > wrong - the exception should be printed for the user, like: > > $ java --enable-preview -classpath /tmp/ MainClass > Exception in thread "main" java.la

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v3]

2024-04-17 Thread Jan Lahoda
On Wed, 17 Apr 2024 08:51:39 GMT, Jaikiran Pai wrote: >> Jan Lahoda has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Reflecting code formatting suggestion. >> - First lookup the main method,

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v3]

2024-04-17 Thread Jan Lahoda
On Wed, 17 Apr 2024 06:34:25 GMT, Jan Lahoda wrote: >> Consider code like: >> >> public class MainClass { >> public MainClass() { >> System.out.println("Constructor called!"); >> } >> public static void

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v3]

2024-04-17 Thread Jan Lahoda
own from the constructor are effectively > ignored, and the launcher will continue with the next variant. This seems > wrong - the exception should be printed for the user, like: > > $ java --enable-preview -classpath /tmp/ MainClass > Exception in thread "main" java.la

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-16 Thread Jan Lahoda
On Tue, 16 Apr 2024 10:03:21 GMT, David Holmes wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback. > > src/java.base/share/native/libjli/java.c line 419: > &

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-15 Thread Jan Lahoda
own from the constructor are effectively > ignored, and the launcher will continue with the next variant. This seems > wrong - the exception should be printed for the user, like: > > $ java --enable-preview -classpath /tmp/ MainClass > Exception in thread "main" java.la

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-15 Thread Jan Lahoda
On Sun, 14 Apr 2024 06:51:37 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback. > > src/java.base/share/native/libjli/java.c line 434: >

RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static

2024-04-12 Thread Jan Lahoda
Consider code like: public class MainClass { public MainClass() { System.out.println("Constructor called!"); } public static void main() { System.out.println("main called!"); } } and compile and run it, with preview enabled, like: $ javac /tmp/MainClass.java $

Re: RFR: 8329948: Remove string template feature [v4]

2024-04-11 Thread Jan Lahoda
On Wed, 10 Apr 2024 10:59:25 GMT, Maurizio Cimadamore wrote: >> This PR removes support for the string template feature from the Java >> compiler and the Java SE API, as discussed here: >> >> https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html > > Maurizio Cimadamore

Re: RFR: 8329948: Remove string template feature [v4]

2024-04-10 Thread Jan Lahoda
On Wed, 10 Apr 2024 10:44:13 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line >> 120: >> >>> 118: * @since 21 >>> 119: */ >>> 120: public static final int MAX_INDY_CONCAT_ARG_SLOTS; >> >> May this value change in the

Re: RFR: 8328481: Implement Module Imports [v4]

2024-04-10 Thread Jan Lahoda
On Wed, 10 Apr 2024 08:41:19 GMT, Christian Stein wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding more tests for ambiguities. > > src/jdk.compiler/share/classes

Re: RFR: 8328481: Implement Module Imports [v5]

2024-04-10 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v4]

2024-04-10 Thread Jan Lahoda
On Wed, 10 Apr 2024 11:52:31 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding more tests for ambiguities. > > src/jdk.compiler/share/classes/com/sun/too

Re: RFR: 8328481: Implement Module Imports [v4]

2024-04-09 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports [v3]

2024-04-09 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

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

2024-04-09 Thread Jan Lahoda
On Mon, 8 Apr 2024 16:36:49 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding tests as suggested. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/

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

2024-04-09 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional commit sin

Re: RFR: 8325485: IncrementInstructions.of(int, int) is not storing the args [v2]

2024-04-09 Thread Jan Lahoda
On Fri, 9 Feb 2024 10:47:08 GMT, Adam Sotona wrote: >> ClassFile API provides two sets of instructions implementations (bound and >> unbound). >> Unbound implementation of `IncrementInstruction::constant` returns invalid >> value. >> This bug discovered a hole in the ClassFile API test

Re: RFR: 8329527: Opcode.IFNONNULL.primaryTypeKind() is not ReferenceType

2024-04-09 Thread Jan Lahoda
On Wed, 3 Apr 2024 08:15:52 GMT, Adam Sotona wrote: > `Opcode.IFNONNULL.primaryTypeKind()` wrongly returned `IntType` instead of > the right `ReferenceType`. > Primary type kinds of `BRANCH` opcodes have yet no functional effect in the > Class-File API. > This simple patch fixes the typo. > >

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

2024-04-09 Thread Jan Lahoda
On Fri, 5 Apr 2024 18:30:30 GMT, Joe Darcy wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback: >> - pre-generating the JCVarDecls in Attr, to aid Fl

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

2024-04-08 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional commi

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

2024-04-05 Thread Jan Lahoda
On Fri, 5 Apr 2024 13:09:56 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JavaCompiler cleanup > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/F

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

2024-04-05 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional commit sin

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

2024-04-05 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional commi

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

2024-04-05 Thread Jan Lahoda
On Thu, 4 Apr 2024 17:00:33 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing tests. > > src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler

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

2024-04-05 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request with a new target base due to a merge or

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

2024-04-05 Thread Jan Lahoda
On Thu, 4 Apr 2024 16:47:07 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing tests. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/F

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

2024-04-04 Thread Jan Lahoda
On Thu, 4 Apr 2024 00:37:45 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing tests. > > src/java.compiler/share/classes/javax/lang/model/element/ElementKi

Re: RFR: 8328481: Implement Module Imports [v2]

2024-04-04 Thread Jan Lahoda
API AST node/interface, so this is purely an > implementation choice. > - JShell now supports module imports as well; and the default, implicit, > script is changed to use it to import all of `java.base` if preview is > enabled. It is expected that the default would be changed if/when the module &

Re: RFR: 8328481: Implement Module Imports

2024-04-04 Thread Jan Lahoda
On Thu, 4 Apr 2024 11:43:07 GMT, Thiago Henrique Hüpner wrote: > Should the pull request incorporate a modification to the JAVASE script file > for JShell, specifically substituting it with `import module java.se`? (right > now the imports are computed, not read from a file) Given we need to

RFR: 8328935: Implement Module Imports.

2024-04-04 Thread Jan Lahoda
This is an implementation of JEP JDK-8315129: Module Import Declarations (Preview). Please see the JEP for details: https://bugs.openjdk.org/browse/JDK-8315129 It is mostly straightforward - the module imports are parsed, and then expanded to import-on-demand in `TypeEnter`. There is a few

Re: RFR: JDK-8329624: Add visitors for preview language features

2024-04-04 Thread Jan Lahoda
On Wed, 3 Apr 2024 20:17:39 GMT, Joe Darcy wrote: > When new language features are added, the javax.lang.model may need to be > updated. For certain classes of features, the API update includes introducing > a new set of concrete visitors to handle the language feature. > > The API

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

2024-04-03 Thread Jan Lahoda
On Tue, 2 Apr 2024 12:50:19 GMT, ExE Boss wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing tests. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns

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

2024-03-28 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional commi

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

2024-03-28 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with two additional commits

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

2024-03-28 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional c

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

2024-03-28 Thread Jan Lahoda
On Thu, 28 Mar 2024 11:00:42 GMT, Aggelos Biboudis wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Renaming visitReconstruction to visitDerivedInstance as suggested. > > src/jdk.compil

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

2024-03-28 Thread Jan Lahoda
that was introduced some time ago. > - there are a bit broader changes in `Flow`, to facilitate the introduction > of variables without an explicit declaration for definite assignment and > effectively final computation. Jan Lahoda has updated the pull request incrementally with one additional commit

RFR: 8324651: Compiler Implementation for Derived Record Creation (Preview)

2024-03-27 Thread Jan Lahoda
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 The current CSR is here: https://bugs.openjdk.org/browse/JDK-8328637

Re: RFR: JDK-8326951 Missing @since Tags [v2]

2024-03-19 Thread Jan Lahoda
On Sun, 17 Mar 2024 01:20:17 GMT, Nizar Benalla wrote: >> src/java.base/share/classes/javax/crypto/interfaces/DHPublicKey.java line 68: >> >>> 66: * >>> 67: * @return {@inheritDoc java.security.AsymmetricKey} >>> 68: * @since 22 >> >> Hello Nizar, are the removal of `@since` in

Re: RFR: 8326744: Class-File API transition to Second Preview

2024-03-18 Thread Jan Lahoda
On Tue, 27 Feb 2024 08:45:12 GMT, Adam Sotona wrote: > Task providing Class-File API transition to Second Preview. Looks good to me. - Marked as reviewed by jlahoda (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18021#pullrequestreview-1943355591

Re: RFR: 8327839: Crash with unboxing and widening primitive conversion in switch

2024-03-15 Thread Jan Lahoda
On Tue, 12 Mar 2024 14:06:11 GMT, Aggelos Biboudis wrote: > In cases where the compiler needs to unbox a `long`, `float`, `double` and > then run the exactness check, we were getting a crash. While the selector > value is always boxed, the type (which controls the execution flow) was not, >

Re: RFR: JDK-8326836 Incorrect @since Tags for ClassSignature methods

2024-03-11 Thread Jan Lahoda
On Tue, 27 Feb 2024 15:10:37 GMT, Nizar Benalla wrote: > # Issue > - [JDK-8326836](https://bugs.openjdk.org/browse/JDK-8326836): changes were > made to the method signatures but this modification isn't reflected in the @ > since tags. The @ since tags need to be updated. > > I changed the

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

2024-03-08 Thread Jan Lahoda
On Thu, 7 Mar 2024 21:53:07 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 r

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

2024-03-08 Thread Jan Lahoda
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 th

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

2024-03-07 Thread Jan Lahoda
On Thu, 7 Mar 2024 09:30:41 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/native-access-modules1' into >> native-access-mo

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

2024-03-07 Thread Jan Lahoda
t; > This patch introduces an explicit list of modules that will automatically be > granted the native access. Note this patch is not yet intended to change the > end behavior - the list of modules granted native access is supposed to be > the same as modules in the boot and platfor

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

2024-03-06 Thread Jan Lahoda
On Tue, 5 Mar 2024 18:54:55 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply suggestions from code review >> >> Co-authored-by: ExE Boss <38

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

2024-03-06 Thread Jan Lahoda
t; > This patch introduces an explicit list of modules that will automatically be > granted the native access. Note this patch is not yet intended to change the > end behavior - the list of modules granted native access is supposed to be > the same as modules in the boot and platfor

  1   2   3   >