RFR: 8363816: Refactor array name creation [v2]
David Holmes
dholmes at openjdk.org
Wed Jul 23 04:45:04 UTC 2025
On Tue, 22 Jul 2025 19:04:39 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> This is a simple change that refactors the array name creation (using the element class as part of the name), so that it can be called by other classes in valhalla.
>> Tested with tier1 sanity.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix errant line deletion.
A couple of pre-existing style nits, but as you are here ...
LGTM.
Thanks
src/hotspot/share/oops/objArrayKlass.cpp line 58:
> 56: Symbol* ObjArrayKlass::create_element_klass_array_name(JavaThread* current, Klass* element_klass) {
> 57: ResourceMark rm(current);
> 58: char *name_str = element_klass->name()->as_C_string();
Suggestion:
char* name_str = element_klass->name()->as_C_string();
src/hotspot/share/oops/objArrayKlass.cpp line 60:
> 58: char *name_str = element_klass->name()->as_C_string();
> 59: int len = element_klass->name()->utf8_length();
> 60: char *new_str = NEW_RESOURCE_ARRAY_IN_THREAD(current, char, len + 4);
Suggestion:
char* new_str = NEW_RESOURCE_ARRAY_IN_THREAD(current, char, len + 4);
src/hotspot/share/oops/objArrayKlass.cpp line 71:
> 69: new_str[idx++] = JVM_SIGNATURE_ENDCLASS;
> 70: }
> 71: new_str[idx++] = '\0';
Suggestion:
new_str[idx] = '\0';
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26430#pullrequestreview-3045572262
PR Review Comment: https://git.openjdk.org/jdk/pull/26430#discussion_r2224327081
PR Review Comment: https://git.openjdk.org/jdk/pull/26430#discussion_r2224327393
PR Review Comment: https://git.openjdk.org/jdk/pull/26430#discussion_r2224329199
More information about the hotspot-dev
mailing list