[lworld] RFR: 8351441: [lworld] ClassFile API support generating stack maps for strict field assignment [v5]
Chen Liang
liach at openjdk.org
Tue Mar 11 19:55:04 UTC 2025
On Mon, 10 Mar 2025 22:54:32 GMT, Chen Liang <liach at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/classfile/impl/WritableField.java line 82:
>>
>>> 80: if (sizeOne != sizeTwo)
>>> 81: return true;
>>> 82: for (int i = 0; i < sizeOne; i++) {
>>
>> there could be a mismatch even if both arrays have the same length and same content but the order of the fields is different in each array, not sure if this could happen but we should consider it
>
> Originally this matches because I am only removing unsets. Now Dan told me that we need to consider adding more to unset fields if we have loops, so I will do a sort for the arrays to ensure they have some definite order.
I have added more test cases for control flow merge with different DA results. In the new version, I sort the fields by their CP indices (their UTF8s are from the same CP).
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1392#discussion_r1990032077
More information about the valhalla-dev
mailing list