RFR: 8344912: Sharpen the return type of various internal methods in jdk.internal.foreign [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Nov 25 12:02:15 UTC 2024


On Sun, 24 Nov 2024 03:26:18 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> This patch sharpens the return types of various internal methods. This helps the compiler to have better information when the corresponding methods are not inlined.
>> 
>> Please take a look and leave your reviews, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix failing tests

Looks good

src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java line 144:

> 142:     }
> 143: 
> 144:     private NativeMemorySegmentImpl reinterpretInternal(Class<?> callerClass, long newSize, MemorySessionImpl scope, Consumer<MemorySegment> cleanup) {

This method is also probably missing a `ForceInline`

-------------

Marked as reviewed by mcimadamore (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22344#pullrequestreview-2458235899
PR Review Comment: https://git.openjdk.org/jdk/pull/22344#discussion_r1856491220


More information about the core-libs-dev mailing list