mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8243491: Implementation of Foreign-Memory Access API (Second Incubator)
Upstream latest changes of the Foreign-Memory Access API Co-authored-by: Jorn Vernee <jorn.vernee@oracle.com> Co-authored-by: Mandy Chung <mandy.chung@oracle.com> Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com> Co-authored-by: Peter Levart <peter.levart@gmail.com> Reviewed-by: chegar, psandoz
This commit is contained in:
parent
9b94b9d1a1
commit
f3eb44a94d
94 changed files with 7496 additions and 1388 deletions
|
@ -455,6 +455,16 @@ public abstract class VarHandle implements Constable {
|
|||
return new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
boolean isDirect() {
|
||||
return true;
|
||||
}
|
||||
|
||||
VarHandle asDirect() {
|
||||
return this;
|
||||
}
|
||||
|
||||
VarHandle target() { return null; }
|
||||
|
||||
// Plain accessors
|
||||
|
||||
/**
|
||||
|
@ -1882,7 +1892,7 @@ public abstract class VarHandle implements Constable {
|
|||
*
|
||||
* @return the variable type of variables referenced by this VarHandle
|
||||
*/
|
||||
public final Class<?> varType() {
|
||||
public Class<?> varType() {
|
||||
MethodType typeSet = accessModeType(AccessMode.SET);
|
||||
return typeSet.parameterType(typeSet.parameterCount() - 1);
|
||||
}
|
||||
|
@ -1893,7 +1903,7 @@ public abstract class VarHandle implements Constable {
|
|||
* @return the coordinate types for this VarHandle. The returned
|
||||
* list is unmodifiable
|
||||
*/
|
||||
public final List<Class<?>> coordinateTypes() {
|
||||
public List<Class<?>> coordinateTypes() {
|
||||
MethodType typeGet = accessModeType(AccessMode.GET);
|
||||
return typeGet.parameterList();
|
||||
}
|
||||
|
@ -1958,7 +1968,7 @@ public abstract class VarHandle implements Constable {
|
|||
* signature-polymorphic method of the same name
|
||||
* @return a method handle bound to this VarHandle and the given access mode
|
||||
*/
|
||||
public final MethodHandle toMethodHandle(AccessMode accessMode) {
|
||||
public MethodHandle toMethodHandle(AccessMode accessMode) {
|
||||
MemberName mn = AccessMode.getMemberName(accessMode.ordinal(), vform);
|
||||
if (mn != null) {
|
||||
MethodHandle mh = getMethodHandle(accessMode.ordinal());
|
||||
|
@ -2008,7 +2018,7 @@ public abstract class VarHandle implements Constable {
|
|||
}
|
||||
|
||||
@ForceInline
|
||||
final MethodHandle getMethodHandle(int mode) {
|
||||
MethodHandle getMethodHandle(int mode) {
|
||||
TypesAndInvokers tis = getTypesAndInvokers();
|
||||
MethodHandle mh = tis.methodHandle_table[mode];
|
||||
if (mh == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue