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 { // 3
-187773587: 8
73425108: 9
80246032: 10
default: 38
}
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 29
goto 38
StackMap locals:
StackMap stack:
9: aload 5
ldc "Linux"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 11
goto 38
StackMap locals:
StackMap stack:
10: aload 5
ldc "SunOS"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 20
goto 38
11: StackMap locals:
StackMap stack:
aload 2
ldc ".so"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 13
12: 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;
13: 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;
14: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 15
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
goto 16
StackMap locals:
StackMap stack:
15: ldc "ld"
StackMap locals:
StackMap stack: java.lang.String
16: astore 3
start local 3 17: 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;
18: 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 19: goto 51
end local 4 end local 3 20: StackMap locals:
StackMap stack:
aload 2
ldc ".so"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 22
21: 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;
22: 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;
23: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 24
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
goto 25
StackMap locals:
StackMap stack:
24: ldc "ld"
StackMap locals:
StackMap stack: java.lang.String
25: astore 3
start local 3 26: 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 -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;
27: 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 28: goto 51
end local 4 end local 3 29: StackMap locals:
StackMap stack:
aload 2
ldc ".dylib"
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 ".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;
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 ".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;
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: ldc "ld"
StackMap locals:
StackMap stack: java.lang.String
34: astore 3
start local 3 35: 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;
36: 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 37: goto 51
end local 4 end local 3 38: 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 50
39: aload 2
ldc ".dll"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 41
40: 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;
41: 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;
42: aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
ifnull 43
aload 0
getfield jdk.tools.jaotc.Linker.options:Ljdk/tools/jaotc/Options;
getfield jdk.tools.jaotc.Options.linkerpath:Ljava/lang/String;
goto 44
StackMap locals:
StackMap stack:
43: invokestatic jdk.tools.jaotc.Linker.getWindowsLinkPath:()Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
44: astore 3
start local 3 45: aload 3
ifnonnull 47
46: 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
47: 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;
48: aconst_null
astore 4
start local 4 49: goto 51
end local 4 end local 3 50: 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 51: StackMap locals: jdk.tools.jaotc.Linker jdk.tools.jaotc.Main java.lang.String java.lang.String java.lang.String
StackMap stack:
aload 4
ifnull 56
52: 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 53: aload 6
invokevirtual java.lang.Process.waitFor:()I
istore 7
start local 7 54: iload 7
ifeq 56
55: 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 56: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 57 0 this Ljdk/tools/jaotc/Linker;
0 57 1 main Ljdk/tools/jaotc/Main;
3 57 2 name Ljava/lang/String;
17 20 3 linkerPath Ljava/lang/String;
26 29 3 linkerPath Ljava/lang/String;
35 38 3 linkerPath Ljava/lang/String;
45 50 3 linkerPath Ljava/lang/String;
51 57 3 linkerPath Ljava/lang/String;
19 20 4 linkerCheck Ljava/lang/String;
28 29 4 linkerCheck Ljava/lang/String;
37 38 4 linkerCheck Ljava/lang/String;
49 50 4 linkerCheck Ljava/lang/String;
51 57 4 linkerCheck Ljava/lang/String;
53 56 6 p Ljava/lang/Process;
54 56 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();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=9, args_size=0
0: invokestatic jdk.tools.jaotc.Linker.getVC141AndNewerLinker:()Ljava/nio/file/Path;
astore 0
start local 0 1: aload 0
ifnull 6
2: aload 0
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
3: areturn
end local 0 4: StackMap locals:
StackMap stack: java.lang.Exception
astore 0
start local 0 5: aload 0
invokevirtual java.lang.Exception.printStackTrace:()V
end local 0 6: StackMap locals:
StackMap stack:
ldc "\\VC\\bin\\amd64\\link.exe"
astore 0
start local 0 7: invokestatic jdk.tools.jaotc.Linker$VSVERSIONS.values:()[Ljdk/tools/jaotc/Linker$VSVERSIONS;
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 17
StackMap locals: java.lang.String top int int jdk.tools.jaotc.Linker$VSVERSIONS[]
StackMap stack:
8: aload 4
iload 2
aaload
astore 1
start local 1 9: aload 1
invokevirtual jdk.tools.jaotc.Linker$VSVERSIONS.getEnvVariable:()Ljava/lang/String;
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 10: aload 5
ifnull 16
11: new java.io.File
dup
aload 5
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 6
start local 6 12: aload 6
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
astore 7
start local 7 13: new java.io.File
dup
aload 7
aload 0
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 8
start local 8 14: aload 8
invokevirtual java.io.File.exists:()Z
ifeq 16
15: aload 8
invokevirtual java.io.File.getPath:()Ljava/lang/String;
areturn
end local 8 end local 7 end local 6 end local 5 end local 1 16: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
17: iload 2
iload 3
if_icmplt 8
18: invokestatic jdk.tools.jaotc.Linker$VSVERSIONS.values:()[Ljdk/tools/jaotc/Linker$VSVERSIONS;
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 24
StackMap locals:
StackMap stack:
19: aload 4
iload 2
aaload
astore 1
start local 1 20: aload 1
invokevirtual jdk.tools.jaotc.Linker$VSVERSIONS.getWellKnownPath:()Ljava/lang/String;
astore 5
start local 5 21: new java.io.File
dup
aload 5
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.exists:()Z
ifeq 23
22: aload 5
areturn
end local 5 end local 1 23: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
24: iload 2
iload 3
if_icmplt 19
25: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 4 0 vc141NewerLinker Ljava/nio/file/Path;
5 6 0 e Ljava/lang/Exception;
7 26 0 link Ljava/lang/String;
9 16 1 vs Ljdk/tools/jaotc/Linker$VSVERSIONS;
10 16 5 vspath Ljava/lang/String;
12 16 6 commonTools Ljava/io/File;
13 16 7 vsRoot Ljava/io/File;
14 16 8 linkPath Ljava/io/File;
20 23 1 vs Ljdk/tools/jaotc/Linker$VSVERSIONS;
21 23 5 wkp Ljava/lang/String;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
Exceptions:
throws java.lang.Exception
private static java.nio.file.Path getVC141AndNewerLinker();
descriptor: ()Ljava/nio/file/Path;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=10, 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.InternalError
dup
ldc "Could not read the ProgramFiles(x86) environment variable"
invokespecial java.lang.InternalError.<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;
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
astore 1
start local 1 4: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifne 6
5: aconst_null
areturn
6: StackMap locals: java.nio.file.Path
StackMap stack:
new java.lang.ProcessBuilder
dup
bipush 6
anewarray java.lang.String
dup
iconst_0
aload 1
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
aastore
dup
iconst_1
ldc "-requires"
aastore
dup
iconst_2
7: 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"
8: aastore
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
astore 2
start local 2 9: aload 2
getstatic java.lang.ProcessBuilder$Redirect.PIPE:Ljava/lang/ProcessBuilder$Redirect;
invokevirtual java.lang.ProcessBuilder.redirectOutput:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
pop
10: aload 2
getstatic java.lang.ProcessBuilder$Redirect.PIPE:Ljava/lang/ProcessBuilder$Redirect;
invokevirtual java.lang.ProcessBuilder.redirectError:(Ljava/lang/ProcessBuilder$Redirect;)Ljava/lang/ProcessBuilder;
pop
11: aload 2
invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
astore 3
start local 3 12: aload 3
invokevirtual java.lang.Process.waitFor:()I
istore 4
start local 4 13: iload 4
ifeq 18
14: aload 3
invokevirtual java.lang.Process.getErrorStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
astore 5
start local 5 15: aload 5
invokevirtual java.lang.String.isEmpty:()Z
ifeq 17
16: aload 3
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokestatic jdk.tools.jaotc.Linker.getString:(Ljava/io/InputStream;)Ljava/lang/String;
astore 5
17: StackMap locals: java.lang.String java.nio.file.Path java.lang.ProcessBuilder java.lang.Process int java.lang.String
StackMap stack:
new java.lang.InternalError
dup
aload 5
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
end local 5 18: StackMap locals:
StackMap stack:
aload 3
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/InternalError; (6)
()Ljava/lang/InternalError;
invokevirtual java.util.Optional.orElseThrow:(Ljava/util/function/Supplier;)Ljava/lang/Object;
checkcast java.lang.String
astore 5
start local 5 19: aload 5
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 6
start local 6 20: aload 6
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
astore 7
start local 7 21: aload 7
invokeinterface java.util.List.isEmpty:()Z
ifeq 23
22: new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
aload 6
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.InternalError.<init>:(Ljava/lang/String;)V
athrow
23: StackMap locals: java.lang.String java.nio.file.Path java.util.List
StackMap stack:
aload 7
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.String
astore 8
start local 8 24: aload 5
iconst_3
anewarray java.lang.String
dup
iconst_0
ldc "VC\\Tools\\MSVC"
aastore
dup
iconst_1
aload 8
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 9
start local 9 25: aload 9
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.exists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifne 27
26: new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
ldc "Linker at path "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 9
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.InternalError.<init>:(Ljava/lang/String;)V
athrow
27: StackMap locals: java.lang.String java.nio.file.Path
StackMap stack:
aload 9
areturn
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 28 0 programFilesX86 Ljava/lang/String;
4 28 1 vswhere Ljava/nio/file/Path;
9 28 2 processBuilder Ljava/lang/ProcessBuilder;
12 28 3 process Ljava/lang/Process;
13 28 4 exitCode I
15 18 5 errorMessage Ljava/lang/String;
19 28 5 installationPath Ljava/lang/String;
20 28 6 vcToolsVersionFilePath Ljava/nio/file/Path;
21 28 7 vcToolsVersionFileLines Ljava/util/List<Ljava/lang/String;>;
24 28 8 vcToolsVersion Ljava/lang/String;
25 28 9 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.InternalError lambda$1();
descriptor: ()Ljava/lang/InternalError;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=0, args_size=0
0: new java.lang.InternalError
dup
ldc "Unexpected empty output from vswhere"
invokespecial java.lang.InternalError.<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