RFR: 8350983: JShell LocalExecutionControl only needs stopCheck() on backward branches [v2]
Archie Cobbs
acobbs at openjdk.org
Mon Mar 3 15:19:22 UTC 2025
> JShell's `LocalExecutionControl` ensures a running eval thread can be stopped by `JShell.stop()` by inserting an invocation of `stopCheck()` at every branch point in the bytecode of loaded classfiles.
>
> However, this same guarantee can be provided by invoking `stopCheck()` only at backward branches and not at forward branches. By doing this, the performance and size impact on the executing code can be reduced.
>
> Fortunately the new ClassFile API makes this kind of modification easy 👍
Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
Niceify using pattern matching switch with guard per review suggestion.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23850/files
- new: https://git.openjdk.org/jdk/pull/23850/files/f0a3c816..30c5f1a3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23850&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23850&range=00-01
Stats: 13 lines in 1 file changed: 0 ins; 5 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/23850.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23850/head:pull/23850
PR: https://git.openjdk.org/jdk/pull/23850
More information about the kulla-dev
mailing list