RFR: 8340544: Optimize setLocalsFromArg [v2]
Claes Redestad
redestad at openjdk.org
Fri Sep 20 23:57:36 UTC 2024
On Fri, 20 Sep 2024 16:35:07 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> CheckLocal once, reduce redundant checkLocal, rewrite switch, reduce method size, codeSize is reduced from 367 to 263.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>
> more compact
LGTM
src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java line 1070:
> 1068: } else {
> 1069: if (desc instanceof ReferenceClassDescImpl) {
> 1070: type = Type.referenceType(desc);
Not for this PR, but `Type.referenceType(ClassDesc desc)` is always just creating a new `Type` - perhaps it would be profitable to do some quick checks such as `if (desc == CD_Object) return TYPE_OBJECT;` in that method?
-------------
Marked as reviewed by redestad (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21106#pullrequestreview-2319515225
PR Review Comment: https://git.openjdk.org/jdk/pull/21106#discussion_r1769360053
More information about the core-libs-dev
mailing list