< prev index next > src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/aarch64/linux/LinuxAArch64Linker.java
Print this page
@Override
public final MethodHandle downcallHandle(FunctionDescriptor function) {
Objects.requireNonNull(function);
MethodType type = SharedUtils.inferMethodType(function, false);
MethodHandle handle = CallArranger.LINUX.arrangeDowncall(type, function);
! if (!type.returnType().equals(MemorySegment.class)) {
- // not returning segment, just insert a throwing allocator
- handle = MethodHandles.insertArguments(handle, 1, SharedUtils.THROWING_ALLOCATOR);
- }
return SharedUtils.wrapDowncall(handle, function);
}
@Override
public final NativeSymbol upcallStub(MethodHandle target, FunctionDescriptor function, ResourceScope scope) {
@Override
public final MethodHandle downcallHandle(FunctionDescriptor function) {
Objects.requireNonNull(function);
MethodType type = SharedUtils.inferMethodType(function, false);
MethodHandle handle = CallArranger.LINUX.arrangeDowncall(type, function);
! handle = SharedUtils.maybeInsertAllocator(handle);
return SharedUtils.wrapDowncall(handle, function);
}
@Override
public final NativeSymbol upcallStub(MethodHandle target, FunctionDescriptor function, ResourceScope scope) {
< prev index next >