RFR: 8309811: BytecodePrinter cannot handle unlinked classes [v2]
Ioi Lam
iklam at openjdk.org
Tue Jun 27 05:27:31 UTC 2023
On Mon, 26 Jun 2023 19:18:37 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @coleenp comments
>
> src/hotspot/share/interpreter/bytecodeTracer.cpp line 70:
>
>> 68: int get_native_index_u4() { int i=Bytes::get_native_u4(_next_pc); _next_pc+=4; return i; }
>> 69: int get_Java_index_u2() { int i=Bytes::get_Java_u2(_next_pc); _next_pc+=2; return i; }
>> 70: int get_Java_index_u4() { int i=Bytes::get_Java_u4(_next_pc); _next_pc+=4; return i; }
>
> Since you've done the reformatting, can you add spaces around i=Bytes ? I don't really care if you add spaces around _next_pc+=x. That looks ok to me.
I reformatted the code and reordered the functions a little.
> src/hotspot/share/interpreter/bytecodeTracer.cpp line 372:
>
>> 370: {
>> 371: int cp_index;
>> 372: if (Bytecodes::uses_cp_cache(raw_code())) {
>
> Should this be uses_cp_cache() and is_linked()?
I added an assert. Such bytecodes can appear only in linked classes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14623#discussion_r1243155614
PR Review Comment: https://git.openjdk.org/jdk/pull/14623#discussion_r1243155636
More information about the hotspot-runtime-dev
mailing list