8346610: Make all imports consistent in the FFM API

Reviewed-by: mcimadamore
This commit is contained in:
Per Minborg 2025-01-15 12:19:27 +00:00
parent c36200b098
commit d4e5ec2746
52 changed files with 236 additions and 226 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,13 @@
package java.lang.foreign; package java.lang.foreign;
import jdk.internal.foreign.FunctionDescriptorImpl;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.List;
import jdk.internal.foreign.FunctionDescriptorImpl;
/** /**
* A function descriptor models the signature of a foreign function. A function * A function descriptor models the signature of a foreign function. A function

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,8 @@
package java.lang.foreign; package java.lang.foreign;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
import jdk.internal.foreign.abi.LinkerOptions;
import jdk.internal.foreign.abi.CapturableState; import jdk.internal.foreign.abi.CapturableState;
import jdk.internal.foreign.abi.LinkerOptions;
import jdk.internal.foreign.abi.SharedUtils; import jdk.internal.foreign.abi.SharedUtils;
import jdk.internal.javac.Restricted; import jdk.internal.javac.Restricted;
import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,6 @@
package java.lang.foreign; package java.lang.foreign;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Stream;
import jdk.internal.foreign.LayoutPath; import jdk.internal.foreign.LayoutPath;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
import jdk.internal.foreign.layout.MemoryLayoutUtil; import jdk.internal.foreign.layout.MemoryLayoutUtil;
@ -39,6 +33,12 @@ import jdk.internal.foreign.layout.SequenceLayoutImpl;
import jdk.internal.foreign.layout.StructLayoutImpl; import jdk.internal.foreign.layout.StructLayoutImpl;
import jdk.internal.foreign.layout.UnionLayoutImpl; import jdk.internal.foreign.layout.UnionLayoutImpl;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Stream;
/** /**
* A memory layout describes the contents of a memory segment. * A memory layout describes the contents of a memory segment.
* <p> * <p>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,14 @@
package java.lang.foreign; package java.lang.foreign;
import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.MemorySessionImpl;
import jdk.internal.foreign.SegmentBulkOperations;
import jdk.internal.foreign.SegmentFactories;
import jdk.internal.javac.Restricted;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.vm.annotation.ForceInline;
import java.io.UncheckedIOException; import java.io.UncheckedIOException;
import java.lang.foreign.ValueLayout.OfInt; import java.lang.foreign.ValueLayout.OfInt;
import java.nio.Buffer; import java.nio.Buffer;
@ -41,13 +49,6 @@ import java.util.Optional;
import java.util.Spliterator; import java.util.Spliterator;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.MemorySessionImpl;
import jdk.internal.foreign.SegmentBulkOperations;
import jdk.internal.foreign.SegmentFactories;
import jdk.internal.javac.Restricted;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.vm.annotation.ForceInline;
/** /**
* A memory segment provides access to a contiguous region of memory. * A memory segment provides access to a contiguous region of memory.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,17 +25,16 @@
package java.lang.foreign; package java.lang.foreign;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
import jdk.internal.foreign.AbstractMemorySegmentImpl; import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.ArenaImpl; import jdk.internal.foreign.ArenaImpl;
import jdk.internal.foreign.SlicingAllocator; import jdk.internal.foreign.SlicingAllocator;
import jdk.internal.foreign.StringSupport; import jdk.internal.foreign.StringSupport;
import jdk.internal.foreign.Utils;
import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.ForceInline;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
/** /**
* An object that may be used to allocate {@linkplain MemorySegment memory segments}. * An object that may be used to allocate {@linkplain MemorySegment memory segments}.
* Clients implementing this interface must implement the {@link #allocate(long, long)} * Clients implementing this interface must implement the {@link #allocate(long, long)}

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,9 +25,10 @@
package java.lang.foreign; package java.lang.foreign;
import jdk.internal.foreign.layout.ValueLayouts;
import java.lang.invoke.VarHandle; import java.lang.invoke.VarHandle;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import jdk.internal.foreign.layout.ValueLayouts;
/** /**
* A layout that models values of basic data types. Examples of values modeled by * A layout that models values of basic data types. Examples of values modeled by

View file

@ -25,20 +25,6 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.lang.foreign.*;
import java.lang.reflect.Array;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jdk.internal.access.JavaNioAccess; import jdk.internal.access.JavaNioAccess;
import jdk.internal.access.SharedSecrets; import jdk.internal.access.SharedSecrets;
import jdk.internal.access.foreign.UnmapperProxy; import jdk.internal.access.foreign.UnmapperProxy;
@ -50,6 +36,28 @@ import jdk.internal.util.Preconditions;
import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.ForceInline;
import sun.nio.ch.DirectBuffer; import sun.nio.ch.DirectBuffer;
import java.lang.foreign.AddressLayout;
import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
import java.lang.foreign.ValueLayout;
import java.lang.reflect.Array;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Spliterator;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
/** /**
* This abstract class provides an immutable implementation for the {@code MemorySegment} interface. This class contains information * This abstract class provides an immutable implementation for the {@code MemorySegment} interface. This class contains information
* about the segment's spatial and temporal bounds; each memory segment implementation is associated with an owner thread which is set at creation time. * about the segment's spatial and temporal bounds; each memory segment implementation is associated with an owner thread which is set at creation time.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,10 +26,7 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.lang.foreign.Arena; import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySegment.Scope; import java.lang.foreign.MemorySegment.Scope;
import java.util.Objects;
public final class ArenaImpl implements Arena { public final class ArenaImpl implements Arena {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,9 +27,9 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import jdk.internal.foreign.abi.fallback.FallbackLinker; import jdk.internal.foreign.abi.fallback.FallbackLinker;
import jdk.internal.vm.ForeignLinkerSupport;
import jdk.internal.util.OperatingSystem; import jdk.internal.util.OperatingSystem;
import jdk.internal.util.StaticProperty; import jdk.internal.util.StaticProperty;
import jdk.internal.vm.ForeignLinkerSupport;
import static java.lang.foreign.ValueLayout.ADDRESS; import static java.lang.foreign.ValueLayout.ADDRESS;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,12 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import jdk.internal.invoke.MhUtil; import jdk.internal.invoke.MhUtil;
import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.ForceInline;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
/** /**
* A confined session, which features an owner thread. The liveness check features an additional * A confined session, which features an owner thread. The liveness check features an additional
* confinement check - that is, calling any operation on this session from a thread other than the * confinement check - that is, calling any operation on this session from a thread other than the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,8 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import jdk.internal.access.JavaNioAccess;
import jdk.internal.access.SharedSecrets;
import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.ForceInline;
import sun.nio.ch.DirectBuffer;
import java.nio.Buffer;
import java.util.Objects; import java.util.Objects;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,15 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import jdk.internal.access.JavaNioAccess;
import jdk.internal.access.SharedSecrets;
import jdk.internal.vm.annotation.ForceInline;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import jdk.internal.access.JavaNioAccess;
import jdk.internal.access.SharedSecrets;
import jdk.internal.vm.annotation.ForceInline;
/** /**
* Implementation for heap memory segments. A heap memory segment is composed by an offset and * Implementation for heap memory segments. A heap memory segment is composed by an offset and
* a base object (typically an array). To enhance performances, the access to the base object needs to feature * a base object (typically an array). To enhance performances, the access to the base object needs to feature

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,6 @@ import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.lang.invoke.VarHandle; import java.lang.invoke.VarHandle;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.function.UnaryOperator; import java.util.function.UnaryOperator;
import java.util.stream.IntStream; import java.util.stream.IntStream;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,10 +25,11 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.nio.ByteBuffer;
import jdk.internal.access.foreign.UnmapperProxy; import jdk.internal.access.foreign.UnmapperProxy;
import jdk.internal.misc.ScopedMemoryAccess; import jdk.internal.misc.ScopedMemoryAccess;
import java.nio.ByteBuffer;
/** /**
* Implementation for a mapped memory segments. A mapped memory segment is a native memory segment, which * Implementation for a mapped memory segments. A mapped memory segment is a native memory segment, which
* additionally features an {@link UnmapperProxy} object. This object provides detailed information about the * additionally features an {@link UnmapperProxy} object. This object provides detailed information about the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,20 +26,20 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.lang.foreign.MemorySegment; import jdk.internal.foreign.GlobalSession.HeapSession;
import jdk.internal.invoke.MhUtil;
import jdk.internal.misc.ScopedMemoryAccess;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.annotation.Stable;
import java.lang.foreign.Arena; import java.lang.foreign.Arena;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySegment.Scope; import java.lang.foreign.MemorySegment.Scope;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle; import java.lang.invoke.VarHandle;
import java.lang.ref.Cleaner; import java.lang.ref.Cleaner;
import java.util.Objects; import java.util.Objects;
import jdk.internal.foreign.GlobalSession.HeapSession;
import jdk.internal.misc.ScopedMemoryAccess;
import jdk.internal.invoke.MhUtil;
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.vm.annotation.Stable;
/** /**
* This class manages the temporal bounds associated with a memory segment as well * This class manages the temporal bounds associated with a memory segment as well
* as thread confinement. A session has a liveness bit, which is updated when the session is closed * as thread confinement. A session has a liveness bit, which is updated when the session is closed

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,12 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.nio.ByteBuffer;
import java.util.Optional;
import jdk.internal.misc.Unsafe; import jdk.internal.misc.Unsafe;
import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.ForceInline;
import java.nio.ByteBuffer;
import java.util.Optional;
/** /**
* Implementation for native memory segments. A native memory segment is essentially a wrapper around * Implementation for native memory segments. A native memory segment is essentially a wrapper around
* a native long address. * a native long address.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,11 +25,12 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import jdk.internal.invoke.MhUtil;
import jdk.internal.misc.ScopedMemoryAccess;
import jdk.internal.vm.annotation.ForceInline;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle; import java.lang.invoke.VarHandle;
import jdk.internal.misc.ScopedMemoryAccess;
import jdk.internal.invoke.MhUtil;
import jdk.internal.vm.annotation.ForceInline;
/** /**
* A shared session, which can be shared across multiple threads. Closing a shared session has to ensure that * A shared session, which can be shared across multiple threads. Closing a shared session has to ensure that

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,17 +25,21 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import java.lang.foreign.*; import jdk.internal.loader.NativeLibrary;
import jdk.internal.loader.RawNativeLibraries;
import jdk.internal.util.OperatingSystem;
import jdk.internal.util.StaticProperty;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SequenceLayout;
import java.lang.foreign.SymbolLookup;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.function.Function; import java.util.function.Function;
import jdk.internal.loader.NativeLibrary;
import jdk.internal.loader.RawNativeLibraries;
import jdk.internal.util.OperatingSystem;
import jdk.internal.util.StaticProperty;
import static java.lang.foreign.ValueLayout.ADDRESS; import static java.lang.foreign.ValueLayout.ADDRESS;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,12 @@
package jdk.internal.foreign; package jdk.internal.foreign;
import jdk.internal.access.SharedSecrets;
import jdk.internal.foreign.abi.SharedUtils;
import jdk.internal.misc.Unsafe;
import jdk.internal.vm.annotation.ForceInline;
import sun.invoke.util.Wrapper;
import java.lang.foreign.AddressLayout; import java.lang.foreign.AddressLayout;
import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemoryLayout.PathElement; import java.lang.foreign.MemoryLayout.PathElement;
@ -42,12 +48,6 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier; import java.util.function.Supplier;
import jdk.internal.access.SharedSecrets;
import jdk.internal.foreign.abi.SharedUtils;
import jdk.internal.misc.Unsafe;
import jdk.internal.vm.annotation.ForceInline;
import sun.invoke.util.Wrapper;
/** /**
* This class contains misc helper functions to support creation of memory segments. * This class contains misc helper functions to support creation of memory segments.
*/ */

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,11 +42,11 @@ import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection; import jdk.internal.reflect.Reflection;
import java.lang.foreign.AddressLayout; import java.lang.foreign.AddressLayout;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.Arena; import java.lang.foreign.Arena;
import java.lang.foreign.FunctionDescriptor; import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.Linker; import java.lang.foreign.Linker;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment; import java.lang.foreign.MemorySegment;
import java.lang.foreign.PaddingLayout; import java.lang.foreign.PaddingLayout;
import java.lang.foreign.SequenceLayout; import java.lang.foreign.SequenceLayout;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,10 @@ import jdk.internal.foreign.Utils;
import jdk.internal.foreign.abi.BindingInterpreter.LoadFunc; import jdk.internal.foreign.abi.BindingInterpreter.LoadFunc;
import jdk.internal.foreign.abi.BindingInterpreter.StoreFunc; import jdk.internal.foreign.abi.BindingInterpreter.StoreFunc;
import java.lang.foreign.*; import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
@ -37,9 +40,7 @@ import java.util.ArrayList;
import java.util.Deque; import java.util.Deque;
import java.util.List; import java.util.List;
import static java.lang.foreign.ValueLayout.JAVA_BYTE; import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.ValueLayout.JAVA_INT_UNALIGNED;
import static java.lang.foreign.ValueLayout.JAVA_SHORT_UNALIGNED;
/** /**
* The binding operators defined in the Binding class can be combined into argument and return value processing 'recipes'. * The binding operators defined in the Binding class can be combined into argument and return value processing 'recipes'.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,6 @@
package jdk.internal.foreign.abi; package jdk.internal.foreign.abi;
import java.lang.classfile.Annotation;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.Label;
import java.lang.classfile.Opcode;
import java.lang.classfile.TypeKind;
import jdk.internal.foreign.AbstractMemorySegmentImpl; import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.MemorySessionImpl; import jdk.internal.foreign.MemorySessionImpl;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
@ -51,12 +44,23 @@ import jdk.internal.foreign.abi.Binding.VMStore;
import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.ForceInline;
import java.io.IOException; import java.io.IOException;
import java.lang.classfile.Annotation;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.Label;
import java.lang.classfile.Opcode;
import java.lang.classfile.TypeKind;
import java.lang.classfile.attribute.RuntimeVisibleAnnotationsAttribute; import java.lang.classfile.attribute.RuntimeVisibleAnnotationsAttribute;
import java.lang.constant.ClassDesc; import java.lang.constant.ClassDesc;
import java.lang.constant.ConstantDesc; import java.lang.constant.ConstantDesc;
import java.lang.constant.DynamicConstantDesc; import java.lang.constant.DynamicConstantDesc;
import java.lang.constant.MethodTypeDesc; import java.lang.constant.MethodTypeDesc;
import java.lang.foreign.*; import java.lang.foreign.AddressLayout;
import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
@ -69,9 +73,10 @@ import java.util.Arrays;
import java.util.Deque; import java.util.Deque;
import java.util.List; import java.util.List;
import static java.lang.constant.ConstantDescs.*;
import static java.lang.classfile.ClassFile.*; import static java.lang.classfile.ClassFile.*;
import static java.lang.classfile.TypeKind.*; import static java.lang.classfile.TypeKind.LONG;
import static java.lang.classfile.TypeKind.REFERENCE;
import static java.lang.constant.ConstantDescs.*;
import static jdk.internal.constant.ConstantUtils.*; import static jdk.internal.constant.ConstantUtils.*;
public class BindingSpecializer { public class BindingSpecializer {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,6 @@
package jdk.internal.foreign.abi; package jdk.internal.foreign.abi;
import java.lang.foreign.FunctionDescriptor; import java.lang.foreign.FunctionDescriptor;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.util.List; import java.util.List;
import java.util.stream.Stream; import java.util.stream.Stream;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package jdk.internal.foreign.abi; package jdk.internal.foreign.abi;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
import jdk.internal.foreign.abi.Binding.*; import jdk.internal.foreign.abi.Binding.Allocate;
import jdk.internal.foreign.abi.Binding.BoxAddress; import jdk.internal.foreign.abi.Binding.BoxAddress;
import jdk.internal.foreign.abi.Binding.BufferLoad; import jdk.internal.foreign.abi.Binding.BufferLoad;
import jdk.internal.foreign.abi.Binding.BufferStore; import jdk.internal.foreign.abi.Binding.BufferStore;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,8 @@ package jdk.internal.foreign.abi;
import jdk.internal.access.JavaLangInvokeAccess; import jdk.internal.access.JavaLangInvokeAccess;
import jdk.internal.access.SharedSecrets; import jdk.internal.access.SharedSecrets;
import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.MemorySessionImpl;
import jdk.internal.invoke.MhUtil; import jdk.internal.invoke.MhUtil;
import java.lang.foreign.AddressLayout; import java.lang.foreign.AddressLayout;
@ -41,13 +43,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.internal.foreign.AbstractMemorySegmentImpl; import static java.lang.invoke.MethodHandles.*;
import jdk.internal.foreign.MemorySessionImpl;
import static java.lang.invoke.MethodHandles.collectArguments;
import static java.lang.invoke.MethodHandles.foldArguments;
import static java.lang.invoke.MethodHandles.identity;
import static java.lang.invoke.MethodHandles.insertArguments;
import static java.lang.invoke.MethodType.methodType; import static java.lang.invoke.MethodType.methodType;
public class DowncallLinker { public class DowncallLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,9 +44,9 @@ import jdk.internal.vm.annotation.ForceInline;
import java.lang.foreign.AddressLayout; import java.lang.foreign.AddressLayout;
import java.lang.foreign.Arena; import java.lang.foreign.Arena;
import java.lang.foreign.Linker;
import java.lang.foreign.FunctionDescriptor; import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout; import java.lang.foreign.GroupLayout;
import java.lang.foreign.Linker;
import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment; import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySegment.Scope; import java.lang.foreign.MemorySegment.Scope;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,9 +38,7 @@ import java.util.Objects;
import java.util.function.UnaryOperator; import java.util.function.UnaryOperator;
import java.util.stream.Stream; import java.util.stream.Stream;
import static java.lang.invoke.MethodHandles.exactInvoker; import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodHandles.insertArguments;
import static java.lang.invoke.MethodHandles.lookup;
import static java.lang.invoke.MethodType.methodType; import static java.lang.invoke.MethodType.methodType;
public class UpcallLinker { public class UpcallLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,12 +24,12 @@
*/ */
package jdk.internal.foreign.abi; package jdk.internal.foreign.abi;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.Arena;
import jdk.internal.foreign.MemorySessionImpl; import jdk.internal.foreign.MemorySessionImpl;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
import java.lang.foreign.Arena;
import java.lang.foreign.MemorySegment;
public final class UpcallStubs { public final class UpcallStubs {
private UpcallStubs() { private UpcallStubs() {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, Arm Limited. All rights reserved. * Copyright (c) 2019, 2022, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -25,11 +25,7 @@
*/ */
package jdk.internal.foreign.abi.aarch64; package jdk.internal.foreign.abi.aarch64;
import java.lang.foreign.AddressLayout; import jdk.internal.foreign.Utils;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import jdk.internal.foreign.abi.ABIDescriptor; import jdk.internal.foreign.abi.ABIDescriptor;
import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory; import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory;
import jdk.internal.foreign.abi.Binding; import jdk.internal.foreign.abi.Binding;
@ -42,16 +38,21 @@ import jdk.internal.foreign.abi.VMStorage;
import jdk.internal.foreign.abi.aarch64.linux.LinuxAArch64CallArranger; import jdk.internal.foreign.abi.aarch64.linux.LinuxAArch64CallArranger;
import jdk.internal.foreign.abi.aarch64.macos.MacOsAArch64CallArranger; import jdk.internal.foreign.abi.aarch64.macos.MacOsAArch64CallArranger;
import jdk.internal.foreign.abi.aarch64.windows.WindowsAArch64CallArranger; import jdk.internal.foreign.abi.aarch64.windows.WindowsAArch64CallArranger;
import jdk.internal.foreign.Utils;
import java.lang.foreign.AddressLayout;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.*;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.Regs.*; import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.Regs.*;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.StorageType;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.abiFor;
/** /**
* For the AArch64 C ABI specifically, this class uses CallingSequenceBuilder * For the AArch64 C ABI specifically, this class uses CallingSequenceBuilder

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021, Arm Limited. All rights reserved. * Copyright (c) 2020, 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64; package jdk.internal.foreign.abi.aarch64;
import java.lang.foreign.GroupLayout; import java.lang.foreign.GroupLayout;
@ -30,8 +31,8 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment; import java.lang.foreign.MemorySegment;
import java.lang.foreign.SequenceLayout; import java.lang.foreign.SequenceLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
public enum TypeClass { public enum TypeClass {
STRUCT_REGISTER, STRUCT_REGISTER,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Arm Limited. All rights reserved. * Copyright (c) 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,10 +23,11 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64.linux; package jdk.internal.foreign.abi.aarch64.linux;
import jdk.internal.foreign.abi.aarch64.CallArranger;
import jdk.internal.foreign.abi.ABIDescriptor; import jdk.internal.foreign.abi.ABIDescriptor;
import jdk.internal.foreign.abi.aarch64.CallArranger;
/** /**
* AArch64 CallArranger specialized for Linux ABI. * AArch64 CallArranger specialized for Linux ABI.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2021, Arm Limited. All rights reserved. * Copyright (c) 2019, 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64.linux; package jdk.internal.foreign.abi.aarch64.linux;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -35,7 +36,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Arm Limited. All rights reserved. * Copyright (c) 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,10 +23,11 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64.macos; package jdk.internal.foreign.abi.aarch64.macos;
import jdk.internal.foreign.abi.aarch64.CallArranger;
import jdk.internal.foreign.abi.ABIDescriptor; import jdk.internal.foreign.abi.ABIDescriptor;
import jdk.internal.foreign.abi.aarch64.CallArranger;
/** /**
* AArch64 CallArranger specialized for macOS ABI. * AArch64 CallArranger specialized for macOS ABI.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Arm Limited. All rights reserved. * Copyright (c) 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64.macos; package jdk.internal.foreign.abi.aarch64.macos;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -35,7 +36,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Arm Limited. All rights reserved. * Copyright (c) 2021, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,17 +23,18 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64.windows; package jdk.internal.foreign.abi.aarch64.windows;
import jdk.internal.foreign.abi.aarch64.CallArranger;
import jdk.internal.foreign.abi.aarch64.TypeClass;
import jdk.internal.foreign.abi.ABIDescriptor; import jdk.internal.foreign.abi.ABIDescriptor;
import jdk.internal.foreign.abi.VMStorage; import jdk.internal.foreign.abi.VMStorage;
import jdk.internal.foreign.abi.aarch64.CallArranger;
import jdk.internal.foreign.abi.aarch64.TypeClass;
import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemoryLayout;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.*;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.Regs.*; import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.Regs.*;
import static jdk.internal.foreign.abi.aarch64.AArch64Architecture.abiFor;
/** /**
* AArch64 CallArranger specialized for Windows ABI. * AArch64 CallArranger specialized for Windows ABI.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Arm Limited. All rights reserved. * Copyright (c) 2021, Arm Limited. All rights reserved.
* Copyright (c) 2021, 2022, Microsoft. All rights reserved. * Copyright (c) 2021, 2022, Microsoft. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -24,6 +24,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.aarch64.windows; package jdk.internal.foreign.abi.aarch64.windows;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -36,7 +37,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,6 +22,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.fallback; package jdk.internal.foreign.abi.fallback;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
@ -42,11 +43,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.function.Predicate; import java.util.function.Predicate;
import static java.lang.foreign.ValueLayout.ADDRESS; import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.ValueLayout.JAVA_BYTE;
import static java.lang.foreign.ValueLayout.JAVA_INT;
import static java.lang.foreign.ValueLayout.JAVA_LONG;
import static java.lang.foreign.ValueLayout.JAVA_SHORT;
/** /**
* typedef struct _ffi_type * typedef struct _ffi_type

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,8 +22,16 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.fallback; package jdk.internal.foreign.abi.fallback;
import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.MemorySessionImpl;
import jdk.internal.foreign.abi.AbstractLinker;
import jdk.internal.foreign.abi.CapturableState;
import jdk.internal.foreign.abi.LinkerOptions;
import jdk.internal.foreign.abi.SharedUtils;
import java.lang.foreign.AddressLayout; import java.lang.foreign.AddressLayout;
import java.lang.foreign.Arena; import java.lang.foreign.Arena;
import java.lang.foreign.FunctionDescriptor; import java.lang.foreign.FunctionDescriptor;
@ -33,29 +41,16 @@ import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator; import java.lang.foreign.SegmentAllocator;
import java.lang.foreign.SequenceLayout; import java.lang.foreign.SequenceLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import static java.lang.foreign.ValueLayout.ADDRESS;
import static java.lang.foreign.ValueLayout.JAVA_BOOLEAN;
import static java.lang.foreign.ValueLayout.JAVA_BYTE;
import static java.lang.foreign.ValueLayout.JAVA_CHAR;
import static java.lang.foreign.ValueLayout.JAVA_DOUBLE;
import static java.lang.foreign.ValueLayout.JAVA_FLOAT;
import static java.lang.foreign.ValueLayout.JAVA_INT;
import static java.lang.foreign.ValueLayout.JAVA_LONG;
import static java.lang.foreign.ValueLayout.JAVA_SHORT;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import static java.lang.invoke.MethodHandles.foldArguments;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.lang.ref.Reference; import java.lang.ref.Reference;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import jdk.internal.foreign.AbstractMemorySegmentImpl;
import jdk.internal.foreign.MemorySessionImpl; import static java.lang.foreign.ValueLayout.*;
import jdk.internal.foreign.abi.AbstractLinker; import static java.lang.invoke.MethodHandles.foldArguments;
import jdk.internal.foreign.abi.CapturableState;
import jdk.internal.foreign.abi.LinkerOptions;
import jdk.internal.foreign.abi.SharedUtils;
public final class FallbackLinker extends AbstractLinker { public final class FallbackLinker extends AbstractLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 SAP SE. All rights reserved. * Copyright (c) 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.ppc64; package jdk.internal.foreign.abi.ppc64;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
@ -50,8 +51,9 @@ import java.lang.invoke.MethodType;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import static jdk.internal.foreign.abi.ppc64.PPC64Architecture.*;
import static jdk.internal.foreign.abi.ppc64.PPC64Architecture.Regs.*; import static jdk.internal.foreign.abi.ppc64.PPC64Architecture.Regs.*;
import static jdk.internal.foreign.abi.ppc64.PPC64Architecture.StorageType;
import static jdk.internal.foreign.abi.ppc64.PPC64Architecture.abiFor;
/** /**
* For the PPC64 C ABI specifically, this class uses CallingSequenceBuilder * For the PPC64 C ABI specifically, this class uses CallingSequenceBuilder

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 SAP SE. All rights reserved. * Copyright (c) 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.ppc64; package jdk.internal.foreign.abi.ppc64;
import java.lang.foreign.GroupLayout; import java.lang.foreign.GroupLayout;
@ -30,8 +31,8 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment; import java.lang.foreign.MemorySegment;
import java.lang.foreign.SequenceLayout; import java.lang.foreign.SequenceLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
public enum TypeClass { public enum TypeClass {
STRUCT_REGISTER, STRUCT_REGISTER,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 SAP SE. All rights reserved. * Copyright (c) 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.ppc64.linux; package jdk.internal.foreign.abi.ppc64.linux;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -35,7 +36,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
public final class LinuxPPC64Linker extends AbstractLinker { public final class LinuxPPC64Linker extends AbstractLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 SAP SE. All rights reserved. * Copyright (c) 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.ppc64.linux; package jdk.internal.foreign.abi.ppc64.linux;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -35,7 +36,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
public final class LinuxPPC64leLinker extends AbstractLinker { public final class LinuxPPC64leLinker extends AbstractLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Institute of Software, Chinese Academy of Sciences. * Copyright (c) 2023, Institute of Software, Chinese Academy of Sciences.
* All rights reserved. * All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -28,11 +28,7 @@
package jdk.internal.foreign.abi.riscv64.linux; package jdk.internal.foreign.abi.riscv64.linux;
import java.lang.foreign.AddressLayout; import jdk.internal.foreign.Utils;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import jdk.internal.foreign.abi.ABIDescriptor; import jdk.internal.foreign.abi.ABIDescriptor;
import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory; import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory;
import jdk.internal.foreign.abi.Binding; import jdk.internal.foreign.abi.Binding;
@ -42,17 +38,21 @@ import jdk.internal.foreign.abi.DowncallLinker;
import jdk.internal.foreign.abi.LinkerOptions; import jdk.internal.foreign.abi.LinkerOptions;
import jdk.internal.foreign.abi.SharedUtils; import jdk.internal.foreign.abi.SharedUtils;
import jdk.internal.foreign.abi.VMStorage; import jdk.internal.foreign.abi.VMStorage;
import jdk.internal.foreign.Utils;
import java.lang.foreign.AddressLayout;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import static jdk.internal.foreign.abi.riscv64.linux.TypeClass.*;
import static jdk.internal.foreign.abi.riscv64.RISCV64Architecture.*;
import static jdk.internal.foreign.abi.riscv64.RISCV64Architecture.Regs.*; import static jdk.internal.foreign.abi.riscv64.RISCV64Architecture.Regs.*;
import static jdk.internal.foreign.abi.riscv64.RISCV64Architecture.*;
import static jdk.internal.foreign.abi.riscv64.linux.TypeClass.*;
/** /**
* For the RISCV64 C ABI specifically, this class uses CallingSequenceBuilder * For the RISCV64 C ABI specifically, this class uses CallingSequenceBuilder

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Institute of Software, Chinese Academy of Sciences. * Copyright (c) 2023, Institute of Software, Chinese Academy of Sciences.
* All rights reserved. * All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -37,7 +37,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
public final class LinuxRISCV64Linker extends AbstractLinker { public final class LinuxRISCV64Linker extends AbstractLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 IBM Corp. All rights reserved. * Copyright (c) 2023 IBM Corp. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,13 +23,10 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.s390.linux; package jdk.internal.foreign.abi.s390.linux;
import java.lang.foreign.AddressLayout; import jdk.internal.foreign.Utils;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import jdk.internal.foreign.abi.ABIDescriptor; import jdk.internal.foreign.abi.ABIDescriptor;
import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory; import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory;
import jdk.internal.foreign.abi.Binding; import jdk.internal.foreign.abi.Binding;
@ -39,8 +36,12 @@ import jdk.internal.foreign.abi.DowncallLinker;
import jdk.internal.foreign.abi.LinkerOptions; import jdk.internal.foreign.abi.LinkerOptions;
import jdk.internal.foreign.abi.SharedUtils; import jdk.internal.foreign.abi.SharedUtils;
import jdk.internal.foreign.abi.VMStorage; import jdk.internal.foreign.abi.VMStorage;
import jdk.internal.foreign.Utils;
import java.lang.foreign.AddressLayout;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.util.List; import java.util.List;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 IBM Corp. All rights reserved. * Copyright (c) 2023 IBM Corp. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.s390.linux; package jdk.internal.foreign.abi.s390.linux;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -34,7 +35,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
public final class LinuxS390Linker extends AbstractLinker { public final class LinuxS390Linker extends AbstractLinker {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 IBM Corp. All rights reserved. * Copyright (c) 2023 IBM Corp. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -23,6 +23,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.s390.linux; package jdk.internal.foreign.abi.s390.linux;
import java.lang.foreign.GroupLayout; import java.lang.foreign.GroupLayout;
@ -30,8 +31,8 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment; import java.lang.foreign.MemorySegment;
import java.lang.foreign.SequenceLayout; import java.lang.foreign.SequenceLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
public enum TypeClass { public enum TypeClass {
STRUCT_REGISTER, STRUCT_REGISTER,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,6 +23,7 @@
* questions. * questions.
* *
*/ */
package jdk.internal.foreign.abi.x64.sysv; package jdk.internal.foreign.abi.x64.sysv;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
@ -50,8 +51,8 @@ import java.util.List;
import java.util.Optional; import java.util.Optional;
import static jdk.internal.foreign.abi.Binding.vmStore; import static jdk.internal.foreign.abi.Binding.vmStore;
import static jdk.internal.foreign.abi.x64.X86_64Architecture.*;
import static jdk.internal.foreign.abi.x64.X86_64Architecture.Regs.*; import static jdk.internal.foreign.abi.x64.X86_64Architecture.Regs.*;
import static jdk.internal.foreign.abi.x64.X86_64Architecture.StorageType;
/** /**
* For the SysV x64 C ABI specifically, this class uses namely CallingSequenceBuilder * For the SysV x64 C ABI specifically, this class uses namely CallingSequenceBuilder

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,8 +22,8 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.x64.sysv;
package jdk.internal.foreign.abi.x64.sysv;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
import jdk.internal.foreign.abi.LinkerOptions; import jdk.internal.foreign.abi.LinkerOptions;
@ -34,7 +34,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,8 +22,11 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.x64.sysv; package jdk.internal.foreign.abi.x64.sysv;
import jdk.internal.foreign.Utils;
import java.lang.foreign.GroupLayout; import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment; import java.lang.foreign.MemorySegment;
@ -31,8 +34,6 @@ import java.lang.foreign.PaddingLayout;
import java.lang.foreign.SequenceLayout; import java.lang.foreign.SequenceLayout;
import java.lang.foreign.StructLayout; import java.lang.foreign.StructLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import jdk.internal.foreign.Utils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,6 +22,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.x64.windows; package jdk.internal.foreign.abi.x64.windows;
import jdk.internal.foreign.Utils; import jdk.internal.foreign.Utils;
@ -46,8 +47,9 @@ import java.lang.invoke.MethodType;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import static jdk.internal.foreign.abi.x64.X86_64Architecture.*; import static jdk.internal.foreign.abi.x64.X86_64Architecture.INSTANCE;
import static jdk.internal.foreign.abi.x64.X86_64Architecture.Regs.*; import static jdk.internal.foreign.abi.x64.X86_64Architecture.Regs.*;
import static jdk.internal.foreign.abi.x64.X86_64Architecture.StorageType;
/** /**
* For the Windowx x64 C ABI specifically, this class uses CallingSequenceBuilder * For the Windowx x64 C ABI specifically, this class uses CallingSequenceBuilder

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -22,6 +22,7 @@
* or visit www.oracle.com if you need additional information or have any * or visit www.oracle.com if you need additional information or have any
* questions. * questions.
*/ */
package jdk.internal.foreign.abi.x64.windows; package jdk.internal.foreign.abi.x64.windows;
import jdk.internal.foreign.abi.AbstractLinker; import jdk.internal.foreign.abi.AbstractLinker;
@ -33,7 +34,6 @@ import java.lang.foreign.MemoryLayout;
import java.lang.foreign.ValueLayout; import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.nio.ByteOrder;
import java.util.Map; import java.util.Map;
/** /**