Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v8]

2023-05-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Anonymous main classes renamed to unnamed classes - Add test - Changes: - all: https://git.o

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-05-01 Thread Jim Laskey
On Thu, 27 Apr 2023 18:00:38 GMT, Jim Laskey wrote: >> src/java.base/share/native/libjli/java.c line 590: >> >>> 588: CHECK_EXCEPTION_NULL_LEAVE(mainID); >>> 589: (*env)->CallVoidMethod(env, mainObject, mainID); >>> 590: break; >> >> This calls into LauncherHelper to get

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v7]

2023-04-29 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Move AnonymousMainClass to parser - Revert java launch - Changes: - all: https://git.openjdk

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-28 Thread Jim Laskey
On Fri, 28 Apr 2023 17:51:58 GMT, Jan Lahoda wrote: >> I believe we were discussing this some time ago, and there were some >> problems. I don't recall the exact details, but I'll try to look into this >> later. > > I've sketched this: > https://github.com/lahodaj/jdk/commit/efe55f7d354ed7bbf91

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v6]

2023-04-28 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Leave exception alone - Unused variables - Changes: - all: https://git.openjdk.org/jdk/pull/

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-28 Thread Jan Lahoda
On Fri, 28 Apr 2023 13:01:33 GMT, Jan Lahoda wrote: >> I see that logic in JavaCompiler - I wonder if that's just the way it is, or >> if there's a deeper reason as to why the sourcefile is set on the toplevel >> unit *after* parsing (I don't think I can see any, in which case that might >> be

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v5]

2023-04-28 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Can't be invokeExact for instance main - Changes: - all: https://git.openjdk.org/jdk/pull/13689

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-28 Thread Jim Laskey
On Fri, 28 Apr 2023 14:26:10 GMT, Jan Lahoda wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 14 commits: >> >> - Merge branch 'master' into 8306112 >> - PreviewFeatures.isEnabled() >> - Clean up isPreview >

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v4]

2023-04-28 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Recommended changes #1 - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files - new:

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-28 Thread Jim Laskey
On Fri, 28 Apr 2023 13:13:57 GMT, Jan Lahoda wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 14 commits: >> >> - Merge branch 'master' into 8306112 >> - PreviewFeatures.isEnabled() >> - Clean up isPreview >

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-28 Thread Jim Laskey
On Fri, 28 Apr 2023 12:45:35 GMT, Jan Lahoda wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 14 commits: >> >> - Merge branch 'master' into 8306112 >> - PreviewFeatures.isEnabled() >> - Clean up isPreview >

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-28 Thread Jan Lahoda
On Thu, 27 Apr 2023 18:21:56 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 14 commits: > > - Merge branch 'maste

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-28 Thread Jan Lahoda
On Thu, 27 Apr 2023 18:21:56 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 14 commits: > > - Merge branch 'maste

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-28 Thread Jan Lahoda
On Thu, 27 Apr 2023 20:34:44 GMT, Maurizio Cimadamore wrote: >> The source file name is not available until after parsing. > > I see that logic in JavaCompiler - I wonder if that's just the way it is, or > if there's a deeper reason as to why the sourcefile is set on the toplevel > unit *after

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-27 Thread David Holmes
On Thu, 27 Apr 2023 18:21:56 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 14 commits: > > - Merge branch 'maste

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-27 Thread Maurizio Cimadamore
On Thu, 27 Apr 2023 18:21:56 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 14 commits: > > - Merge branch 'maste

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Maurizio Cimadamore
On Thu, 27 Apr 2023 18:28:41 GMT, Jim Laskey wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java line 432: >> >>> 430: >>> 431: // Restructure top level to be an top level anonymous class. >>> 432: public static void constructAnonymousMainClass(JCCompilationUnit

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Jim Laskey
On Thu, 27 Apr 2023 14:53:21 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PreviewFeatures.isEnabled() > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java line 432: > >

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Jim Laskey
On Thu, 27 Apr 2023 13:39:37 GMT, Alan Bateman wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PreviewFeatures.isEnabled() > > src/java.base/share/classes/sun/launcher/LauncherHelper.java line 45: > >> 43: import ja

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Jim Laskey
On Thu, 27 Apr 2023 14:55:01 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PreviewFeatures.isEnabled() > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line > 2433

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v3]

2023-04-27 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits: - Merge branch 'master' into 8306112 - PreviewFeatures.isEnabled() - Clean up isPre

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Joe Darcy
On Thu, 27 Apr 2023 13:17:58 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > PreviewFeatures.isEnabled() I assume future it

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Maurizio Cimadamore
On Thu, 27 Apr 2023 13:17:58 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > PreviewFeatures.isEnabled() src/jdk.compiler/s

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Alan Bateman
On Thu, 27 Apr 2023 13:17:58 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > PreviewFeatures.isEnabled() src/java.base/shar

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-04-27 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: PreviewFeatures.isEnabled() - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files -

RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview)

2023-04-27 Thread Jim Laskey
Add flexible main methods and anonymous main classes to the Java language. - Commit messages: - Clean up isPreview - Missing exception - Corrections - Update VM.java - Clean up testing - Update TestJavacTaskScanner.java - Merge branch 'master' into 8306112 - Clean up - remnan