final class jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper
super_class: java.lang.Object
{
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
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper;
public byte[] transform(jdk.tools.jlink.plugin.ResourcePoolEntry, jdk.tools.jlink.plugin.ResourcePoolBuilder, jdk.tools.jlink.internal.StringTable);
descriptor: (Ljdk/tools/jlink/plugin/ResourcePoolEntry;Ljdk/tools/jlink/plugin/ResourcePoolBuilder;Ljdk/tools/jlink/internal/StringTable;)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=9, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
invokeinterface jdk.tools.jlink.plugin.ResourcePoolEntry.contentBytes:()[B
astore 4
start local 4 1: aconst_null
astore 6
aconst_null
astore 7
2: new java.io.ByteArrayInputStream
dup
aload 4
invokespecial java.io.ByteArrayInputStream.<init>:([B)V
astore 8
start local 8 3: aload 8
invokestatic com.sun.tools.classfile.ClassFile.read:(Ljava/io/InputStream;)Lcom/sun/tools/classfile/ClassFile;
astore 5
start local 5 4: aload 8
ifnull 14
aload 8
invokevirtual java.io.InputStream.close:()V
goto 14
end local 5 StackMap locals: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper jdk.tools.jlink.plugin.ResourcePoolEntry jdk.tools.jlink.plugin.ResourcePoolBuilder jdk.tools.jlink.internal.StringTable byte[] top java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack: java.lang.Throwable
5: astore 6
aload 8
ifnull 6
aload 8
invokevirtual java.io.InputStream.close:()V
end local 8 StackMap locals:
StackMap stack:
6: aload 6
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 7
aload 6
ifnonnull 8
aload 7
astore 6
goto 9
StackMap locals:
StackMap stack:
8: aload 6
aload 7
if_acmpeq 9
aload 6
aload 7
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
9: aload 6
athrow
StackMap locals: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper jdk.tools.jlink.plugin.ResourcePoolEntry jdk.tools.jlink.plugin.ResourcePoolBuilder jdk.tools.jlink.internal.StringTable byte[]
StackMap stack: com.sun.tools.classfile.ConstantPoolException
10: astore 6
start local 6 11: new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "Compressor EX "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " for "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
12: aload 1
invokeinterface jdk.tools.jlink.plugin.ResourcePoolEntry.path:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " content.length "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
arraylength
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 6
13: invokespecial java.io.IOException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 6 start local 5 14: StackMap locals: com.sun.tools.classfile.ClassFile
StackMap stack:
new jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper$DescriptorsScanner
dup
aload 5
invokespecial jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper$DescriptorsScanner.<init>:(Lcom/sun/tools/classfile/ClassFile;)V
astore 6
start local 6 15: aload 0
aload 1
aload 2
aload 3
aload 6
invokevirtual jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper$DescriptorsScanner.scan:()Ljava/util/Set;
aload 4
invokevirtual jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper.optimize:(Ljdk/tools/jlink/plugin/ResourcePoolEntry;Ljdk/tools/jlink/plugin/ResourcePoolBuilder;Ljdk/tools/jlink/internal/StringTable;Ljava/util/Set;[B)[B
areturn
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 16 0 this Ljdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper;
0 16 1 resource Ljdk/tools/jlink/plugin/ResourcePoolEntry;
0 16 2 out Ljdk/tools/jlink/plugin/ResourcePoolBuilder;
0 16 3 strings Ljdk/tools/jlink/internal/StringTable;
1 16 4 content [B
4 5 5 cf Lcom/sun/tools/classfile/ClassFile;
14 16 5 cf Lcom/sun/tools/classfile/ClassFile;
3 6 8 stream Ljava/io/InputStream;
11 14 6 ex Lcom/sun/tools/classfile/ConstantPoolException;
15 16 6 scanner Ljdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper$DescriptorsScanner;
Exception table:
from to target type
3 4 5 any
2 7 7 any
1 10 10 Class com.sun.tools.classfile.ConstantPoolException
Exceptions:
throws java.io.IOException, java.lang.Exception
MethodParameters:
Name Flags
resource
out
strings
private byte[] optimize(jdk.tools.jlink.plugin.ResourcePoolEntry, jdk.tools.jlink.plugin.ResourcePoolBuilder, jdk.tools.jlink.internal.StringTable, java.util.Set<java.lang.Integer>, );
descriptor: (Ljdk/tools/jlink/plugin/ResourcePoolEntry;Ljdk/tools/jlink/plugin/ResourcePoolBuilder;Ljdk/tools/jlink/internal/StringTable;Ljava/util/Set;[B)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=19, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: new java.io.DataInputStream
dup
new java.io.ByteArrayInputStream
dup
aload 5
invokespecial java.io.ByteArrayInputStream.<init>:([B)V
invokespecial java.io.DataInputStream.<init>:(Ljava/io/InputStream;)V
astore 6
start local 6 1: new java.io.ByteArrayOutputStream
dup
aload 5
arraylength
invokespecial java.io.ByteArrayOutputStream.<init>:(I)V
astore 7
start local 7 2: new java.io.DataOutputStream
dup
aload 7
invokespecial java.io.DataOutputStream.<init>:(Ljava/io/OutputStream;)V
astore 8
start local 8 3: bipush 8
newarray 8
astore 9
start local 9 4: aload 6
aload 9
invokevirtual java.io.DataInputStream.readFully:([B)V
5: aload 8
aload 9
invokevirtual java.io.DataOutputStream.write:([B)V
6: aload 6
invokevirtual java.io.DataInputStream.readUnsignedShort:()I
istore 10
start local 10 7: aload 8
iload 10
invokevirtual java.io.DataOutputStream.writeShort:(I)V
8: iconst_1
istore 11
start local 11 9: goto 36
10: StackMap locals: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper jdk.tools.jlink.plugin.ResourcePoolEntry jdk.tools.jlink.plugin.ResourcePoolBuilder jdk.tools.jlink.internal.StringTable java.util.Set byte[] java.io.DataInputStream java.io.ByteArrayOutputStream java.io.DataOutputStream byte[] int int
StackMap stack:
aload 6
invokevirtual java.io.DataInputStream.readUnsignedByte:()I
istore 12
start local 12 11: iload 12
tableswitch { // 1 - 6
1: 12
2: 30
3: 30
4: 30
5: 29
6: 29
default: 30
}
12: StackMap locals: int
StackMap stack:
aload 6
invokevirtual java.io.DataInputStream.readUTF:()Ljava/lang/String;
astore 14
start local 14 13: aload 4
iload 11
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 27
14: aload 14
invokestatic jdk.internal.jimage.decompressor.SignatureParser.parseSignatureDescriptor:(Ljava/lang/String;)Ljdk/internal/jimage/decompressor/SignatureParser$ParseResult;
15: astore 15
start local 15 16: aload 15
getfield jdk.internal.jimage.decompressor.SignatureParser$ParseResult.types:Ljava/util/List;
invokeinterface java.util.List.stream:()Ljava/util/stream/Stream;
aload 3
invokedynamic apply(Ljdk/tools/jlink/internal/StringTable;)Ljava/util/function/Function;
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;)Ljava/lang/Object;
jdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper.lambda$0(Ljdk/tools/jlink/internal/StringTable;Ljava/lang/String;)Ljava/lang/Integer; (6)
(Ljava/lang/String;)Ljava/lang/Integer;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
17: invokeinterface java.util.stream.Stream.toList:()Ljava/util/List;
18: astore 16
start local 16 19: aload 16
invokeinterface java.util.List.isEmpty:()Z
ifne 27
20: aload 8
bipush 25
invokevirtual java.io.DataOutputStream.write:(I)V
21: aload 3
aload 15
getfield jdk.internal.jimage.decompressor.SignatureParser$ParseResult.formatted:Ljava/lang/String;
invokeinterface jdk.tools.jlink.internal.StringTable.addString:(Ljava/lang/String;)I
istore 17
start local 17 22: iload 17
invokestatic jdk.internal.jimage.decompressor.CompressIndexes.compress:(I)[B
23: astore 18
start local 18 24: aload 8
aload 18
iconst_0
aload 18
arraylength
invokevirtual java.io.DataOutputStream.write:([BII)V
25: aload 0
aload 8
aload 16
invokevirtual jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper.writeDescriptorReference:(Ljava/io/DataOutputStream;Ljava/util/List;)V
26: goto 35
end local 18 end local 17 end local 16 end local 15 27: StackMap locals: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper jdk.tools.jlink.plugin.ResourcePoolEntry jdk.tools.jlink.plugin.ResourcePoolBuilder jdk.tools.jlink.internal.StringTable java.util.Set byte[] java.io.DataInputStream java.io.ByteArrayOutputStream java.io.DataOutputStream byte[] int int int top java.lang.String
StackMap stack:
aload 0
aload 8
aload 3
aload 14
invokeinterface jdk.tools.jlink.internal.StringTable.addString:(Ljava/lang/String;)I
invokevirtual jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper.writeUTF8Reference:(Ljava/io/DataOutputStream;I)V
28: goto 35
end local 14 29: StackMap locals: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper jdk.tools.jlink.plugin.ResourcePoolEntry jdk.tools.jlink.plugin.ResourcePoolBuilder jdk.tools.jlink.internal.StringTable java.util.Set byte[] java.io.DataInputStream java.io.ByteArrayOutputStream java.io.DataOutputStream byte[] int int int
StackMap stack:
iinc 11 1
30: StackMap locals:
StackMap stack:
aload 8
iload 12
invokevirtual java.io.DataOutputStream.write:(I)V
31: getstatic jdk.tools.jlink.internal.plugins.StringSharingPlugin.SIZES:[I
iload 12
iaload
istore 14
start local 14 32: iload 14
newarray 8
astore 13
start local 13 33: aload 6
aload 13
invokevirtual java.io.DataInputStream.readFully:([B)V
34: aload 8
aload 13
invokevirtual java.io.DataOutputStream.write:([B)V
end local 14 end local 13 end local 12 35: StackMap locals:
StackMap stack:
iinc 11 1
StackMap locals:
StackMap stack:
36: iload 11
iload 10
if_icmplt 10
end local 11 37: aload 8
aload 5
aload 5
arraylength
aload 6
invokevirtual java.io.DataInputStream.available:()I
isub
38: aload 6
invokevirtual java.io.DataInputStream.available:()I
39: invokevirtual java.io.DataOutputStream.write:([BII)V
40: aload 8
invokevirtual java.io.DataOutputStream.flush:()V
41: aload 7
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
areturn
end local 10 end local 9 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 42 0 this Ljdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper;
0 42 1 resource Ljdk/tools/jlink/plugin/ResourcePoolEntry;
0 42 2 resources Ljdk/tools/jlink/plugin/ResourcePoolBuilder;
0 42 3 strings Ljdk/tools/jlink/internal/StringTable;
0 42 4 descriptorIndexes Ljava/util/Set<Ljava/lang/Integer;>;
0 42 5 content [B
1 42 6 stream Ljava/io/DataInputStream;
2 42 7 outStream Ljava/io/ByteArrayOutputStream;
3 42 8 out Ljava/io/DataOutputStream;
4 42 9 header [B
7 42 10 count I
9 37 11 i I
11 35 12 tag I
33 35 13 arr [B
13 29 14 original Ljava/lang/String;
16 27 15 parseResult Ljdk/internal/jimage/decompressor/SignatureParser$ParseResult;
19 27 16 indexes Ljava/util/List<Ljava/lang/Integer;>;
22 27 17 sigIndex I
24 27 18 compressed [B
32 35 14 size I
Exceptions:
throws java.lang.Exception
Signature: (Ljdk/tools/jlink/plugin/ResourcePoolEntry;Ljdk/tools/jlink/plugin/ResourcePoolBuilder;Ljdk/tools/jlink/internal/StringTable;Ljava/util/Set<Ljava/lang/Integer;>;[B)[B
MethodParameters:
Name Flags
resource
resources
strings
descriptorIndexes
content
private void writeDescriptorReference(java.io.DataOutputStream, java.util.List<java.lang.Integer>);
descriptor: (Ljava/io/DataOutputStream;Ljava/util/List;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 3
start local 3 1: iconst_0
istore 4
start local 4 2: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 7
StackMap locals: jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper java.io.DataOutputStream java.util.List java.util.List int top java.util.Iterator
StackMap stack:
3: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Integer
astore 5
start local 5 4: aload 5
invokevirtual java.lang.Integer.intValue:()I
invokestatic jdk.internal.jimage.decompressor.CompressIndexes.compress:(I)[B
astore 7
start local 7 5: iload 4
aload 7
arraylength
iadd
istore 4
6: aload 3
aload 7
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 7 end local 5 7: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
8: iload 4
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
astore 5
start local 5 9: aload 3
invokeinterface java.util.List.stream:()Ljava/util/stream/Stream;
aload 5
invokedynamic accept(Ljava/nio/ByteBuffer;)Ljava/util/function/Consumer;
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;)V
jdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper.lambda$1(Ljava/nio/ByteBuffer;[B)V (6)
([B)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
10: aload 5
invokevirtual java.nio.ByteBuffer.array:()[B
astore 6
start local 6 11: aload 6
arraylength
invokestatic jdk.internal.jimage.decompressor.CompressIndexes.compress:(I)[B
12: astore 7
start local 7 13: aload 1
aload 7
iconst_0
aload 7
arraylength
invokevirtual java.io.DataOutputStream.write:([BII)V
14: aload 1
aload 6
iconst_0
aload 6
arraylength
invokevirtual java.io.DataOutputStream.write:([BII)V
15: return
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 16 0 this Ljdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper;
0 16 1 out Ljava/io/DataOutputStream;
0 16 2 indexes Ljava/util/List<Ljava/lang/Integer;>;
1 16 3 buffers Ljava/util/List<[B>;
2 16 4 l I
4 7 5 index Ljava/lang/Integer;
5 7 7 buffer [B
9 16 5 bb Ljava/nio/ByteBuffer;
11 16 6 compressed_indices [B
13 16 7 compressed_size [B
Exceptions:
throws java.io.IOException
Signature: (Ljava/io/DataOutputStream;Ljava/util/List<Ljava/lang/Integer;>;)V
MethodParameters:
Name Flags
out
indexes
private void writeUTF8Reference(java.io.DataOutputStream, int);
descriptor: (Ljava/io/DataOutputStream;I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
bipush 23
invokevirtual java.io.DataOutputStream.write:(I)V
1: iload 2
invokestatic jdk.internal.jimage.decompressor.CompressIndexes.compress:(I)[B
astore 3
start local 3 2: aload 1
aload 3
iconst_0
aload 3
arraylength
invokevirtual java.io.DataOutputStream.write:([BII)V
3: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/tools/jlink/internal/plugins/StringSharingPlugin$CompactCPHelper;
0 4 1 out Ljava/io/DataOutputStream;
0 4 2 index I
2 4 3 compressed [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
out
index
private static java.lang.Integer lambda$0(jdk.tools.jlink.internal.StringTable, java.lang.String);
descriptor: (Ljdk/tools/jlink/internal/StringTable;Ljava/lang/String;)Ljava/lang/Integer;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
start local 1 0: aload 0
aload 1
invokeinterface jdk.tools.jlink.internal.StringTable.addString:(Ljava/lang/String;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
areturn
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 1 1 type Ljava/lang/String;
private static void lambda$1(java.nio.ByteBuffer, byte[]);
descriptor: (Ljava/nio/ByteBuffer;[B)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
start local 1 0: aload 0
aload 1
invokevirtual java.nio.ByteBuffer.put:([B)Ljava/nio/ByteBuffer;
pop
1: return
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 2 1 buf [B
}
SourceFile: "StringSharingPlugin.java"
NestHost: jdk.tools.jlink.internal.plugins.StringSharingPlugin
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public ParseResult = jdk.internal.jimage.decompressor.SignatureParser$ParseResult of jdk.internal.jimage.decompressor.SignatureParser
private final CompactCPHelper = jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper of jdk.tools.jlink.internal.plugins.StringSharingPlugin
private final DescriptorsScanner = jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper$DescriptorsScanner of jdk.tools.jlink.internal.plugins.StringSharingPlugin$CompactCPHelper