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

public Class UpcallLinker

extends Object
Class Inheritance
Imports
jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory, java.lang.foreign.Arena, .MemorySegment, java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, java.util.Arrays, .Map, .Objects, java.util.function.UnaryOperator, java.util.stream.Stream

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record
private static record

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final MethodHandle
private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Binding.VMLoad[]
private static Stream<Binding.VMLoad>
private static void
private static Object
public static AbstractLinker.UpcallStubFactory
makeFactory(MethodType targetType, ABIDescriptor abi, CallingSequence callingSequence)

pack-priv static native long
makeUpcallStub(MethodHandle mh, ABIDescriptor abi, UpcallLinker.CallRegs conv, boolean needsReturnBuffer, long returnBufferSize)

private static native void
private static Binding.VMStore[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG
MH_invokeInterpBindingsback to summary
private static final MethodHandle MH_invokeInterpBindings
USE_SPECback to summary
private static final boolean USE_SPEC

Constructor Detail

UpcallLinkerback to summary
public UpcallLinker()

Method Detail

argMoveBindingsback to summary
private static Binding.VMLoad[] argMoveBindings(CallingSequence callingSequence)
argMoveBindingsStreamback to summary
private static Stream<Binding.VMLoad> argMoveBindingsStream(CallingSequence callingSequence)
checkPrimitiveback to summary
private static void checkPrimitive(MethodType type)
invokeInterpBindingsback to summary
private static Object invokeInterpBindings(MethodHandle leaf, Object[] lowLevelArgs, UpcallLinker.InvocationData invData) throws Throwable
makeFactoryback to summary
public static AbstractLinker.UpcallStubFactory makeFactory(MethodType targetType, ABIDescriptor abi, CallingSequence callingSequence)
makeUpcallStubback to summary
pack-priv static native long makeUpcallStub(MethodHandle mh, ABIDescriptor abi, UpcallLinker.CallRegs conv, boolean needsReturnBuffer, long returnBufferSize)
registerNativesback to summary
private static native void registerNatives()
retMoveBindingsback to summary
private static Binding.VMStore[] retMoveBindings(CallingSequence callingSequence)
jdk.internal.foreign.abi back to summary

private final Record UpcallLinker.CallRegs

extends Record
Class Inheritance
Record Components
argRegs:VMStorage[] 
retRegs:VMStorage[] 

Field Summary

Modifier and TypeField and Description
private final VMStorage[]
argRegs

Record Component accessed by argRegs().

private final VMStorage[]
retRegs

Record Component accessed by retRegs().

Constructor Summary

AccessConstructor and Description
private
CallRegs(VMStorage[] argRegs, VMStorage[] retRegs)

Method Summary

Modifier and TypeMethod and Description
public VMStorage[]
argRegs()

Record Component getter of argRegs.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public VMStorage[]
retRegs()

Record Component getter of retRegs.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

argRegsback to summary
private final VMStorage[] argRegs

Record Component accessed by argRegs().

retRegsback to summary
private final VMStorage[] retRegs

Record Component accessed by retRegs().

Constructor Detail

CallRegsback to summary
private CallRegs(VMStorage[] argRegs, VMStorage[] retRegs)

Method Detail

argRegsback to summary
public VMStorage[] argRegs()

Record Component getter of argRegs.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

retRegsback to summary
public VMStorage[] retRegs()

Record Component getter of retRegs.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

jdk.internal.foreign.abi back to summary

private final Record UpcallLinker.InvocationData

extends Record
Class Inheritance
Record Components
argIndexMap:Map<VMStorage, Integer> 
retIndexMap:Map<VMStorage, Integer> 
callingSequence:CallingSequence 
retMoves:Binding.VMStore[] 
abi:ABIDescriptor 

Field Summary

Modifier and TypeField and Description
private final ABIDescriptor
abi

Record Component accessed by abi().

private final Map<VMStorage, Integer>
argIndexMap

Record Component accessed by argIndexMap().

private final CallingSequence
callingSequence

Record Component accessed by callingSequence().

private final Map<VMStorage, Integer>
retIndexMap

Record Component accessed by retIndexMap().

private final Binding.VMStore[]
retMoves

Record Component accessed by retMoves().

Constructor Summary

AccessConstructor and Description
private
InvocationData(Map<VMStorage, Integer> argIndexMap, Map<VMStorage, Integer> retIndexMap, CallingSequence callingSequence, Binding.VMStore[] retMoves, ABIDescriptor abi)

Method Summary

Modifier and TypeMethod and Description
public ABIDescriptor
abi()

Record Component getter of abi.

public Map<VMStorage, Integer>
argIndexMap()

Record Component getter of argIndexMap.

public CallingSequence
callingSequence()

Record Component getter of callingSequence.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Map<VMStorage, Integer>
retIndexMap()

Record Component getter of retIndexMap.

public Binding.VMStore[]
retMoves()

Record Component getter of retMoves.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

abiback to summary
private final ABIDescriptor abi

Record Component accessed by abi().

argIndexMapback to summary
private final Map<VMStorage, Integer> argIndexMap

Record Component accessed by argIndexMap().

callingSequenceback to summary
private final CallingSequence callingSequence

Record Component accessed by callingSequence().

retIndexMapback to summary
private final Map<VMStorage, Integer> retIndexMap

Record Component accessed by retIndexMap().

retMovesback to summary
private final Binding.VMStore[] retMoves

Record Component accessed by retMoves().

Constructor Detail

InvocationDataback to summary
private InvocationData(Map<VMStorage, Integer> argIndexMap, Map<VMStorage, Integer> retIndexMap, CallingSequence callingSequence, Binding.VMStore[] retMoves, ABIDescriptor abi)

Method Detail

abiback to summary
public ABIDescriptor abi()

Record Component getter of abi.

argIndexMapback to summary
public Map<VMStorage, Integer> argIndexMap()

Record Component getter of argIndexMap.

callingSequenceback to summary
public CallingSequence callingSequence()

Record Component getter of callingSequence.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

retIndexMapback to summary
public Map<VMStorage, Integer> retIndexMap()

Record Component getter of retIndexMap.

retMovesback to summary
public Binding.VMStore[] retMoves()

Record Component getter of retMoves.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.