RFR: 8339260: Move rarely used constants out of ClassFile [v9]
Luca Kellermann
duke at openjdk.org
Mon Oct 7 17:40:42 UTC 2024
On Mon, 7 Oct 2024 17:07:47 GMT, Chen Liang <liach at openjdk.org> wrote:
> Your example is an exact antipattern from our data-oriented model: we would want users to check the object type with `instanceof` (should be `is` in kotlin) instead of checking these constants.
I'm aware, this was just the first example I could come up with.
> Yet I think we can consider promoting Constant Pool tag from byte or char, short, or int to represent a u1 in case it goes over 127.
Maybe just using `int` everywhere for consistency might be a good option too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20773#discussion_r1790628903
More information about the core-libs-dev
mailing list