public class org.graalvm.compiler.jtt.jdk.UnsafeAccess01 extends org.graalvm.compiler.jtt.JTTTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.compiler.jtt.jdk.UnsafeAccess01
super_class: org.graalvm.compiler.jtt.JTTTest
{
private static int randomValue;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static final sun.misc.Unsafe unsafe;
descriptor: Lsun/misc/Unsafe;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long offset;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static java.lang.Object staticObject;
descriptor: Ljava/lang/Object;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=0
0: bipush 100
putstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.randomValue:I
1: new org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass
dup
invokespecial org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass.<init>:()V
putstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.staticObject:Ljava/lang/Object;
2: invokestatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.getUnsafe:()Lsun/misc/Unsafe;
putstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.unsafe:Lsun/misc/Unsafe;
3: aconst_null
astore 0
start local 0 4: ldc Lorg/graalvm/compiler/jtt/jdk/UnsafeAccess01$TestClass;
ldc "field"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 0
5: goto 8
StackMap locals: java.lang.reflect.Field
StackMap stack: java.lang.NoSuchFieldException
6: pop
goto 8
7: StackMap locals:
StackMap stack: java.lang.SecurityException
pop
8: StackMap locals:
StackMap stack:
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.unsafe:Lsun/misc/Unsafe;
aload 0
invokevirtual sun.misc.Unsafe.objectFieldOffset:(Ljava/lang/reflect/Field;)J
putstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.offset:J
end local 0 9: return
LocalVariableTable:
Start End Slot Name Signature
4 9 0 field Ljava/lang/reflect/Field;
Exception table:
from to target type
4 5 6 Class java.lang.NoSuchFieldException
4 5 7 Class java.lang.SecurityException
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.graalvm.compiler.jtt.JTTTest.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/jtt/jdk/UnsafeAccess01;
public static int test();
descriptor: ()I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=0
0: new org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass
dup
invokespecial org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass.<init>:()V
astore 0
start local 0 1: getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.unsafe:Lsun/misc/Unsafe;
aload 0
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.offset:J
invokevirtual sun.misc.Unsafe.getInt:(Ljava/lang/Object;J)I
istore 1
start local 1 2: iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 3 0 object Lorg/graalvm/compiler/jtt/jdk/UnsafeAccess01$TestClass;
2 3 1 value I
static sun.misc.Unsafe getUnsafe();
descriptor: ()Lsun/misc/Unsafe;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: ldc Lsun/misc/Unsafe;
ldc "theUnsafe"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 0
start local 0 1: aload 0
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
2: aload 0
aconst_null
invokevirtual java.lang.reflect.Field.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast sun.misc.Unsafe
3: areturn
end local 0 4: StackMap locals:
StackMap stack: java.lang.Exception
astore 0
start local 0 5: new java.lang.Error
dup
aload 0
invokespecial java.lang.Error.<init>:(Ljava/lang/Throwable;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 4 0 unsafeField Ljava/lang/reflect/Field;
5 6 0 e Ljava/lang/Exception;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
public void run0();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/jtt/jdk/UnsafeAccess01;
Exceptions:
throws java.lang.Throwable
RuntimeInvisibleAnnotations:
Test()
public void runDiamond();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/jtt/jdk/UnsafeAccess01;
Exceptions:
throws java.lang.Throwable
RuntimeInvisibleAnnotations:
Test()
public static int testDiamond();
descriptor: ()I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=2, args_size=0
0: getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.staticObject:Ljava/lang/Object;
astore 0
start local 0 1: aload 0
checkcast org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass
getfield org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass.field:I
istore 1
start local 1 2: getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.randomValue:I
bipush 100
if_icmpne 5
3: getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.unsafe:Lsun/misc/Unsafe;
aload 0
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.offset:J
bipush 41
invokevirtual sun.misc.Unsafe.putInt:(Ljava/lang/Object;JI)V
4: goto 6
5: StackMap locals: java.lang.Object int
StackMap stack:
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.unsafe:Lsun/misc/Unsafe;
aload 0
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.offset:J
bipush 40
invokevirtual sun.misc.Unsafe.putInt:(Ljava/lang/Object;JI)V
6: StackMap locals:
StackMap stack:
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.unsafe:Lsun/misc/Unsafe;
aload 0
getstatic org.graalvm.compiler.jtt.jdk.UnsafeAccess01.offset:J
bipush 42
invokevirtual sun.misc.Unsafe.putInt:(Ljava/lang/Object;JI)V
7: iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 8 0 object Ljava/lang/Object;
2 8 1 oldValue I
}
SourceFile: "UnsafeAccess01.java"
NestMembers:
org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass
InnerClasses:
private TestClass = org.graalvm.compiler.jtt.jdk.UnsafeAccess01$TestClass of org.graalvm.compiler.jtt.jdk.UnsafeAccess01