On Sun, 4 May 2025 22:37:21 GMT, Chen Liang <li...@openjdk.org> wrote:
> Credit to @lukellmann that the duplication arg handling in #24742 avoided > throwing exceptions but produced a wrong option. This patch fixes that and > removed stream usages in CaptureCallState to speed up bootstrap. > > Also, the previous patch affected the toString display of the option; I added > a unit test to ensure the option prints names that is user-friendly. > > Another thing I noted is `CapturableState` uses `OperatingSystem`; using > `valueOf` brings a performance overhead due to setups with reflection, so I > made this lazy. (The enum is thread safe, so we allow racy access to the > cache field) > > Testing: jdk/lang/foreign, tier 1-3 in progress. This pull request has now been integrated. Changeset: 8c1b915c Author: Chen Liang <li...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/8c1b915c7ef2b3a6e65705b91f4eb464caaec4e7 Stats: 128 lines in 7 files changed: 37 ins; 44 del; 47 mod 8356126: Duplication handling and optimization of CaptureCallState Reviewed-by: jvernee ------------- PR: https://git.openjdk.org/jdk/pull/25025