13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @modules jdk.incubator.foreign/jdk.incubator.foreign.unsafe
28 * jdk.incubator.foreign/jdk.internal.foreign
29 * jdk.incubator.foreign/jdk.internal.foreign.abi
30 * java.base/sun.security.action
31 * @build NativeTestHelper CallGeneratorHelper TestDowncall
32 *
33 * @run testng/othervm -Dforeign.restricted=permit TestDowncall
34 */
35
36 import jdk.incubator.foreign.CSupport;
37 import jdk.incubator.foreign.FunctionDescriptor;
38 import jdk.incubator.foreign.LibraryLookup;
39 import jdk.incubator.foreign.MemoryAddress;
40 import jdk.incubator.foreign.MemoryLayout;
41 import jdk.incubator.foreign.ForeignLinker;
42
43 import java.lang.invoke.MethodHandle;
44 import java.lang.invoke.MethodType;
45 import java.util.ArrayList;
46 import java.util.List;
47 import java.util.function.Consumer;
48
49 import org.testng.annotations.*;
50
51 public class TestDowncall extends CallGeneratorHelper {
52
53 static LibraryLookup lib = LibraryLookup.ofLibrary("TestDowncall");
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @modules jdk.incubator.foreign/jdk.incubator.foreign.unsafe
28 * jdk.incubator.foreign/jdk.internal.foreign
29 * jdk.incubator.foreign/jdk.internal.foreign.abi
30 * java.base/sun.security.action
31 * @build NativeTestHelper CallGeneratorHelper TestDowncall
32 *
33 * @run testng/othervm
34 * -Dforeign.restricted=permit
35 * TestDowncall
36 * @run testng/othervm
37 * -Dforeign.restricted=permit
38 * -Djdk.internal.foreign.ProgrammableInvoker.NO_SPEC=true
39 * TestDowncall
40 */
41
42 import jdk.incubator.foreign.CSupport;
43 import jdk.incubator.foreign.FunctionDescriptor;
44 import jdk.incubator.foreign.LibraryLookup;
45 import jdk.incubator.foreign.MemoryAddress;
46 import jdk.incubator.foreign.MemoryLayout;
47 import jdk.incubator.foreign.ForeignLinker;
48
49 import java.lang.invoke.MethodHandle;
50 import java.lang.invoke.MethodType;
51 import java.util.ArrayList;
52 import java.util.List;
53 import java.util.function.Consumer;
54
55 import org.testng.annotations.*;
56
57 public class TestDowncall extends CallGeneratorHelper {
58
59 static LibraryLookup lib = LibraryLookup.ofLibrary("TestDowncall");
|