mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
8348976: MemorySegment::reinretpret should be force inlined
Reviewed-by: liach
This commit is contained in:
parent
77647421c5
commit
137ad5d03c
1 changed files with 3 additions and 0 deletions
|
@ -129,6 +129,7 @@ public abstract sealed class AbstractMemorySegmentImpl
|
|||
|
||||
@Override
|
||||
@CallerSensitive
|
||||
@ForceInline
|
||||
public final MemorySegment reinterpret(long newSize, Arena arena, Consumer<MemorySegment> cleanup) {
|
||||
Objects.requireNonNull(arena);
|
||||
return reinterpretInternal(Reflection.getCallerClass(), newSize,
|
||||
|
@ -137,12 +138,14 @@ public abstract sealed class AbstractMemorySegmentImpl
|
|||
|
||||
@Override
|
||||
@CallerSensitive
|
||||
@ForceInline
|
||||
public final MemorySegment reinterpret(long newSize) {
|
||||
return reinterpretInternal(Reflection.getCallerClass(), newSize, scope, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallerSensitive
|
||||
@ForceInline
|
||||
public final MemorySegment reinterpret(Arena arena, Consumer<MemorySegment> cleanup) {
|
||||
Objects.requireNonNull(arena);
|
||||
return reinterpretInternal(Reflection.getCallerClass(), byteSize(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue