RFR: 8349923: Refactor StackMapTable constructor and StackMapReader
Matias Saavedra Silva
matsaave at openjdk.org
Fri Feb 14 19:41:14 UTC 2025
On Fri, 14 Feb 2025 19:27:06 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> This patch refactors the `StackMapReader` to clean up the `StackMapTable` constructor. The `StackMapReader` class is extended to hold more fields used for verification purposes and allows for a simpler StackMapTable constructor. Additionally, in preparation for further changes to verification, the `_frame_count` may not be equal to the value reported by the classfile. Verified with tier 1-5 tests
>
> src/hotspot/share/classfile/stackMapTable.hpp line 124:
>
>> 122:
>> 123: // Previous and current frame buffers
>> 124: StackMapFrame* _pre_frame;
>
> If you've touched all of the instances of pre_frame, can you rename it prev_frame ? frame_buf could also be current_frame if you've changed lines that it appears on.
I noticed that frame_buf is unused and as far as I can tell it isn't needed. "prev_frame" is definitely clearer so I'll switch to that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23645#discussion_r1956636206
More information about the hotspot-runtime-dev
mailing list