final class jdk.tools.jaotc.Linker
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.tools.jaotc.Linker
super_class: java.lang.Object
{
private final jdk.tools.jaotc.Options options;
descriptor: Ljdk/tools/jaotc/Options;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.lang.String objectFileName;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.lang.String libraryFileName;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.lang.String linkerCmd;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
java.lang.String objFile();
descriptor: ()Ljava/lang/String;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/tools/jaotc/Linker;
java.lang.String libFile();
descriptor: ()Ljava/lang/String;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/tools/jaotc/Linker;
private static java.util.stream.Stream<java.lang.String> getLines(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)Ljava/util/stream/Stream;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: new java.io.BufferedReader
dup
new java.io.InputStreamReader
dup
aload 0
invokespecial java.io.InputStreamReader.<init>:(Ljava/io/InputStream;)V
invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
invokevirtual java.io.BufferedReader.lines:()Ljava/util/stream/Stream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 stream Ljava/io/InputStream;
Signature: (Ljava/io/InputStream;)Ljava/util/stream/Stream<Ljava/lang/String;>;
MethodParameters:
Name Flags
stream
private static java.lang.String getString(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
invokestatic jdk.tools.jaotc.Linker.getLines:(Ljava/io/InputStream;)Ljava/util/stream/Stream;
astore 1
start local 1 1: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 2
start local 2 2: aload 1
invokeinterface java.util.stream.Stream.iterator:()Ljava/util/Iterator;
aload 2
invokedynamic accept(Ljava/lang/StringBuilder;)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/jaotc/Linker.lambda$0(Ljava/lang/StringBuilder;Ljava/lang/String;)V (6)
(Ljava/lang/String;)V
invokeinterface java.util.Iterator.forEachRemaining:(Ljava/util/function/Consumer;)V
3: aload 2
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 stream Ljava/io/InputStream;
1 4 1 lines Ljava/util/stream/Stream<Ljava/lang/String;>;
2 4 2 sb Ljava/lang/StringBuilder;
MethodParameters:
Name Flags
stream
void <init>(jdk.tools.jaotc.Main);
descriptor: (Ljdk/tools/jaotc/Main;)V
flags: (0x0000)
Code:
stack=5, locals=8, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
getfield jdk.tools.jaotc.Main.options:Ljdk/tools/jaotc/Options;
putfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
2: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.outputName:Ljava/lang/String;
astore 2
start local 2 3: aload 0
aload 2
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
4: aload 0
aload 2
putfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
5: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 7
new java.io.File
dup
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.exists:()Z
ifne 7
6: new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
ldc "Invalid linker path: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath: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.InternalError.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: jdk.tools.jaotc.Linker jdk.tools.jaotc.Main java.lang.String
StackMap stack:
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.osName:Ljava/lang/String;
dup
astore 5
invokevirtual java.lang.String.hashCode:()I
lookupswitch { // 2
-187773587: 8
73425108: 9
default: 28
}
StackMap locals: jdk.tools.jaotc.Linker jdk.tools.jaotc.Main java.lang.String top top java.lang.String
StackMap stack:
8: aload 5
ldc "Mac OS X"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 19
goto 28
StackMap locals:
StackMap stack:
9: aload 5
ldc "Linux"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
goto 28
10: StackMap locals:
StackMap stack:
aload 2
ldc ".so"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 12
11: aload 0
aload 2
iconst_0
aload 2
invokevirtual java.lang.String.length:()I
ldc ".so"
invokevirtual java.lang.String.length:()I
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
12: StackMap locals:
StackMap stack:
aload 0
dup
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
new java.lang.StringBuilder
dup_x1
swap
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".o"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
13: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 14
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
goto 15
StackMap locals:
StackMap stack:
14: ldc "ld"
StackMap locals:
StackMap stack: java.lang.String
15: astore 3
start local 3 16: aload 0
new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " -shared -z noexecstack -o "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.linkerCmd:Ljava/lang/String;
17: new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " -v"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 4
start local 4 18: goto 41
end local 4 end local 3 19: StackMap locals:
StackMap stack:
aload 2
ldc ".dylib"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 21
20: aload 0
aload 2
iconst_0
aload 2
invokevirtual java.lang.String.length:()I
ldc ".dylib"
invokevirtual java.lang.String.length:()I
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
21: StackMap locals:
StackMap stack:
aload 0
dup
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
new java.lang.StringBuilder
dup_x1
swap
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".o"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
22: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 23
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
goto 24
StackMap locals:
StackMap stack:
23: ldc "ld"
StackMap locals:
StackMap stack: java.lang.String
24: astore 3
start local 3 25: aload 0
new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " -dylib -o "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.linkerCmd:Ljava/lang/String;
26: new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " -v"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 4
start local 4 27: goto 41
end local 4 end local 3 28: StackMap locals:
StackMap stack:
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.osName:Ljava/lang/String;
ldc "Windows"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 40
29: aload 2
ldc ".dll"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 31
30: aload 0
aload 2
iconst_0
aload 2
invokevirtual java.lang.String.length:()I
ldc ".dll"
invokevirtual java.lang.String.length:()I
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
31: StackMap locals:
StackMap stack:
aload 0
dup
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
new java.lang.StringBuilder
dup_x1
swap
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".obj"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
32: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 33
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
goto 34
StackMap locals:
StackMap stack:
33: aload 1
invokestatic jdk.tools.jaotc.Linker.getWindowsLinkPath:(Ljdk/tools/jaotc/Main;)Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
34: astore 3
start local 3 35: aload 3
ifnonnull 37
36: new java.lang.InternalError
dup
ldc "Can't locate Microsoft Visual Studio amd64 link.exe"
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
37: StackMap locals: jdk.tools.jaotc.Linker jdk.tools.jaotc.Main java.lang.String java.lang.String top java.lang.String
StackMap stack:
aload 0
new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " /DLL /OPT:NOREF /NOLOGO /NOENTRY"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " /OUT:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield jdk.tools.jaotc.Linker.linkerCmd:Ljava/lang/String;
38: aconst_null
astore 4
start local 4 39: goto 41
end local 4 end local 3 40: StackMap locals: jdk.tools.jaotc.Linker jdk.tools.jaotc.Main java.lang.String top top java.lang.String
StackMap stack:
new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
ldc "Unsupported platform: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.osName: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.InternalError.<init>:(Ljava/lang/String;)V
athrow
start local 3 start local 4 41: StackMap locals: jdk.tools.jaotc.Linker jdk.tools.jaotc.Main java.lang.String java.lang.String java.lang.String
StackMap stack:
aload 4
ifnull 46
42: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 4
invokevirtual java.lang.Runtime.exec:(Ljava/lang/String;)Ljava/lang/Process;
astore 6
start local 6 43: aload 6
invokevirtual java.lang.Process.waitFor:()I
istore 7
start local 7 44: iload 7
ifeq 46
45: new java.lang.InternalError
dup
aload 6
invokevirtual java.lang.Process.getErrorStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
end local 7 end local 6 46: StackMap locals:
StackMap stack:
aload 1
getfield jdk.tools.jaotc.Main.printer:Ljdk/tools/jaotc/LogPrinter;
new java.lang.StringBuilder
dup
ldc "Found linker: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual jdk.tools.jaotc.LogPrinter.printlnVerbose:(Ljava/lang/String;)V
47: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 48 0 this Ljdk/tools/jaotc/Linker;
0 48 1 main Ljdk/tools/jaotc/Main;
3 48 2 name Ljava/lang/String;
16 19 3 linkerPath Ljava/lang/String;
25 28 3 linkerPath Ljava/lang/String;
35 40 3 linkerPath Ljava/lang/String;
41 48 3 linkerPath Ljava/lang/String;
18 19 4 linkerCheck Ljava/lang/String;
27 28 4 linkerCheck Ljava/lang/String;
39 40 4 linkerCheck Ljava/lang/String;
41 48 4 linkerCheck Ljava/lang/String;
43 46 6 p Ljava/lang/Process;
44 46 7 exitCode I
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
main
void link();
descriptor: ()V
flags: (0x0000)
Code:
stack=5, locals=6, args_size=1
start local 0 0: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 0
getfield jdk.tools.jaotc.Linker.linkerCmd:Ljava/lang/String;
invokevirtual java.lang.Runtime.exec:(Ljava/lang/String;)Ljava/lang/Process;
astore 1
start local 1 1: aload 1
invokevirtual java.lang.Process.waitFor:()I
istore 2
start local 2 2: iload 2
ifeq 7
3: aload 1
invokevirtual java.lang.Process.getErrorStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
astore 3
start local 3 4: aload 3
invokevirtual java.lang.String.isEmpty:()Z
ifeq 6
5: aload 1
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
astore 3
6: StackMap locals: java.lang.Process int java.lang.String
StackMap stack:
new java.lang.InternalError
dup
aload 3
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
end local 3 7: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 0
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 3
start local 3 8: ldc "aot.keep.objFile"
ldc "false"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
invokestatic java.lang.Boolean.parseBoolean:(Ljava/lang/String;)Z
istore 4
start local 4 9: aload 3
invokevirtual java.io.File.exists:()Z
ifeq 12
iload 4
ifne 12
10: aload 3
invokevirtual java.io.File.delete:()Z
ifne 12
11: new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
ldc "Failed to delete "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield jdk.tools.jaotc.Linker.objectFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " file"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals: java.io.File int
StackMap stack:
new java.io.File
dup
aload 0
getfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 5
start local 5 13: aload 5
invokevirtual java.io.File.exists:()Z
ifeq 16
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.osName:Ljava/lang/String;
ldc "Windows"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 16
14: aload 5
iconst_0
iconst_0
invokevirtual java.io.File.setExecutable:(ZZ)Z
ifne 16
15: new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
ldc "Failed to change attribute for "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield jdk.tools.jaotc.Linker.libraryFileName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " file"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
16: StackMap locals: java.io.File
StackMap stack:
return
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 17 0 this Ljdk/tools/jaotc/Linker;
1 17 1 p Ljava/lang/Process;
2 17 2 exitCode I
4 7 3 errorMessage Ljava/lang/String;
8 17 3 objFile Ljava/io/File;
9 17 4 keepObjFile Z
13 17 5 libFile Ljava/io/File;
Exceptions:
throws java.lang.Exception
private static java.lang.String getWindowsLinkPath(jdk.tools.jaotc.Main);
descriptor: (Ljdk/tools/jaotc/Main;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=10, args_size=1
start local 0 0: invokestatic jdk.tools.jaotc.Linker.getVC141AndNewerLinker:()Ljava/nio/file/Path;
astore 1
start local 1 1: aload 1
ifnull 8
2: aload 1
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
3: areturn
end local 1 4: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 5: aload 0
getfield jdk.tools.jaotc.Main.printer:Ljdk/tools/jaotc/LogPrinter;
new java.lang.StringBuilder
dup
ldc "Could not find VC14 or newer version of linker: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.Exception.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual jdk.tools.jaotc.LogPrinter.printlnVerbose:(Ljava/lang/String;)V
6: aload 0
getfield jdk.tools.jaotc.Main.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.debug:Z
ifeq 8
7: aload 1
invokevirtual java.lang.Exception.printStackTrace:()V
end local 1 8: StackMap locals:
StackMap stack:
ldc "\\VC\\bin\\amd64\\link.exe"
astore 1
start local 1 9: invokestatic jdk.tools.jaotc.Linker$VSVERSIONS.values:()[Ljdk/tools/jaotc/Linker$VSVERSIONS;
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 19
StackMap locals: jdk.tools.jaotc.Main java.lang.String top int int jdk.tools.jaotc.Linker$VSVERSIONS[]
StackMap stack:
10: aload 5
iload 3
aaload
astore 2
start local 2 11: aload 2
invokevirtual jdk.tools.jaotc.Linker$VSVERSIONS.getEnvVariable:()Ljava/lang/String;
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
astore 6
start local 6 12: aload 6
ifnull 18
13: new java.io.File
dup
aload 6
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 7
start local 7 14: aload 7
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
astore 8
start local 8 15: new java.io.File
dup
aload 8
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 9
start local 9 16: aload 9
invokevirtual java.io.File.exists:()Z
ifeq 18
17: aload 9
invokevirtual java.io.File.getPath:()Ljava/lang/String;
areturn
end local 9 end local 8 end local 7 end local 6 end local 2 18: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
19: iload 3
iload 4
if_icmplt 10
20: invokestatic jdk.tools.jaotc.Linker$VSVERSIONS.values:()[Ljdk/tools/jaotc/Linker$VSVERSIONS;
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 26
StackMap locals:
StackMap stack:
21: aload 5
iload 3
aaload
astore 2
start local 2 22: aload 2
invokevirtual jdk.tools.jaotc.Linker$VSVERSIONS.getWellKnownPath:()Ljava/lang/String;
astore 6
start local 6 23: new java.io.File
dup
aload 6
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.exists:()Z
ifeq 25
24: aload 6
areturn
end local 6 end local 2 25: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
26: iload 3
iload 4
if_icmplt 21
27: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 main Ljdk/tools/jaotc/Main;
1 4 1 vc141NewerLinker Ljava/nio/file/Path;
5 8 1 e Ljava/lang/Exception;
9 28 1 link Ljava/lang/String;
11 18 2 vs Ljdk/tools/jaotc/Linker$VSVERSIONS;
12 18 6 vspath Ljava/lang/String;
14 18 7 commonTools Ljava/io/File;
15 18 8 vsRoot Ljava/io/File;
16 18 9 linkPath Ljava/io/File;
22 25 2 vs Ljdk/tools/jaotc/Linker$VSVERSIONS;
23 25 6 wkp Ljava/lang/String;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
main
private static java.nio.file.Path getVC141AndNewerLinker();
descriptor: ()Ljava/nio/file/Path;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=11, args_size=0
0: ldc "ProgramFiles(x86)"
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
astore 0
start local 0 1: aload 0
ifnonnull 3
2: new java.lang.IllegalStateException
dup
ldc "Could not read the ProgramFiles(x86) environment variable"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.lang.String
StackMap stack:
new java.lang.StringBuilder
dup
aload 0
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "\\Microsoft Visual Studio\\Installer\\vswhere.exe"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 4: aload 1
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
astore 2
start local 2 5: aload 2
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifne 7
6: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Could not find "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: java.lang.String java.nio.file.Path
StackMap stack:
new java.lang.ProcessBuilder
dup
bipush 6
anewarray java.lang.String
dup
iconst_0
aload 2
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
aastore
dup
iconst_1
ldc "-requires"
aastore
dup
iconst_2
8: ldc "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
aastore
dup
iconst_3
ldc "-property"
aastore
dup
iconst_4
ldc "installationPath"
aastore
dup
iconst_5
ldc "-latest"
9: aastore
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
astore 3
start local 3 10: aload 3
getstatic java.lang.ProcessBuilder$Redirect.PIPE:Ljava/lang/ProcessBuilder$Redirect;
invokevirtual java.lang.ProcessBuilder.redirectOutput:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
pop
11: aload 3
getstatic java.lang.ProcessBuilder$Redirect.PIPE:Ljava/lang/ProcessBuilder$Redirect;
invokevirtual java.lang.ProcessBuilder.redirectError:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
pop
12: aload 3
invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
astore 4
start local 4 13: aload 4
invokevirtual java.lang.Process.waitFor:()I
istore 5
start local 5 14: iload 5
ifeq 19
15: aload 4
invokevirtual java.lang.Process.getErrorStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
astore 6
start local 6 16: aload 6
invokevirtual java.lang.String.isEmpty:()Z
ifeq 18
17: aload 4
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
astore 6
18: StackMap locals: java.lang.String java.lang.String java.nio.file.Path java.lang.ProcessBuilder java.lang.Process int java.lang.String
StackMap stack:
new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "vswhere error: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 6 19: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getLines:(Ljava/io/InputStream;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findFirst:()Ljava/util/Optional;
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;
jdk/tools/jaotc/Linker.lambda$1()Ljava/lang/IllegalStateException; (6)
()Ljava/lang/IllegalStateException;
invokevirtual java.util.Optional.orElseThrow:(Ljava/util/function/Supplier;)Ljava/lang/Object;
checkcast java.lang.String
astore 6
start local 6 20: aload 6
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "VC\\Auxiliary\\Build\\Microsoft.VCToolsVersion.default.txt"
aastore
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
astore 7
start local 7 21: aload 7
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
astore 8
start local 8 22: aload 8
invokeinterface java.util.List.isEmpty:()Z
ifeq 24
23: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
aload 7
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " is empty"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
24: StackMap locals: java.lang.String java.nio.file.Path java.util.List
StackMap stack:
aload 8
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.String
astore 9
start local 9 25: aload 6
iconst_3
anewarray java.lang.String
dup
iconst_0
ldc "VC\\Tools\\MSVC"
aastore
dup
iconst_1
aload 9
aastore
dup
iconst_2
ldc "bin\\Hostx64\\x64\\link.exe"
aastore
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
astore 10
start local 10 26: aload 10
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifne 28
27: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Linker at path "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 10
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " does not exist"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
28: StackMap locals: java.lang.String java.nio.file.Path
StackMap stack:
aload 10
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
1 29 0 programFilesX86 Ljava/lang/String;
4 29 1 vswherePath Ljava/lang/String;
5 29 2 vswhere Ljava/nio/file/Path;
10 29 3 processBuilder Ljava/lang/ProcessBuilder;
13 29 4 process Ljava/lang/Process;
14 29 5 exitCode I
16 19 6 errorMessage Ljava/lang/String;
20 29 6 installationPath Ljava/lang/String;
21 29 7 vcToolsVersionFilePath Ljava/nio/file/Path;
22 29 8 vcToolsVersionFileLines Ljava/util/List<Ljava/lang/String;>;
25 29 9 vcToolsVersion Ljava/lang/String;
26 29 10 linkPath Ljava/nio/file/Path;
Exceptions:
throws java.lang.Exception
private static void lambda$0(java.lang.StringBuilder, java.lang.String);
descriptor: (Ljava/lang/StringBuilder;Ljava/lang/String;)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.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
return
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 1 1 e Ljava/lang/String;
private static java.lang.IllegalStateException lambda$1();
descriptor: ()Ljava/lang/IllegalStateException;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=0, args_size=0
0: new java.lang.IllegalStateException
dup
ldc "Unexpected empty output from vswhere"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
areturn
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "Linker.java"
NestMembers:
jdk.tools.jaotc.Linker$VSVERSIONS
InnerClasses:
public abstract Redirect = java.lang.ProcessBuilder$Redirect of java.lang.ProcessBuilder
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
final VSVERSIONS = jdk.tools.jaotc.Linker$VSVERSIONS of jdk.tools.jaotc.Linker