public final class org.graalvm.compiler.test.SubprocessUtil
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.graalvm.compiler.test.SubprocessUtil
super_class: java.lang.Object
{
private static final java.util.regex.Pattern SAFE_SHELL_ARG;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final boolean isJava8OrEarlier;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc "[A-Za-z0-9@%_\\-\\+=:,\\./]+"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.graalvm.compiler.test.SubprocessUtil.SAFE_SHELL_ARG:Ljava/util/regex/Pattern;
1: ldc "java.specification.version"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
ldc "1.9"
invokevirtual java.lang.String.compareTo:(Ljava/lang/String;)I
ifge 2
iconst_1
goto 3
StackMap locals:
StackMap stack:
2: iconst_0
StackMap locals:
StackMap stack: int
3: putstatic org.graalvm.compiler.test.SubprocessUtil.isJava8OrEarlier:Z
return
LocalVariableTable:
Start End Slot Name Signature
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
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/graalvm/compiler/test/SubprocessUtil;
public static java.util.List<java.lang.String> getProcessCommandLine();
descriptor: ()Ljava/util/List;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: invokestatic java.lang.System.getenv:()Ljava/util/Map;
ldc "MX_SUBPROCESS_COMMAND_FILE"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 0
start local 0 1: aload 0
ifnull 5
2: new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
invokestatic java.nio.file.Files.readAllLines:(Ljava/nio/file/Path;)Ljava/util/List;
3: areturn
4: StackMap locals: java.lang.String
StackMap stack: java.io.IOException
pop
5: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 6 0 processArgsFile Ljava/lang/String;
Exception table:
from to target type
2 3 4 Class java.io.IOException
Signature: ()Ljava/util/List<Ljava/lang/String;>;
public static java.lang.String quoteShellArg(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.String.isEmpty:()Z
ifeq 2
1: ldc "\"\""
areturn
2: StackMap locals:
StackMap stack:
getstatic org.graalvm.compiler.test.SubprocessUtil.SAFE_SHELL_ARG:Ljava/util/regex/Pattern;
aload 0
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 1
start local 1 3: aload 1
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 5
4: aload 0
areturn
5: StackMap locals: java.util.regex.Matcher
StackMap stack:
new java.lang.StringBuilder
dup
ldc "'"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
ldc "'"
ldc "'\"'\"'"
invokevirtual java.lang.String.replace:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)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;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 arg Ljava/lang/String;
3 6 1 m Ljava/util/regex/Matcher;
MethodParameters:
Name Flags
arg
public static java.util.List<java.lang.String> withoutDebuggerArguments(java.util.List<java.lang.String>);
descriptor: (Ljava/util/List;)Ljava/util/List;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: new java.util.ArrayList
dup
aload 0
invokeinterface java.util.List.size:()I
invokespecial java.util.ArrayList.<init>:(I)V
astore 1
start local 1 1: aload 0
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 5
StackMap locals: java.util.List java.util.List top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 2
start local 2 3: aload 2
ldc "-Xdebug"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 5
aload 2
ldc "-Xrunjdwp:"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 5
4: aload 1
aload 2
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 2 5: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
6: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 args Ljava/util/List<Ljava/lang/String;>;
1 7 1 result Ljava/util/List<Ljava/lang/String;>;
3 5 2 arg Ljava/lang/String;
Signature: (Ljava/util/List<Ljava/lang/String;>;)Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
args
public static java.util.List<java.lang.String> getVMCommandLine();
descriptor: ()Ljava/util/List;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=0
0: invokestatic org.graalvm.compiler.test.SubprocessUtil.getProcessCommandLine:()Ljava/util/List;
astore 0
start local 0 1: aload 0
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: java.util.List
StackMap stack:
aload 0
invokestatic org.graalvm.compiler.test.SubprocessUtil.findMainClassIndex:(Ljava/util/List;)I
istore 1
start local 1 4: aload 0
iconst_0
iload 1
invokeinterface java.util.List.subList:(II)Ljava/util/List;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 5 0 args Ljava/util/List<Ljava/lang/String;>;
4 5 1 index I
Signature: ()Ljava/util/List<Ljava/lang/String;>;
public static org.graalvm.compiler.test.SubprocessUtil$Subprocess java(java.util.List<java.lang.String>, java.lang.String[]);
descriptor: (Ljava/util/List;[Ljava/lang/String;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
flags: (0x0089) ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokestatic org.graalvm.compiler.test.SubprocessUtil.java:(Ljava/util/List;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 vmArgs Ljava/util/List<Ljava/lang/String;>;
0 1 1 mainClassAndArgs [Ljava/lang/String;
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
Signature: (Ljava/util/List<Ljava/lang/String;>;[Ljava/lang/String;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
MethodParameters:
Name Flags
vmArgs
mainClassAndArgs
public static org.graalvm.compiler.test.SubprocessUtil$Subprocess java(java.util.List<java.lang.String>, java.util.List<java.lang.String>);
descriptor: (Ljava/util/List;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aconst_null
aload 1
invokestatic org.graalvm.compiler.test.SubprocessUtil.javaHelper:(Ljava/util/List;Ljava/util/Map;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 vmArgs Ljava/util/List<Ljava/lang/String;>;
0 1 1 mainClassAndArgs Ljava/util/List<Ljava/lang/String;>;
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
Signature: (Ljava/util/List<Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
MethodParameters:
Name Flags
vmArgs
mainClassAndArgs
public static org.graalvm.compiler.test.SubprocessUtil$Subprocess java(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, java.lang.String[]);
descriptor: (Ljava/util/List;Ljava/util/Map;[Ljava/lang/String;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
flags: (0x0089) ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokestatic org.graalvm.compiler.test.SubprocessUtil.java:(Ljava/util/List;Ljava/util/Map;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 vmArgs Ljava/util/List<Ljava/lang/String;>;
0 1 1 env Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
0 1 2 mainClassAndArgs [Ljava/lang/String;
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
Signature: (Ljava/util/List<Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;[Ljava/lang/String;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
MethodParameters:
Name Flags
vmArgs
env
mainClassAndArgs
public static org.graalvm.compiler.test.SubprocessUtil$Subprocess java(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.lang.String>);
descriptor: (Ljava/util/List;Ljava/util/Map;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokestatic org.graalvm.compiler.test.SubprocessUtil.javaHelper:(Ljava/util/List;Ljava/util/Map;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 vmArgs Ljava/util/List<Ljava/lang/String;>;
0 1 1 env Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
0 1 2 mainClassAndArgs Ljava/util/List<Ljava/lang/String;>;
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
Signature: (Ljava/util/List<Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
MethodParameters:
Name Flags
vmArgs
env
mainClassAndArgs
private static org.graalvm.compiler.test.SubprocessUtil$Subprocess javaHelper(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.lang.String>);
descriptor: (Ljava/util/List;Ljava/util/Map;Ljava/util/List;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 2 0: new java.util.ArrayList
dup
aload 0
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 3
start local 3 1: aload 3
aload 2
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
2: new java.lang.ProcessBuilder
dup
aload 3
invokespecial java.lang.ProcessBuilder.<init>:(Ljava/util/List;)V
astore 4
start local 4 3: aload 1
ifnull 6
4: aload 4
invokevirtual java.lang.ProcessBuilder.environment:()Ljava/util/Map;
astore 5
start local 5 5: aload 5
aload 1
invokeinterface java.util.Map.putAll:(Ljava/util/Map;)V
end local 5 6: StackMap locals: java.util.List java.lang.ProcessBuilder
StackMap stack:
aload 4
iconst_1
invokevirtual java.lang.ProcessBuilder.redirectErrorStream:(Z)Ljava/lang/ProcessBuilder;
pop
7: aload 4
invokevirtual java.lang.ProcessBuilder.start:()Ljava/lang/Process;
astore 5
start local 5 8: new java.io.BufferedReader
dup
new java.io.InputStreamReader
dup
aload 5
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokespecial java.io.InputStreamReader.<init>:(Ljava/io/InputStream;)V
invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
astore 6
start local 6 9: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 8
start local 8 10: goto 12
start local 7 11: StackMap locals: java.util.List java.util.Map java.util.List java.util.List java.lang.ProcessBuilder java.lang.Process java.io.BufferedReader java.lang.String java.util.List
StackMap stack:
aload 8
aload 7
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 7 12: StackMap locals: java.util.List java.util.Map java.util.List java.util.List java.lang.ProcessBuilder java.lang.Process java.io.BufferedReader top java.util.List
StackMap stack:
aload 6
invokevirtual java.io.BufferedReader.readLine:()Ljava/lang/String;
dup
astore 7
start local 7 13: ifnonnull 11
14: new org.graalvm.compiler.test.SubprocessUtil$Subprocess
dup
aload 3
aload 5
invokevirtual java.lang.Process.waitFor:()I
aload 8
invokespecial org.graalvm.compiler.test.SubprocessUtil$Subprocess.<init>:(Ljava/util/List;ILjava/util/List;)V
areturn
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 15 0 vmArgs Ljava/util/List<Ljava/lang/String;>;
0 15 1 env Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
0 15 2 mainClassAndArgs Ljava/util/List<Ljava/lang/String;>;
1 15 3 command Ljava/util/List<Ljava/lang/String;>;
3 15 4 processBuilder Ljava/lang/ProcessBuilder;
5 6 5 processBuilderEnv Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
8 15 5 process Ljava/lang/Process;
9 15 6 stdout Ljava/io/BufferedReader;
11 12 7 line Ljava/lang/String;
13 15 7 line Ljava/lang/String;
10 15 8 output Ljava/util/List<Ljava/lang/String;>;
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
Signature: (Ljava/util/List<Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;)Lorg/graalvm/compiler/test/SubprocessUtil$Subprocess;
MethodParameters:
Name Flags
vmArgs
env
mainClassAndArgs
private static boolean hasArg(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "-cp"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 1
aload 0
ldc "-classpath"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 2
1: StackMap locals:
StackMap stack:
iconst_1
ireturn
2: StackMap locals:
StackMap stack:
getstatic org.graalvm.compiler.test.SubprocessUtil.isJava8OrEarlier:Z
ifne 14
3: aload 0
ldc "--version"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
4: aload 0
ldc "--show-version"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
5: aload 0
ldc "--dry-run"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
6: aload 0
ldc "--disable-@files"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
7: aload 0
ldc "--dry-run"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
8: aload 0
ldc "--help"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
9: aload 0
ldc "--help-extra"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 11
10: StackMap locals:
StackMap stack:
iconst_0
ireturn
11: StackMap locals:
StackMap stack:
aload 0
ldc "--"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 14
12: aload 0
bipush 61
invokevirtual java.lang.String.indexOf:(I)I
iconst_m1
if_icmpne 13
iconst_1
ireturn
StackMap locals:
StackMap stack:
13: iconst_0
ireturn
14: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 optionName Ljava/lang/String;
MethodParameters:
Name Flags
optionName
private static int findMainClassIndex(java.util.List<java.lang.String>);
descriptor: (Ljava/util/List;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: iconst_1
istore 1
start local 1 1: goto 9
2: StackMap locals: int
StackMap stack:
aload 0
iload 1
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.String
astore 2
start local 2 3: aload 2
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 45
if_icmpeq 5
4: iload 1
ireturn
5: StackMap locals: java.lang.String
StackMap stack:
aload 2
invokestatic org.graalvm.compiler.test.SubprocessUtil.hasArg:(Ljava/lang/String;)Z
ifeq 8
6: iinc 1 2
7: goto 9
8: StackMap locals:
StackMap stack:
iinc 1 1
end local 2 9: StackMap locals:
StackMap stack:
iload 1
aload 0
invokeinterface java.util.List.size:()I
if_icmplt 2
10: new java.lang.InternalError
dup
invokespecial java.lang.InternalError.<init>:()V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 commandLine Ljava/util/List<Ljava/lang/String;>;
1 11 1 i I
3 9 2 s Ljava/lang/String;
Signature: (Ljava/util/List<Ljava/lang/String;>;)I
MethodParameters:
Name Flags
commandLine
}
SourceFile: "SubprocessUtil.java"
NestMembers:
org.graalvm.compiler.test.SubprocessUtil$Subprocess
InnerClasses:
public Subprocess = org.graalvm.compiler.test.SubprocessUtil$Subprocess of org.graalvm.compiler.test.SubprocessUtil