APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.foreign.abi

public Class BindingSpecializer

extends Object
Class Inheritance
Imports
jdk.internal.foreign.AbstractMemorySegmentImpl, .MemorySessionImpl, .Utils, jdk.internal.foreign.abi.Binding.Allocate, .Binding.BoxAddress, .Binding.BufferLoad, .Binding.BufferStore, .Binding.Cast, .Binding.Copy, .Binding.Dup, .Binding.SegmentBase, .Binding.SegmentOffset, .Binding.ShiftLeft, .Binding.ShiftRight, .Binding.VMLoad, .Binding.VMStore, jdk.internal.vm.annotation.ForceInline, java.io.IOException, java.lang.classfile.Annotation, .ClassFile, .CodeBuilder, .Label, .Opcode, .TypeKind, java.lang.classfile.attribute.RuntimeVisibleAnnotationsAttribute, java.lang.constant.ClassDesc, .ConstantDesc, .DynamicConstantDesc, .MethodTypeDesc, java.lang.foreign.AddressLayout, .Arena, .MemoryLayout, .MemorySegment, .SegmentAllocator, .ValueLayout, java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, java.lang.reflect.ClassFileFormatVersion, java.nio.file.Files, .Path, java.util.ArrayDeque, .ArrayList, .Arrays, .Deque, .List

Field Summary

Modifier and TypeField and Description
private final ABIDescriptor
private final MethodType
private final CallingSequence
private final CodeBuilder
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ConstantDesc
private static final String
private static final String
private static final int
private int
private int
private static final String
private int[]
private List<Class<?>>
private final MethodType
private static final String
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private static final MethodTypeDesc
private int
private static final boolean
private long
private int
private int
private int
private static final int
private int[]
private Deque<Class<?>>

Constructor Summary

AccessConstructor and Description
private
BindingSpecializer(CodeBuilder cb, MethodType callerMethodType, CallingSequence callingSequence, ABIDescriptor abi, MethodType leafType)

Method Summary

Modifier and TypeMethod and Description
private boolean
private void
doBindings(List<Binding> bindings)

private void
private void
emitAllocateCall(long size, long alignment)

private void
private void
private void
private void
private void
private void
private void
private void
private void
private void
emitDup(Class<?> type)

private void
private void
private void
private void
private ClassDesc
private void
private void
private void
emitSaveReturnValue(Class<?> storeType)

private void
private void
private void
emitSetOutput(Class<?> storeType)

private void
private void
private void
private void
private static String
private Class<?>
popType(Class<?> expected)

private void
pushType(Class<?> type)

private boolean
shouldAcquire(int paramIndex)

private void
pack-priv static MethodHandle
private static byte[]
specializeHelper(MethodType leafType, MethodType callerMethodType, CallingSequence callingSequence, ABIDescriptor abi)

pack-priv static MethodHandle
specializeUpcall(MethodType targetType, CallingSequence callingSequence, ABIDescriptor abi)

private static String
private static ClassDesc
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abiback to summary
private final ABIDescriptor abi
callerMethodTypeback to summary
private final MethodType callerMethodType
callingSequenceback to summary
private final CallingSequence callingSequence
cbback to summary
private final CodeBuilder cb
CD_AbstractMemorySegmentImplback to summary
private static final ClassDesc CD_AbstractMemorySegmentImpl
CD_AddressLayoutback to summary
private static final ClassDesc CD_AddressLayout
CD_Arenaback to summary
private static final ClassDesc CD_Arena
CD_ForceInlineback to summary
private static final ClassDesc CD_ForceInline
CD_MemorySegmentback to summary
private static final ClassDesc CD_MemorySegment
CD_MemorySegment_Scopeback to summary
private static final ClassDesc CD_MemorySegment_Scope
CD_MemorySessionImplback to summary
private static final ClassDesc CD_MemorySessionImpl
CD_SegmentAllocatorback to summary
private static final ClassDesc CD_SegmentAllocator
CD_SharedUtilsback to summary
private static final ClassDesc CD_SharedUtils
CD_Utilsback to summary
private static final ClassDesc CD_Utils
CD_ValueLayoutback to summary
private static final ClassDesc CD_ValueLayout
CD_ValueLayout_OfBooleanback to summary
private static final ClassDesc CD_ValueLayout_OfBoolean
CD_ValueLayout_OfByteback to summary
private static final ClassDesc CD_ValueLayout_OfByte
CD_ValueLayout_OfCharback to summary
private static final ClassDesc CD_ValueLayout_OfChar
CD_ValueLayout_OfDoubleback to summary
private static final ClassDesc CD_ValueLayout_OfDouble
CD_ValueLayout_OfFloatback to summary
private static final ClassDesc CD_ValueLayout_OfFloat
CD_ValueLayout_OfIntback to summary
private static final ClassDesc CD_ValueLayout_OfInt
CD_ValueLayout_OfLongback to summary
private static final ClassDesc CD_ValueLayout_OfLong
CD_ValueLayout_OfShortback to summary
private static final ClassDesc CD_ValueLayout_OfShort
CLASS_DATA_DESCback to summary
private static final ConstantDesc CLASS_DATA_DESC
CLASS_NAME_DOWNCALLback to summary
private static final String CLASS_NAME_DOWNCALL
CLASS_NAME_UPCALLback to summary
private static final String CLASS_NAME_UPCALL
CLASSFILE_VERSIONback to summary
private static final int CLASSFILE_VERSION
contextIdxback to summary
private int contextIdx
curScopeLocalIdxback to summary
private int curScopeLocalIdx
DUMP_CLASSES_DIRback to summary
private static final String DUMP_CLASSES_DIR
leafArgSlotsback to summary
private int[] leafArgSlots
leafArgTypesback to summary
private List<Class<?>> leafArgTypes
leafTypeback to summary
private final MethodType leafType
METHOD_NAMEback to summary
private static final String METHOD_NAME
MTD_ACQUIRE0back to summary
private static final MethodTypeDesc MTD_ACQUIRE0
MTD_ALLOCATEback to summary
private static final MethodTypeDesc MTD_ALLOCATE
MTD_BYTE_TO_BOOLEANback to summary
private static final MethodTypeDesc MTD_BYTE_TO_BOOLEAN
MTD_BYTE_TO_UNSIGNED_LONGback to summary
private static final MethodTypeDesc MTD_BYTE_TO_UNSIGNED_LONG
MTD_CHECK_NATIVEback to summary
private static final MethodTypeDesc MTD_CHECK_NATIVE
MTD_CLOSEback to summary
private static final MethodTypeDesc MTD_CLOSE
MTD_COPYback to summary
private static final MethodTypeDesc MTD_COPY
MTD_HANDLE_UNCAUGHT_EXCEPTIONback to summary
private static final MethodTypeDesc MTD_HANDLE_UNCAUGHT_EXCEPTION
MTD_INTEGER_TO_UNSIGNED_LONGback to summary
private static final MethodTypeDesc MTD_INTEGER_TO_UNSIGNED_LONG
MTD_LONG_TO_ADDRESS_NO_SCOPEback to summary
private static final MethodTypeDesc MTD_LONG_TO_ADDRESS_NO_SCOPE
MTD_LONG_TO_ADDRESS_SCOPEback to summary
private static final MethodTypeDesc MTD_LONG_TO_ADDRESS_SCOPE
MTD_NEW_BOUNDED_ARENAback to summary
private static final MethodTypeDesc MTD_NEW_BOUNDED_ARENA
MTD_NEW_EMPTY_ARENAback to summary
private static final MethodTypeDesc MTD_NEW_EMPTY_ARENA
MTD_RELEASE0back to summary
private static final MethodTypeDesc MTD_RELEASE0
MTD_SCOPEback to summary
private static final MethodTypeDesc MTD_SCOPE
MTD_SESSION_IMPLback to summary
private static final MethodTypeDesc MTD_SESSION_IMPL
MTD_SHORT_TO_UNSIGNED_LONGback to summary
private static final MethodTypeDesc MTD_SHORT_TO_UNSIGNED_LONG
MTD_UNSAFE_GET_BASEback to summary
private static final MethodTypeDesc MTD_UNSAFE_GET_BASE
MTD_UNSAFE_GET_OFFSETback to summary
private static final MethodTypeDesc MTD_UNSAFE_GET_OFFSET
paramIndexback to summary
private int paramIndex
PERFORM_VERIFICATIONback to summary
private static final boolean PERFORM_VERIFICATION
retBufOffsetback to summary
private long retBufOffset
returnAllocatorIdxback to summary
private int returnAllocatorIdx
returnBufferIdxback to summary
private int returnBufferIdx
retValIdxback to summary
private int retValIdx
SCOPE_DEDUP_DEPTHback to summary
private static final int SCOPE_DEDUP_DEPTH
scopeSlotsback to summary
private int[] scopeSlots
typeStackback to summary
private Deque<Class<?>> typeStack

Constructor Detail

BindingSpecializerback to summary
private BindingSpecializer(CodeBuilder cb, MethodType callerMethodType, CallingSequence callingSequence, ABIDescriptor abi, MethodType leafType)

Method Detail

anyArgNeedsScopeback to summary
private boolean anyArgNeedsScope()
doBindingsback to summary
private void doBindings(List<Binding> bindings)
emitAcquireScopeback to summary
private void emitAcquireScope()
emitAllocateCallback to summary
private void emitAllocateCall(long size, long alignment)
emitAllocBufferback to summary
private void emitAllocBuffer(Binding.Allocate binding)
emitBoxAddressback to summary
private void emitBoxAddress(Binding.BoxAddress boxAddress)
emitBufferLoadback to summary
private void emitBufferLoad(Binding.BufferLoad bufferLoad)
emitBufferStoreback to summary
private void emitBufferStore(Binding.BufferStore bufferStore)
emitCastback to summary
private void emitCast(Binding.Cast cast)
emitCleanupback to summary
private void emitCleanup()
emitCloseContextback to summary
private void emitCloseContext()
emitConstZeroback to summary
private void emitConstZero(TypeKind kind)
emitCopyBufferback to summary
private void emitCopyBuffer(Binding.Copy copy)
emitDupback to summary
private void emitDup(Class<?> type)
emitDupBindingback to summary
private void emitDupBinding()
emitGetInputback to summary
private void emitGetInput()
emitLoadInternalAllocatorback to summary
private void emitLoadInternalAllocator()
emitLoadInternalSessionback to summary
private void emitLoadInternalSession()
emitLoadLayoutConstantback to summary
private ClassDesc emitLoadLayoutConstant(Class<?> type)
emitReleaseScopesback to summary
private void emitReleaseScopes()
emitRestoreReturnValueback to summary
private void emitRestoreReturnValue(Class<?> loadType)
emitSaveReturnValueback to summary
private void emitSaveReturnValue(Class<?> storeType)
emitSegmentBaseback to summary
private void emitSegmentBase()
emitSegmentOffsetback to summary
private void emitSegmentOffset(Binding.SegmentOffset segmentOffset)
emitSetOutputback to summary
private void emitSetOutput(Class<?> storeType)
emitShiftLeftback to summary
private void emitShiftLeft(Binding.ShiftLeft shiftLeft)
emitShiftRightback to summary
private void emitShiftRight(Binding.ShiftRight shiftRight)
emitVMLoadback to summary
private void emitVMLoad(Binding.VMLoad vmLoad)
emitVMStoreback to summary
private void emitVMStore(Binding.VMStore vmStore)
escapeForFileNameback to summary
private static String escapeForFileName(String str)
popTypeback to summary
private Class<?> popType(Class<?> expected)
pushTypeback to summary
private void pushType(Class<?> type)
shouldAcquireback to summary
private boolean shouldAcquire(int paramIndex)
specializeback to summary
private void specialize()
specializeDowncallback to summary
pack-priv static MethodHandle specializeDowncall(MethodHandle leafHandle, CallingSequence callingSequence, ABIDescriptor abi)
specializeHelperback to summary
private static byte[] specializeHelper(MethodType leafType, MethodType callerMethodType, CallingSequence callingSequence, ABIDescriptor abi)
specializeUpcallback to summary
pack-priv static MethodHandle specializeUpcall(MethodType targetType, CallingSequence callingSequence, ABIDescriptor abi)
valueLayoutConstantForback to summary
private static String valueLayoutConstantFor(Class<?> type)
valueLayoutTypeForback to summary
private static ClassDesc valueLayoutTypeFor(Class<?> type)