public class org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest extends org.graalvm.compiler.replacements.test.ReplacementsTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest
super_class: org.graalvm.compiler.replacements.test.ReplacementsTest
{
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.replacements.test.ReplacementsTest.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest;
protected void registerInvocationPlugins(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins);
descriptor: (Lorg/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest.getSystemClassLoaderBytecodeProvider:()Lorg/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider;
astore 2
start local 2 1: new org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins$Registration
dup
aload 1
ldc Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest$Original;
aload 0
invokevirtual org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest.getReplacements:()Lorg/graalvm/compiler/nodes/spi/Replacements;
aload 2
invokespecial org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins$Registration.<init>:(Lorg/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins;Ljava/lang/reflect/Type;Lorg/graalvm/compiler/nodes/spi/Replacements;Lorg/graalvm/compiler/bytecode/BytecodeProvider;)V
astore 3
start local 3 2: aload 3
ldc Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest$Intrinsic;
ldc "getValue"
iconst_0
anewarray java.lang.reflect.Type
invokevirtual org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins$Registration.registerMethodSubstitution:(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/reflect/Type;)V
3: aload 0
aload 1
invokespecial org.graalvm.compiler.replacements.test.ReplacementsTest.registerInvocationPlugins:(Lorg/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins;)V
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest;
0 5 1 invocationPlugins Lorg/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins;
1 5 2 replacementBytecodeProvider Lorg/graalvm/compiler/bytecode/BytecodeProvider;
2 5 3 r Lorg/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins$Registration;
MethodParameters:
Name Flags
invocationPlugins
public static java.lang.String callOriginalGetValue();
descriptor: ()Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokestatic org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Original.getValue:()Ljava/lang/String;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static java.lang.String callIntrinsicGetValue();
descriptor: ()Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokestatic org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Intrinsic.getValue:()Ljava/lang/String;
areturn
LocalVariableTable:
Start End Slot Name Signature
public void test();
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 problems: \n\tTest cannot be resolved to a type\n\tAssert cannot be resolved\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/replacements/test/classfile/RedefineIntrinsicTest;
Exceptions:
throws java.lang.Throwable
RuntimeInvisibleAnnotations:
Test()
public void testHelper();
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 problems: \n\tAssert cannot be resolved\n\tAssert cannot be resolved\n\tAssert cannot be resolved\n\tAssert cannot be resolved\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/replacements/test/classfile/RedefineIntrinsicTest;
Exceptions:
throws java.lang.Throwable
static void add(java.util.jar.JarOutputStream, java.lang.Class<?>);
descriptor: (Ljava/util/jar/JarOutputStream;Ljava/lang/Class;)V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
astore 2
start local 2 1: new java.lang.StringBuilder
dup
aload 2
bipush 46
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".class"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
start local 3 2: aload 0
new java.util.jar.JarEntry
dup
aload 3
invokespecial java.util.jar.JarEntry.<init>:(Ljava/lang/String;)V
invokevirtual java.util.jar.JarOutputStream.putNextEntry:(Ljava/util/zip/ZipEntry;)V
3: aload 1
invokevirtual java.lang.Class.getClassLoader:()Ljava/lang/ClassLoader;
aload 3
invokevirtual java.lang.ClassLoader.getResourceAsStream:(Ljava/lang/String;)Ljava/io/InputStream;
astore 4
start local 4 4: sipush 1024
newarray 8
astore 6
start local 6 5: goto 7
start local 5 6: StackMap locals: java.util.jar.JarOutputStream java.lang.Class java.lang.String java.lang.String java.io.InputStream int byte[]
StackMap stack:
aload 0
aload 6
iconst_0
iload 5
invokevirtual java.util.jar.JarOutputStream.write:([BII)V
end local 5 7: StackMap locals: java.util.jar.JarOutputStream java.lang.Class java.lang.String java.lang.String java.io.InputStream top byte[]
StackMap stack:
aload 4
aload 6
iconst_0
aload 6
arraylength
invokevirtual java.io.InputStream.read:([BII)I
dup
istore 5
start local 5 8: iconst_m1
if_icmpne 6
9: aload 0
invokevirtual java.util.jar.JarOutputStream.closeEntry:()V
10: return
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 11 0 jar Ljava/util/jar/JarOutputStream;
0 11 1 c Ljava/lang/Class<*>;
1 11 2 name Ljava/lang/String;
2 11 3 classAsPath Ljava/lang/String;
4 11 4 stream Ljava/io/InputStream;
6 7 5 nRead I
8 11 5 nRead I
5 11 6 buf [B
Exceptions:
throws java.io.IOException
Signature: (Ljava/util/jar/JarOutputStream;Ljava/lang/Class<*>;)V
MethodParameters:
Name Flags
jar
c
static boolean redefineIntrinsic();
descriptor: ()Z
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=6, args_size=0
0: new java.util.jar.Manifest
dup
invokespecial java.util.jar.Manifest.<init>:()V
astore 0
start local 0 1: aload 0
invokevirtual java.util.jar.Manifest.getMainAttributes:()Ljava/util/jar/Attributes;
getstatic java.util.jar.Attributes$Name.MANIFEST_VERSION:Ljava/util/jar/Attributes$Name;
ldc "1.0"
invokevirtual java.util.jar.Attributes.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
invokevirtual java.util.jar.Manifest.getMainAttributes:()Ljava/util/jar/Attributes;
astore 1
start local 1 3: aload 1
ldc "Agent-Class"
ldc Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest$RedefinerAgent;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.util.jar.Attributes.putValue:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
pop
4: aload 1
ldc "Can-Redefine-Classes"
ldc "true"
invokevirtual java.util.jar.Attributes.putValue:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
pop
5: aload 1
ldc "Can-Retransform-Classes"
ldc "true"
invokevirtual java.util.jar.Attributes.putValue:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
pop
6: ldc "myagent"
ldc ".jar"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempFile:(Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
astore 2
start local 2 7: new java.util.jar.JarOutputStream
dup
new java.io.FileOutputStream
dup
aload 2
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
aload 0
invokespecial java.util.jar.JarOutputStream.<init>:(Ljava/io/OutputStream;Ljava/util/jar/Manifest;)V
astore 3
start local 3 8: aload 3
ldc Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest$RedefinerAgent;
invokestatic org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest.add:(Ljava/util/jar/JarOutputStream;Ljava/lang/Class;)V
9: aload 3
ldc Lorg/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest$Redefiner;
invokestatic org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest.add:(Ljava/util/jar/JarOutputStream;Ljava/lang/Class;)V
10: aload 3
invokevirtual java.util.jar.JarOutputStream.close:()V
11: aload 2
invokestatic org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest.loadAgent:(Ljava/nio/file/Path;)Z
istore 5
12: aload 2
invokestatic java.nio.file.Files.deleteIfExists:(Ljava/nio/file/Path;)Z
pop
13: iload 5
ireturn
end local 3 14: StackMap locals: java.util.jar.Manifest java.util.jar.Attributes java.nio.file.Path
StackMap stack: java.lang.Throwable
astore 4
15: aload 2
invokestatic java.nio.file.Files.deleteIfExists:(Ljava/nio/file/Path;)Z
pop
16: aload 4
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 17 0 manifest Ljava/util/jar/Manifest;
3 17 1 mainAttrs Ljava/util/jar/Attributes;
7 17 2 jar Ljava/nio/file/Path;
8 14 3 jarStream Ljava/util/jar/JarOutputStream;
Exception table:
from to target type
7 12 14 any
Exceptions:
throws java.lang.Exception
public static boolean loadAgent(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
0: new java.lang.Error
dup
ldc "Unresolved compilation problems: \n\tThe method assumeTrue(String, boolean) is undefined for the type RedefineIntrinsicTest\n\tToolProvider cannot be resolved\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
agent
}
SourceFile: "RedefineIntrinsicTest.java"
NestMembers:
org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Intrinsic org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Original org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Redefiner org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$RedefinerAgent
InnerClasses:
public Name = java.util.jar.Attributes$Name of java.util.jar.Attributes
public Registration = org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins$Registration of org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins
private Intrinsic = org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Intrinsic of org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest
public Original = org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Original of org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest
Redefiner = org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$Redefiner of org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest
public RedefinerAgent = org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest$RedefinerAgent of org.graalvm.compiler.replacements.test.classfile.RedefineIntrinsicTest