RFR JDK-8232724: Remove indirection with calling JNU_NewStringPlatform
christoph.langer at sap.com
Tue Oct 29 05:29:23 UTC 2019
> Please review the following fix which removes indirection in calling
> JNU_NewStringPlatform via NewStringPlatform.
> bug: https://bugs.openjdk.java.net/browse/JDK-8232724
> webrev: http://cr.openjdk.java.net/~aivanov/8232724/webrev.00/
> It is a follow-up fix to JDK-8232624 and JDK-8231355. It removes
> NewStringPlatform alias as Claes did in JDK-8231355. To call
> JNU_NewStringPlatform, the function pointer to_java_string_fn_t is
> declared with JNICALL (__stdcall); the function is looked up by both the
> undecorated name and the __stdcall-decorated name for Win32.
> Tier 1 and 2 tests are all green.
This looks good to me.
> There are two declarations of the to_java_string_fn_t function pointer:
> in jvm.h and locally in javaClasses. I searched the source code for it
> and didn't find any usages but in
> java_lang_String::create_from_platform_dependent_str. The declaration in
> jvm.h uses "char *" whereas javaClasses uses "const char *".
> Shall I remove one of them? The one in jvm.h because it's unused?
Yes, I would suggest dropping the declaration in jvm.h
More information about the hotspot-runtime-dev