> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
>
> 1. DirectClassBuilder::build codeSize 361 -> 319
> 2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
> 3. BufWriterImpl::writeIndex codeSize 62 -> 37 (forceinline)
> 4. BufWriterImpl::writeU2 (forceinli
On Sun, 22 Sep 2024 05:30:43 GMT, Shaojin Wen wrote:
> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
>
> 1. DirectClassBuilder::build codeSize 361 -> 315
> 2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
> 3. BufWriterImpl::writeIndex codeSize 62 ->
On Mon, 23 Sep 2024 00:20:09 GMT, Shaojin Wen wrote:
>> For clarity, I think using Integer.toUnsignedLong on the shift result is
>> better
>
> If minorVersion > 0x, the result of using Integer.toUnsignedLong will be
> wrong. I guess this is the reason why the previous version build failed
On Mon, 23 Sep 2024 00:33:26 GMT, Chen Liang wrote:
>> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
>>
>> 1. DirectClassBuilder::build codeSize 361 -> 315
>> 2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
>> 3. BufWriterImpl::writeIndex codeSize 62
On Sun, 22 Sep 2024 05:30:43 GMT, Shaojin Wen wrote:
> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
>
> 1. DirectClassBuilder::build codeSize 361 -> 315
> 2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
> 3. BufWriterImpl::writeIndex codeSize 62 ->
On Sun, 22 Sep 2024 17:04:24 GMT, ExE Boss wrote:
>> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
>>
>> 1. DirectClassBuilder::build codeSize 361 -> 315
>> 2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
>> 3. BufWriterImpl::writeIndex codeSize 62 -
On Sun, 22 Sep 2024 05:30:43 GMT, Shaojin Wen wrote:
> Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
>
> 1. DirectClassBuilder::build codeSize 361 -> 315
> 2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
> 3. BufWriterImpl::writeIndex codeSize 62 ->
On Sun, 22 Sep 2024 20:48:08 GMT, Chen Liang wrote:
>> src/java.base/share/classes/jdk/internal/classfile/impl/DirectClassBuilder.java
>> line 207:
>>
>>> 205:
>>> 206: // Now we can make the head
>>> 207: head.writeLong(((long) ClassFile.MAGIC_NUMBER) << 32 |
>>> minorVersion
Do some refactoring so that the code can be inlined by the C1/C2 optimizer.
1. DirectClassBuilder::build codeSize 361 -> 315
2. DirectCodeBuilder::writeExceptionHandlers codeSize 183 -> 31
3. BufWriterImpl::writeIndex codeSize 62 -> 37 (forceinline)
4. BufWriterImpl::writeU2 (forceinline)
5. Util: