public final class jdk.incubator.foreign.MemoryHandles
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.incubator.foreign.MemoryHandles
super_class: java.lang.Object
{
private static final jdk.internal.access.JavaLangInvokeAccess JLI;
descriptor: Ljdk/internal/access/JavaLangInvokeAccess;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokestatic jdk.internal.access.SharedSecrets.getJavaLangInvokeAccess:()Ljdk/internal/access/JavaLangInvokeAccess;
putstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/foreign/MemoryHandles;
public static java.lang.invoke.VarHandle varHandle(java.lang.Class<?>, java.nio.ByteOrder);
descriptor: (Ljava/lang/Class;Ljava/nio/ByteOrder;)Ljava/lang/invoke/VarHandle;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic jdk.incubator.foreign.MemoryHandles.checkCarrier:(Ljava/lang/Class;)V
1: aload 0
2: aload 0
invokestatic jdk.incubator.foreign.MemoryHandles.carrierSize:(Ljava/lang/Class;)J
3: aload 1
4: invokestatic jdk.incubator.foreign.MemoryHandles.varHandle:(Ljava/lang/Class;JLjava/nio/ByteOrder;)Ljava/lang/invoke/VarHandle;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 carrier Ljava/lang/Class<*>;
0 5 1 byteOrder Ljava/nio/ByteOrder;
Signature: (Ljava/lang/Class<*>;Ljava/nio/ByteOrder;)Ljava/lang/invoke/VarHandle;
MethodParameters:
Name Flags
carrier
byteOrder
public static java.lang.invoke.VarHandle varHandle(java.lang.Class<?>, long, java.nio.ByteOrder);
descriptor: (Ljava/lang/Class;JLjava/nio/ByteOrder;)Ljava/lang/invoke/VarHandle;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=4, args_size=3
start local 0 start local 1 start local 3 0: aload 0
invokestatic jdk.incubator.foreign.MemoryHandles.checkCarrier:(Ljava/lang/Class;)V
1: lload 1
lconst_0
lcmp
ifle 3
2: lload 1
lload 1
lconst_1
lsub
land
lconst_0
lcmp
ifeq 4
3: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Bad alignment: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
lload 1
lconst_1
lsub
aload 3
lconst_0
iconst_0
newarray 11
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressViewVarHandle:(Ljava/lang/Class;JLjava/nio/ByteOrder;J[J)Ljava/lang/invoke/VarHandle;
areturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 carrier Ljava/lang/Class<*>;
0 5 1 alignmentBytes J
0 5 3 byteOrder Ljava/nio/ByteOrder;
Signature: (Ljava/lang/Class<*>;JLjava/nio/ByteOrder;)Ljava/lang/invoke/VarHandle;
MethodParameters:
Name Flags
carrier
alignmentBytes
byteOrder
public static java.lang.invoke.VarHandle withOffset(java.lang.invoke.VarHandle, long);
descriptor: (Ljava/lang/invoke/VarHandle;J)Ljava/lang/invoke/VarHandle;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=9, locals=5, args_size=2
start local 0 start local 1 0: lload 1
lconst_0
lcmp
ifge 2
1: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Illegal offset: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressAlignmentMask:(Ljava/lang/invoke/VarHandle;)J
lstore 3
start local 3 3: lload 1
lload 3
land
lconst_0
lcmp
ifeq 5
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Offset "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " does not conform to alignment "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
lload 3
lconst_1
ladd
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: long
StackMap stack:
getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
6: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressCarrier:(Ljava/lang/invoke/VarHandle;)Ljava/lang/Class;
7: lload 3
8: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressByteOrder:(Ljava/lang/invoke/VarHandle;)Ljava/nio/ByteOrder;
9: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressOffset:(Ljava/lang/invoke/VarHandle;)J
lload 1
ladd
10: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressStrides:(Ljava/lang/invoke/VarHandle;)[J
11: invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressViewVarHandle:(Ljava/lang/Class;JLjava/nio/ByteOrder;J[J)Ljava/lang/invoke/VarHandle;
areturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 target Ljava/lang/invoke/VarHandle;
0 12 1 bytesOffset J
3 12 3 alignMask J
MethodParameters:
Name Flags
target
bytesOffset
public static java.lang.invoke.VarHandle withStride(java.lang.invoke.VarHandle, long);
descriptor: (Ljava/lang/invoke/VarHandle;J)Ljava/lang/invoke/VarHandle;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=9, args_size=2
start local 0 start local 1 0: lload 1
lconst_0
lcmp
ifne 2
1: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Stride must be positive: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressAlignmentMask:(Ljava/lang/invoke/VarHandle;)J
lstore 3
start local 3 3: lload 1
lload 3
land
lconst_0
lcmp
ifeq 5
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Stride "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " does not conform to alignment "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
lload 3
lconst_1
ladd
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: long
StackMap stack:
getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressOffset:(Ljava/lang/invoke/VarHandle;)J
lstore 5
start local 5 6: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressStrides:(Ljava/lang/invoke/VarHandle;)[J
astore 7
start local 7 7: aload 7
arraylength
iconst_1
iadd
newarray 11
astore 8
start local 8 8: aload 7
iconst_0
aload 8
iconst_1
aload 7
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
9: aload 8
iconst_0
lload 1
lastore
10: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
11: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressCarrier:(Ljava/lang/invoke/VarHandle;)Ljava/lang/Class;
12: lload 3
13: getstatic jdk.incubator.foreign.MemoryHandles.JLI:Ljdk/internal/access/JavaLangInvokeAccess;
aload 0
invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressByteOrder:(Ljava/lang/invoke/VarHandle;)Ljava/nio/ByteOrder;
14: lload 5
15: aload 8
16: invokeinterface jdk.internal.access.JavaLangInvokeAccess.memoryAddressViewVarHandle:(Ljava/lang/Class;JLjava/nio/ByteOrder;J[J)Ljava/lang/invoke/VarHandle;
areturn
end local 8 end local 7 end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 target Ljava/lang/invoke/VarHandle;
0 17 1 bytesStride J
3 17 3 alignMask J
6 17 5 offset J
7 17 7 strides [J
8 17 8 newStrides [J
MethodParameters:
Name Flags
target
bytesStride
private static void checkCarrier(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.Class.isPrimitive:()Z
ifeq 1
aload 0
getstatic java.lang.Void.TYPE:Ljava/lang/Class;
if_acmpeq 1
aload 0
getstatic java.lang.Boolean.TYPE:Ljava/lang/Class;
if_acmpne 2
1: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Illegal carrier: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 carrier Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)V
MethodParameters:
Name Flags
carrier
private static long carrierSize(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)J
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: bipush 8
aload 0
invokestatic sun.invoke.util.Wrapper.forPrimitiveType:(Ljava/lang/Class;)Lsun/invoke/util/Wrapper;
invokevirtual sun.invoke.util.Wrapper.bitWidth:()I
invokestatic java.lang.Math.max:(II)I
i2l
lstore 1
start local 1 1: lload 1
invokedynamic get()Ljava/util/function/Supplier;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()Ljava/lang/Object;
java/lang/IllegalStateException.<init>()V (8)
()Ljava/lang/RuntimeException;
invokestatic jdk.internal.foreign.Utils.bitsToBytesOrThrow:(JLjava/util/function/Supplier;)J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 carrier Ljava/lang/Class<*>;
1 2 1 bitsAlignment J
Signature: (Ljava/lang/Class<*>;)J
MethodParameters:
Name Flags
carrier
}
SourceFile: "MemoryHandles.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles