On Fri, 2 Jan 2026 22:56:50 GMT, Viktor Klang <[email protected]> wrote:
>> Doug Lea 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 pull request contains 24 additional commits >> since the last revision: >> >> - Merge branch 'openjdk:master' into JDK-8373118 >> - Not sure why this merge is necessary >> Merge remote-tracking branch 'refs/remotes/origin/JDK-8373118' into >> JDK-8373118 >> - Merge branch 'openjdk:master' into JDK-8373118 >> - Fix deactivate; faster quiescence >> - recheck avoiding cross-class offsets >> - Merge branch 'openjdk:master' into JDK-8373118 >> - Merge branch 'openjdk:master' into JDK-8373118 >> - Check reworked ordering control >> - Merge branch 'openjdk:master' into JDK-8373118 >> - Merge branch 'openjdk:master' into JDK-8373118 >> - ... and 14 more: https://git.openjdk.org/jdk/compare/dd183022...556c5201 > > src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1307: > >> 1305: ForkJoinTask<?>[] a = array; >> 1306: int b = base, s = top - 1, cap; >> 1307: if (a != null && s - b >= 0 && (cap = a.length) > 0) { > > Would it help to make the assignment to `cap` be `(cap = a.length - 1) >= 0` > and then eliminate the `(cap - 1)` in the slotOffset calculations on both > sides of `fifo`-branches? There are still some remnants of code coping with annoying fact that C1 needed to have cap (not cap - 1) in a local to do the bounds check elision. I don't think it is needed anymore. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2673038453
