After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into primitive arrays by combining values into larger stores.
This PR rewrites the code of appendNull and append(boolean) methods so that these two methods can be optimized by C2. ------------- Commit messages: - Optimization for StringBuilder append(boolean) & appendNull Changes: https://git.openjdk.org/jdk/pull/19626/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19626&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333893 Stats: 137 lines in 5 files changed: 54 ins; 41 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/19626.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19626/head:pull/19626 PR: https://git.openjdk.org/jdk/pull/19626