On Sun, 22 Sep 2024 13:20:01 GMT, Shaojin Wen wrote:
> Optimize checkAssignableTo to avoid clone when stackSize is 0, and use clone
> instead of Array.copyOf to avoid compression and then expansion
Thanks for this cleanup! Tests pass.
-
Marked as reviewed by liach (Reviewer).
PR
On Sun, 22 Sep 2024 14:08:38 GMT, Shaojin Wen wrote:
>> src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
>> line 1102:
>>
>>> 1100: target.localsSize = localsSize;
>>> 1101: if (stackSize > 0) {
>>> 1102: target.s
On Sun, 22 Sep 2024 14:14:11 GMT, Shaojin Wen wrote:
>> stack.length may be larger than stackSize. In this case, the length of the
>> array copied by clone will be longer than Arrays.copyOf. However, I have no
>> evidence that Arrays.copyOf is faster than clone.
>
> I found through debugging th
On Sun, 22 Sep 2024 13:37:38 GMT, Chen Liang wrote:
>> Optimize checkAssignableTo to avoid clone when stackSize is 0, and use clone
>> instead of Array.copyOf to avoid compression and then expansion
>
> src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
> line 1102:
On Sun, 22 Sep 2024 13:20:01 GMT, Shaojin Wen wrote:
> Optimize checkAssignableTo to avoid clone when stackSize is 0, and use clone
> instead of Array.copyOf to avoid compression and then expansion
src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
line 1102:
> 110