public class org.graalvm.compiler.core.test.VerifyUnsafeAccess extends org.graalvm.compiler.phases.VerifyPhase<org.graalvm.compiler.phases.tiers.PhaseContext>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.compiler.core.test.VerifyUnsafeAccess
super_class: org.graalvm.compiler.phases.VerifyPhase
{
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.phases.VerifyPhase.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/VerifyUnsafeAccess;
protected void verify(org.graalvm.compiler.nodes.StructuredGraph, org.graalvm.compiler.phases.tiers.PhaseContext);
descriptor: (Lorg/graalvm/compiler/nodes/StructuredGraph;Lorg/graalvm/compiler/phases/tiers/PhaseContext;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=12, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual org.graalvm.compiler.phases.tiers.PhaseContext.getMetaAccess:()Ljdk/vm/ci/meta/MetaAccessProvider;
astore 3
start local 3 1: aload 3
ldc Lsun/misc/Unsafe;
invokeinterface jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType:(Ljava/lang/Class;)Ljdk/vm/ci/meta/ResolvedJavaType;
astore 4
start local 4 2: aload 1
invokevirtual org.graalvm.compiler.nodes.StructuredGraph.method:()Ljdk/vm/ci/meta/ResolvedJavaMethod;
astore 5
start local 5 3: aload 5
ldc "%H"
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.format:(Ljava/lang/String;)Ljava/lang/String;
astore 6
start local 6 4: aload 5
ldc "%h"
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.format:(Ljava/lang/String;)Ljava/lang/String;
astore 7
start local 7 5: aload 6
aload 7
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 6
ldc ""
goto 7
StackMap locals: org.graalvm.compiler.core.test.VerifyUnsafeAccess org.graalvm.compiler.nodes.StructuredGraph org.graalvm.compiler.phases.tiers.PhaseContext jdk.vm.ci.meta.MetaAccessProvider jdk.vm.ci.meta.ResolvedJavaType jdk.vm.ci.meta.ResolvedJavaMethod java.lang.String java.lang.String
StackMap stack:
6: aload 6
iconst_0
aload 6
invokevirtual java.lang.String.length:()I
aload 7
invokevirtual java.lang.String.length:()I
isub
iconst_1
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
7: astore 8
start local 8 8: aload 6
ldc Lorg/graalvm/compiler/serviceprovider/GraalUnsafeAccess;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
9: aload 6
ldc "jdk.vm.ci.hotspot.UnsafeAccess"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 12
10: StackMap locals: java.lang.String
StackMap stack:
aload 5
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.getName:()Ljava/lang/String;
ldc "initUnsafe"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 12
11: return
12: StackMap locals:
StackMap stack:
aload 8
ldc "com.oracle.truffle"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 13
aload 8
ldc "org.graalvm.compiler.truffle.runtime"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 14
13: StackMap locals:
StackMap stack:
return
14: StackMap locals:
StackMap stack:
aload 5
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.getSignature:()Ljdk/vm/ci/meta/Signature;
aload 5
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.getDeclaringClass:()Ljdk/vm/ci/meta/ResolvedJavaType;
invokeinterface jdk.vm.ci.meta.Signature.getReturnType:(Ljdk/vm/ci/meta/ResolvedJavaType;)Ljdk/vm/ci/meta/JavaType;
aload 4
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 20
15: aload 5
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.isPublic:()Z
ifeq 20
16: aload 6
ldc Lorg/graalvm/compiler/serviceprovider/GraalUnsafeAccess;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 17
aload 5
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.getName:()Ljava/lang/String;
ldc "getUnsafe"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 20
17: StackMap locals:
StackMap stack:
new org.graalvm.compiler.phases.VerifyPhase$VerificationError
dup
ldc "Cannot leak Unsafe from public method %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
18: aload 5
ldc "%H.%n(%p)"
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.format:(Ljava/lang/String;)Ljava/lang/String;
19: aastore
invokespecial org.graalvm.compiler.phases.VerifyPhase$VerificationError.<init>:(Ljava/lang/String;[Ljava/lang/Object;)V
athrow
20: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.graalvm.compiler.nodes.StructuredGraph.getNodes:()Lorg/graalvm/compiler/graph/iterators/NodeIterable;
ldc Lorg/graalvm/compiler/nodes/java/InstanceOfNode;
invokeinterface org.graalvm.compiler.graph.iterators.NodeIterable.filter:(Ljava/lang/Class;)Lorg/graalvm/compiler/graph/iterators/NodeIterable;
invokeinterface org.graalvm.compiler.graph.iterators.NodeIterable.iterator:()Ljava/util/Iterator;
astore 10
goto 30
StackMap locals: org.graalvm.compiler.core.test.VerifyUnsafeAccess org.graalvm.compiler.nodes.StructuredGraph org.graalvm.compiler.phases.tiers.PhaseContext jdk.vm.ci.meta.MetaAccessProvider jdk.vm.ci.meta.ResolvedJavaType jdk.vm.ci.meta.ResolvedJavaMethod java.lang.String java.lang.String java.lang.String top java.util.Iterator
StackMap stack:
21: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.graalvm.compiler.nodes.java.InstanceOfNode
astore 9
start local 9 22: aload 9
invokevirtual org.graalvm.compiler.nodes.java.InstanceOfNode.type:()Lorg/graalvm/compiler/core/common/type/TypeReference;
astore 11
start local 11 23: aload 11
ifnull 30
24: aload 4
aload 11
invokevirtual org.graalvm.compiler.core.common.type.TypeReference.getType:()Ljdk/vm/ci/meta/ResolvedJavaType;
invokeinterface jdk.vm.ci.meta.ResolvedJavaType.isAssignableFrom:(Ljdk/vm/ci/meta/ResolvedJavaType;)Z
ifeq 30
25: new org.graalvm.compiler.phases.VerifyPhase$VerificationError
dup
ldc "Cast to %s in %s is prohibited as it implies accessing Unsafe.theUnsafe via reflection. Use %s.getUnsafe() instead."
iconst_3
anewarray java.lang.Object
dup
iconst_0
26: aload 4
invokeinterface jdk.vm.ci.meta.ResolvedJavaType.toJavaName:()Ljava/lang/String;
aastore
dup
iconst_1
27: aload 5
ldc "%H.%n(%p)"
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.format:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_2
28: ldc Lorg/graalvm/compiler/serviceprovider/GraalUnsafeAccess;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
29: aastore
invokespecial org.graalvm.compiler.phases.VerifyPhase$VerificationError.<init>:(Ljava/lang/String;[Ljava/lang/Object;)V
athrow
end local 11 end local 9 30: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 21
31: aload 1
getstatic org.graalvm.compiler.nodes.java.MethodCallTargetNode.TYPE:Lorg/graalvm/compiler/graph/NodeClass;
invokevirtual org.graalvm.compiler.nodes.StructuredGraph.getNodes:(Lorg/graalvm/compiler/graph/NodeClass;)Lorg/graalvm/compiler/graph/iterators/NodeIterable;
invokeinterface org.graalvm.compiler.graph.iterators.NodeIterable.iterator:()Ljava/util/Iterator;
astore 10
goto 41
StackMap locals:
StackMap stack:
32: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.graalvm.compiler.nodes.java.MethodCallTargetNode
astore 9
start local 9 33: aload 9
invokevirtual org.graalvm.compiler.nodes.java.MethodCallTargetNode.targetMethod:()Ljdk/vm/ci/meta/ResolvedJavaMethod;
astore 11
start local 11 34: aload 11
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.getDeclaringClass:()Ljdk/vm/ci/meta/ResolvedJavaType;
aload 4
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 41
35: aload 11
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.getName:()Ljava/lang/String;
ldc "getUnsafe"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 41
36: new org.graalvm.compiler.phases.VerifyPhase$VerificationError
dup
ldc "Call to %s at callsite %s is prohibited. Use %s.getUnsafe() instead."
iconst_3
anewarray java.lang.Object
dup
iconst_0
37: aload 11
ldc "%H.%n(%p)"
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.format:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_1
38: aload 5
ldc "%H.%n(%p)"
invokeinterface jdk.vm.ci.meta.ResolvedJavaMethod.format:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_2
39: ldc Lorg/graalvm/compiler/serviceprovider/GraalUnsafeAccess;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
40: aastore
invokespecial org.graalvm.compiler.phases.VerifyPhase$VerificationError.<init>:(Ljava/lang/String;[Ljava/lang/Object;)V
athrow
end local 11 end local 9 41: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 32
42: return
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 43 0 this Lorg/graalvm/compiler/core/test/VerifyUnsafeAccess;
0 43 1 graph Lorg/graalvm/compiler/nodes/StructuredGraph;
0 43 2 context Lorg/graalvm/compiler/phases/tiers/PhaseContext;
1 43 3 metaAccess Ljdk/vm/ci/meta/MetaAccessProvider;
2 43 4 unsafeType Ljdk/vm/ci/meta/ResolvedJavaType;
3 43 5 caller Ljdk/vm/ci/meta/ResolvedJavaMethod;
4 43 6 holderQualified Ljava/lang/String;
5 43 7 holderUnqualified Ljava/lang/String;
8 43 8 packageName Ljava/lang/String;
22 30 9 node Lorg/graalvm/compiler/nodes/java/InstanceOfNode;
23 30 11 typeRef Lorg/graalvm/compiler/core/common/type/TypeReference;
33 41 9 t Lorg/graalvm/compiler/nodes/java/MethodCallTargetNode;
34 41 11 callee Ljdk/vm/ci/meta/ResolvedJavaMethod;
MethodParameters:
Name Flags
graph
context
public void verifyClass(java.lang.Class<?>, jdk.vm.ci.meta.MetaAccessProvider);
descriptor: (Ljava/lang/Class;Ljdk/vm/ci/meta/MetaAccessProvider;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual java.lang.Class.getDeclaredFields:()[Ljava/lang/reflect/Field;
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 6
StackMap locals: org.graalvm.compiler.core.test.VerifyUnsafeAccess java.lang.Class jdk.vm.ci.meta.MetaAccessProvider top int int java.lang.reflect.Field[]
StackMap stack:
1: aload 6
iload 4
aaload
astore 3
start local 3 2: aload 3
invokevirtual java.lang.reflect.Field.getModifiers:()I
istore 7
start local 7 3: aload 3
invokevirtual java.lang.reflect.Field.getType:()Ljava/lang/Class;
ldc Lsun/misc/Unsafe;
if_acmpne 5
iload 7
invokestatic java.lang.reflect.Modifier.isPublic:(I)Z
ifne 4
iload 7
invokestatic java.lang.reflect.Modifier.isProtected:(I)Z
ifeq 5
4: StackMap locals: org.graalvm.compiler.core.test.VerifyUnsafeAccess java.lang.Class jdk.vm.ci.meta.MetaAccessProvider java.lang.reflect.Field int int java.lang.reflect.Field[] int
StackMap stack:
new org.graalvm.compiler.phases.VerifyPhase$VerificationError
dup
ldc "Field of type %s must be private or package-private: %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
ldc Lsun/misc/Unsafe;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
aastore
dup
iconst_1
aload 3
aastore
invokespecial org.graalvm.compiler.phases.VerifyPhase$VerificationError.<init>:(Ljava/lang/String;[Ljava/lang/Object;)V
athrow
end local 7 end local 3 5: StackMap locals: org.graalvm.compiler.core.test.VerifyUnsafeAccess java.lang.Class jdk.vm.ci.meta.MetaAccessProvider top int int java.lang.reflect.Field[]
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
6: iload 4
iload 5
if_icmplt 1
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/graalvm/compiler/core/test/VerifyUnsafeAccess;
0 8 1 c Ljava/lang/Class<*>;
0 8 2 metaAccess Ljdk/vm/ci/meta/MetaAccessProvider;
2 5 3 field Ljava/lang/reflect/Field;
3 5 7 modifiers I
Signature: (Ljava/lang/Class<*>;Ljdk/vm/ci/meta/MetaAccessProvider;)V
MethodParameters:
Name Flags
c
metaAccess
protected void verify(org.graalvm.compiler.nodes.StructuredGraph, java.lang.Object);
descriptor: (Lorg/graalvm/compiler/nodes/StructuredGraph;Ljava/lang/Object;)V
flags: (0x1044) ACC_PROTECTED, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
aload 2
checkcast org.graalvm.compiler.phases.tiers.PhaseContext
invokevirtual org.graalvm.compiler.core.test.VerifyUnsafeAccess.verify:(Lorg/graalvm/compiler/nodes/StructuredGraph;Lorg/graalvm/compiler/phases/tiers/PhaseContext;)V
return
LocalVariableTable:
Start End Slot Name Signature
}
Signature: Lorg/graalvm/compiler/phases/VerifyPhase<Lorg/graalvm/compiler/phases/tiers/PhaseContext;>;
SourceFile: "VerifyUnsafeAccess.java"
InnerClasses:
public VerificationError = org.graalvm.compiler.phases.VerifyPhase$VerificationError of org.graalvm.compiler.phases.VerifyPhase