RFR: JDK-8304884: Update Bytecodes data to be mostly compile time constants [v3]
Justin King
jcking at openjdk.org
Mon Mar 27 14:43:12 UTC 2023
On Mon, 27 Mar 2023 01:53:13 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Justin King has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Replace XX with def and add _DO suffix
>>
>> Signed-off-by: Justin King <jcking at google.com>
>> - Fix compiler warnings
>>
>> Signed-off-by: Justin King <jcking at google.com>
>
> src/hotspot/share/interpreter/bytecodes.cpp line 320:
>
>> 318: };
>> 319:
>> 320: #define STRING_SIZE(string) StringLiteralSize::invoke(string)
>
> Can't you simply use:
>
> #define STRING_SIZE(string) (sizeof(string) - 1)
>
> ?
No, due to `nullptr` for the `wide_format`. That was my first instinct as well, then I saw `nullptr`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13179#discussion_r1149352061
More information about the hotspot-runtime-dev
mailing list