RFR: 8306914: Implementation of JEP Launch Multi-File Source-Code Programs [v4]

Christian Stein cstein at openjdk.org
Mon Nov 6 15:50:15 UTC 2023


On Fri, 27 Oct 2023 14:26:56 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

>> I'll add a comment explaining that the `MemoryClassLoader` is required here to compile referenced types from their source files on-the-fly.
>
> Random comment here, feel free to ignore...
> 
> There appear to be two similar implementations of a "Memory" ClassLoader in the JDK... the one under discussion here, and `jdk.jshell.execution.DefaultLoaderDelegate.RemoteClassLoader`. Perhaps someday they could be consolidated.

Comments added, Alan.

Archie, that's true for the "in-memory" part - but this class loader also tries to find and compile new classes from the default file system on-the-fly, which the class loader in JShell does not (need to do). If both do share enough code, a consolidation would be good to have.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13712#discussion_r1383550068


More information about the compiler-dev mailing list