Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.incubator.foreign.jmod - JDK Incubator Foreign
JDK 17 jdk.incubator.foreign.jmod is the JMOD file for JDK 17 HTTP Server module.
JDK 17 Incubator Foreign module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.incubator.foreign.jmod.
JDK 17 Incubator Foreign module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Incubator Foreign module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.incubator.foreign.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/foreign/abi/CallingSequenceBuilder.java
/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.internal.foreign.abi; import jdk.incubator.foreign.FunctionDescriptor; import jdk.incubator.foreign.MemoryLayout; import sun.security.action.GetPropertyAction; import java.lang.invoke.MethodType; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.EnumSet; import java.util.List; import java.util.Set; import static jdk.internal.foreign.abi.Binding.Tag.*; public class CallingSequenceBuilder { private static final boolean VERIFY_BINDINGS = Boolean.parseBoolean( GetPropertyAction.privilegedGetProperty("jdk.incubator.foreign.VERIFY_BINDINGS", "true")); private boolean isTrivial; private final boolean forUpcall; private final List<List<Binding>> inputBindings = new ArrayList<>(); private List<Binding> outputBindings = List.of(); private MethodType mt = MethodType.methodType(void.class); private FunctionDescriptor desc = FunctionDescriptor.ofVoid(); public CallingSequenceBuilder(boolean forUpcall) { this.forUpcall = forUpcall; } public final CallingSequenceBuilder addArgumentBindings(Class<?> carrier, MemoryLayout layout, List<Binding> bindings) { verifyBindings(true, carrier, bindings); inputBindings.add(bindings); mt = mt.appendParameterTypes(carrier); desc = desc.withAppendedArgumentLayouts(layout); return this; } public CallingSequenceBuilder setReturnBindings(Class<?> carrier, MemoryLayout layout, List<Binding> bindings) { verifyBindings(false, carrier, bindings); this.outputBindings = bindings; mt = mt.changeReturnType(carrier); desc = desc.withReturnLayout(layout); return this; } public CallingSequenceBuilder setTrivial(boolean isTrivial) { this.isTrivial = isTrivial; return this; } public CallingSequence build() { return new CallingSequence(mt, desc, isTrivial, inputBindings, outputBindings); } private void verifyBindings(boolean forArguments, Class<?> carrier, List<Binding> bindings) { if (VERIFY_BINDINGS) { if (forUpcall == forArguments) { verifyBoxBindings(carrier, bindings); } else { verifyUnboxBindings(carrier, bindings); } } } private static final Set<Binding.Tag> UNBOX_TAGS = EnumSet.of( VM_STORE, //VM_LOAD, //BUFFER_STORE, BUFFER_LOAD, COPY_BUFFER, //ALLOC_BUFFER, //BOX_ADDRESS, UNBOX_ADDRESS, BASE_ADDRESS, //TO_SEGMENT, DUP ); private static void verifyUnboxBindings(Class<?> inType, List<Binding> bindings) { Deque<Class<?>> stack = new ArrayDeque<>(); stack.push(inType); for (Binding b : bindings) { if (!UNBOX_TAGS.contains(b.tag())) throw new IllegalArgumentException("Unexpected operator: " + b); b.verify(stack); } if (!stack.isEmpty()) { throw new IllegalArgumentException("Stack must be empty after recipe"); } } private static final Set<Binding.Tag> BOX_TAGS = EnumSet.of( //VM_STORE, VM_LOAD, BUFFER_STORE, //BUFFER_LOAD, COPY_BUFFER, ALLOC_BUFFER, BOX_ADDRESS, //UNBOX_ADDRESS, //BASE_ADDRESS, TO_SEGMENT, DUP ); private static void verifyBoxBindings(Class<?> expectedOutType, List<Binding> bindings) { Deque<Class<?>> stack = new ArrayDeque<>(); for (Binding b : bindings) { if (!BOX_TAGS.contains(b.tag())) throw new IllegalArgumentException("Unexpected operator: " + b); b.verify(stack); } if (stack.size() != 1) { throw new IllegalArgumentException("Stack must contain exactly 1 value"); } Class<?> actualOutType = stack.pop(); SharedUtils.checkType(actualOutType, expectedOutType); } }
⏎ jdk/internal/foreign/abi/CallingSequenceBuilder.java
Or download all of them as a single archive file:
File name: jdk.incubator.foreign-17.0.5-src.zip File size: 168767 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.incubator.vector.jmod - JDK Incubator Vector
2023-10-04, ∼7221🔥, 0💬
Popular Posts:
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...
MXP1 is a stable XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but c...
JDK 17 java.xml.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) module. JDK 17 XML...
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...
Jettison is a collection of Java APIs (like STaX and DOM) which read and write JSON. This allows nea...