final class jdk.nashorn.tools.jjs.NashornCompleter implements jdk.internal.jline.console.completer.Completer
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.nashorn.tools.jjs.NashornCompleter
super_class: java.lang.Object
{
private final jdk.nashorn.internal.runtime.Context context;
descriptor: Ljdk/nashorn/internal/runtime/Context;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.nashorn.internal.objects.Global global;
descriptor: Ljdk/nashorn/internal/objects/Global;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.nashorn.internal.runtime.ScriptEnvironment env;
descriptor: Ljdk/nashorn/internal/runtime/ScriptEnvironment;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.nashorn.tools.PartialParser partialParser;
descriptor: Ljdk/nashorn/tools/PartialParser;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.nashorn.tools.jjs.PropertiesHelper propsHelper;
descriptor: Ljdk/nashorn/tools/jjs/PropertiesHelper;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.nashorn.internal.runtime.ScriptFunction fileChooserFunc;
descriptor: Ljdk/nashorn/internal/runtime/ScriptFunction;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.nashorn.api.tree.Parser parser;
descriptor: Ljdk/nashorn/api/tree/Parser;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static final boolean BACKSLASH_FILE_SEPARATOR;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern SELECT_PROP_MISSING;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern LOAD_CALL;
descriptor: Ljava/util/regex/Pattern;
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: getstatic java.io.File.separatorChar:C
bipush 92
if_icmpne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic jdk.nashorn.tools.jjs.NashornCompleter.BACKSLASH_FILE_SEPARATOR:Z
3: ldc ".*\\.\\s*"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic jdk.nashorn.tools.jjs.NashornCompleter.SELECT_PROP_MISSING:Ljava/util/regex/Pattern;
4: ldc "\\s*load\\s*\\(\\s*"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic jdk.nashorn.tools.jjs.NashornCompleter.LOAD_CALL:Ljava/util/regex/Pattern;
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(jdk.nashorn.internal.runtime.Context, jdk.nashorn.internal.objects.Global, jdk.nashorn.tools.PartialParser, jdk.nashorn.tools.jjs.PropertiesHelper, jdk.nashorn.internal.runtime.ScriptFunction);
descriptor: (Ljdk/nashorn/internal/runtime/Context;Ljdk/nashorn/internal/objects/Global;Ljdk/nashorn/tools/PartialParser;Ljdk/nashorn/tools/jjs/PropertiesHelper;Ljdk/nashorn/internal/runtime/ScriptFunction;)V
flags: (0x0000)
Code:
stack=2, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield jdk.nashorn.tools.jjs.NashornCompleter.context:Ljdk/nashorn/internal/runtime/Context;
2: aload 0
aload 2
putfield jdk.nashorn.tools.jjs.NashornCompleter.global:Ljdk/nashorn/internal/objects/Global;
3: aload 0
aload 1
invokevirtual jdk.nashorn.internal.runtime.Context.getEnv:()Ljdk/nashorn/internal/runtime/ScriptEnvironment;
putfield jdk.nashorn.tools.jjs.NashornCompleter.env:Ljdk/nashorn/internal/runtime/ScriptEnvironment;
4: aload 0
aload 3
putfield jdk.nashorn.tools.jjs.NashornCompleter.partialParser:Ljdk/nashorn/tools/PartialParser;
5: aload 0
aload 4
putfield jdk.nashorn.tools.jjs.NashornCompleter.propsHelper:Ljdk/nashorn/tools/jjs/PropertiesHelper;
6: aload 0
aload 5
putfield jdk.nashorn.tools.jjs.NashornCompleter.fileChooserFunc:Ljdk/nashorn/internal/runtime/ScriptFunction;
7: aload 0
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.env:Ljdk/nashorn/internal/runtime/ScriptEnvironment;
invokestatic jdk.nashorn.tools.jjs.NashornCompleter.createParser:(Ljdk/nashorn/internal/runtime/ScriptEnvironment;)Ljdk/nashorn/api/tree/Parser;
putfield jdk.nashorn.tools.jjs.NashornCompleter.parser:Ljdk/nashorn/api/tree/Parser;
8: 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 9 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 9 1 context Ljdk/nashorn/internal/runtime/Context;
0 9 2 global Ljdk/nashorn/internal/objects/Global;
0 9 3 partialParser Ljdk/nashorn/tools/PartialParser;
0 9 4 propsHelper Ljdk/nashorn/tools/jjs/PropertiesHelper;
0 9 5 fileChooserFunc Ljdk/nashorn/internal/runtime/ScriptFunction;
MethodParameters:
Name Flags
context final
global final
partialParser final
propsHelper final
fileChooserFunc final
boolean isSyntaxErrorAt(java.lang.Throwable, int, int);
descriptor: (Ljava/lang/Throwable;II)Z
flags: (0x0000)
Code:
stack=4, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
instanceof jdk.nashorn.internal.runtime.ECMAException
ifeq 4
1: aload 1
checkcast jdk.nashorn.internal.runtime.ECMAException
astore 4
start local 4 2: aload 4
invokevirtual jdk.nashorn.internal.runtime.ECMAException.getThrown:()Ljava/lang/Object;
instanceof jdk.nashorn.internal.objects.NativeSyntaxError
ifeq 4
3: aload 0
aload 4
invokevirtual jdk.nashorn.internal.runtime.ECMAException.getCause:()Ljava/lang/Throwable;
iload 2
iload 3
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.isParseErrorAt:(Ljava/lang/Throwable;II)Z
ireturn
end local 4 4: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 5 1 exp Ljava/lang/Throwable;
0 5 2 line I
0 5 3 column I
2 4 4 eexp Ljdk/nashorn/internal/runtime/ECMAException;
MethodParameters:
Name Flags
exp final
line final
column final
boolean isParseErrorAt(java.lang.Throwable, int, int);
descriptor: (Ljava/lang/Throwable;II)Z
flags: (0x0000)
Code:
stack=2, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
instanceof jdk.nashorn.api.scripting.NashornException
ifeq 4
1: aload 1
checkcast jdk.nashorn.api.scripting.NashornException
astore 4
start local 4 2: aload 4
invokevirtual jdk.nashorn.api.scripting.NashornException.getLineNumber:()I
iload 2
if_icmpne 3
aload 4
invokevirtual jdk.nashorn.api.scripting.NashornException.getColumnNumber:()I
iload 3
if_icmpne 3
iconst_1
ireturn
StackMap locals: jdk.nashorn.api.scripting.NashornException
StackMap stack:
3: iconst_0
ireturn
end local 4 4: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 5 1 exp Ljava/lang/Throwable;
0 5 2 line I
0 5 3 column I
2 4 4 nexp Ljdk/nashorn/api/scripting/NashornException;
MethodParameters:
Name Flags
exp final
line final
column final
java.lang.String readMoreLines(java.lang.String, java.lang.Exception, jdk.nashorn.tools.jjs.Console, java.lang.String, java.io.PrintWriter);
descriptor: (Ljava/lang/String;Ljava/lang/Exception;Ljdk/nashorn/tools/jjs/Console;Ljava/lang/String;Ljava/io/PrintWriter;)Ljava/lang/String;
flags: (0x0000)
Code:
stack=4, locals=11, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: iconst_1
istore 6
start local 6 1: new java.lang.StringBuilder
dup
aload 1
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
astore 7
start local 7 2: StackMap locals: int java.lang.StringBuilder
StackMap stack:
aload 7
bipush 10
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
3: aconst_null
astore 8
start local 8 4: aload 3
aload 4
invokevirtual jdk.nashorn.tools.jjs.Console.readLine:(Ljava/lang/String;)Ljava/lang/String;
astore 8
5: aload 7
aload 8
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
6: iinc 6 1
7: goto 15
StackMap locals: jdk.nashorn.tools.jjs.NashornCompleter java.lang.String java.lang.Exception jdk.nashorn.tools.jjs.Console java.lang.String java.io.PrintWriter int java.lang.StringBuilder java.lang.String
StackMap stack: java.lang.Throwable
8: astore 9
start local 9 9: aload 9
instanceof jdk.internal.jline.console.UserInterruptException
ifeq 11
10: aconst_null
areturn
11: StackMap locals: java.lang.Throwable
StackMap stack:
aload 5
aload 9
invokevirtual java.io.PrintWriter.println:(Ljava/lang/Object;)V
12: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.env:Ljdk/nashorn/internal/runtime/ScriptEnvironment;
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._dump_on_error:Z
ifeq 14
13: aload 9
aload 5
invokevirtual java.lang.Throwable.printStackTrace:(Ljava/io/PrintWriter;)V
14: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 9 15: StackMap locals:
StackMap stack:
aload 7
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 9
start local 9 16: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.parser:Ljdk/nashorn/api/tree/Parser;
ldc "<shell>"
aload 9
aconst_null
invokeinterface jdk.nashorn.api.tree.Parser.parse:(Ljava/lang/String;Ljava/lang/String;Ljdk/nashorn/api/tree/DiagnosticListener;)Ljdk/nashorn/api/tree/CompilationUnitTree;
pop
17: goto 25
StackMap locals: jdk.nashorn.tools.jjs.NashornCompleter java.lang.String java.lang.Exception jdk.nashorn.tools.jjs.Console java.lang.String java.io.PrintWriter int java.lang.StringBuilder java.lang.String java.lang.String
StackMap stack: java.lang.Exception
18: astore 10
start local 10 19: aload 0
aload 10
iload 6
aload 8
invokevirtual java.lang.String.length:()I
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.isParseErrorAt:(Ljava/lang/Throwable;II)Z
ifeq 21
20: goto 2
21: StackMap locals: java.lang.Exception
StackMap stack:
aload 5
aload 10
invokevirtual java.io.PrintWriter.println:(Ljava/lang/Object;)V
22: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.env:Ljdk/nashorn/internal/runtime/ScriptEnvironment;
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._dump_on_error:Z
ifeq 24
23: aload 10
aload 5
invokevirtual java.lang.Exception.printStackTrace:(Ljava/io/PrintWriter;)V
24: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 10 25: StackMap locals:
StackMap stack:
aload 7
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
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
0 26 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 26 1 firstLine Ljava/lang/String;
0 26 2 exp Ljava/lang/Exception;
0 26 3 in Ljdk/nashorn/tools/jjs/Console;
0 26 4 prompt Ljava/lang/String;
0 26 5 err Ljava/io/PrintWriter;
1 26 6 line I
2 26 7 buf Ljava/lang/StringBuilder;
4 26 8 curLine Ljava/lang/String;
9 15 9 th Ljava/lang/Throwable;
16 26 9 allLines Ljava/lang/String;
19 25 10 pexp Ljava/lang/Exception;
Exception table:
from to target type
4 7 8 Class java.lang.Throwable
16 17 18 Class java.lang.Exception
MethodParameters:
Name Flags
firstLine final
exp final
in final
prompt final
err final
public boolean isComplete(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.parser:Ljdk/nashorn/api/tree/Parser;
ldc "<shell>"
aload 1
aconst_null
invokeinterface jdk.nashorn.api.tree.Parser.parse:(Ljava/lang/String;Ljava/lang/String;Ljdk/nashorn/api/tree/DiagnosticListener;)Ljdk/nashorn/api/tree/CompilationUnitTree;
pop
1: goto 7
StackMap locals:
StackMap stack: java.lang.Exception
2: astore 2
start local 2 3: aload 1
ldc "\n"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
arraylength
istore 3
start local 3 4: aload 1
invokevirtual java.lang.String.length:()I
aload 1
ldc "\n"
invokevirtual java.lang.String.lastIndexOf:(Ljava/lang/String;)I
iconst_1
iadd
isub
istore 4
start local 4 5: aload 0
aload 2
iload 3
iload 4
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.isParseErrorAt:(Ljava/lang/Throwable;II)Z
ifeq 7
6: iconst_0
ireturn
end local 4 end local 3 end local 2 7: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 8 1 input Ljava/lang/String;
3 7 2 pexp Ljava/lang/Exception;
4 7 3 line I
5 7 4 lastLineLen I
Exception table:
from to target type
0 1 2 Class java.lang.Exception
MethodParameters:
Name Flags
input
public int complete(java.lang.String, int, java.util.List<java.lang.CharSequence>);
descriptor: (Ljava/lang/String;ILjava/util/List;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=10, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 2
aload 1
invokevirtual java.lang.String.length:()I
if_icmpeq 2
1: iload 2
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.partialParser:Ljdk/nashorn/tools/PartialParser;
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.context:Ljdk/nashorn/internal/runtime/Context;
aload 1
invokeinterface jdk.nashorn.tools.PartialParser.getLastExpressionStart:(Ljdk/nashorn/internal/runtime/Context;Ljava/lang/String;)I
istore 4
start local 4 3: iload 4
iconst_m1
if_icmpne 5
4: iload 2
ireturn
5: StackMap locals: int
StackMap stack:
aload 1
iload 4
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 5
start local 5 6: getstatic jdk.nashorn.tools.jjs.NashornCompleter.SELECT_PROP_MISSING:Ljava/util/regex/Pattern;
aload 5
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
istore 6
start local 6 7: iload 6
ifeq 8
new java.lang.StringBuilder
dup
aload 5
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "x"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
goto 9
StackMap locals: java.lang.String int
StackMap stack:
8: aload 5
StackMap locals:
StackMap stack: java.lang.String
9: astore 7
start local 7 10: aload 0
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.parser:Ljdk/nashorn/api/tree/Parser;
aload 7
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.getTopLevelExpression:(Ljdk/nashorn/api/tree/Parser;Ljava/lang/String;)Ljdk/nashorn/api/tree/ExpressionTree;
astore 8
start local 8 11: aload 8
ifnonnull 20
12: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.fileChooserFunc:Ljdk/nashorn/internal/runtime/ScriptFunction;
ifnull 19
getstatic jdk.nashorn.tools.jjs.NashornCompleter.LOAD_CALL:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 19
13: aload 0
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.context:Ljdk/nashorn/internal/runtime/Context;
invokevirtual jdk.nashorn.internal.runtime.Context.getErr:()Ljava/io/PrintWriter;
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.readFileName:(Ljava/io/PrintWriter;)Ljava/lang/String;
astore 9
start local 9 14: aload 9
ifnull 19
15: getstatic jdk.nashorn.tools.jjs.NashornCompleter.BACKSLASH_FILE_SEPARATOR:Z
ifeq 17
16: aload 9
ldc "\\"
ldc "\\\\"
invokevirtual java.lang.String.replace:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
astore 9
17: StackMap locals: java.lang.String jdk.nashorn.api.tree.ExpressionTree java.lang.String
StackMap stack:
aload 3
new java.lang.StringBuilder
dup
ldc "\""
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 9
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;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
18: iload 2
aload 9
invokevirtual java.lang.String.length:()I
iadd
iconst_3
iadd
ireturn
end local 9 19: StackMap locals:
StackMap stack:
iload 2
ireturn
20: StackMap locals:
StackMap stack:
aload 0
aload 8
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.getRightMostExpression:(Ljdk/nashorn/api/tree/ExpressionTree;)Ljdk/nashorn/api/tree/Tree;
astore 9
start local 9 21: aload 9
instanceof jdk.nashorn.api.tree.MemberSelectTree
ifeq 23
22: aload 0
aload 5
iload 2
aload 3
aload 9
checkcast jdk.nashorn.api.tree.MemberSelectTree
iload 6
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.completeMemberSelect:(Ljava/lang/String;ILjava/util/List;Ljdk/nashorn/api/tree/MemberSelectTree;Z)I
ireturn
23: StackMap locals: jdk.nashorn.api.tree.Tree
StackMap stack:
aload 9
instanceof jdk.nashorn.api.tree.IdentifierTree
ifeq 25
24: aload 0
aload 5
iload 2
aload 3
aload 9
checkcast jdk.nashorn.api.tree.IdentifierTree
invokevirtual jdk.nashorn.tools.jjs.NashornCompleter.completeIdentifier:(Ljava/lang/String;ILjava/util/List;Ljdk/nashorn/api/tree/IdentifierTree;)I
ireturn
25: StackMap locals:
StackMap stack:
iload 2
ireturn
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 26 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 26 1 test Ljava/lang/String;
0 26 2 cursor I
0 26 3 result Ljava/util/List<Ljava/lang/CharSequence;>;
3 26 4 exprStart I
6 26 5 exprStr Ljava/lang/String;
7 26 6 endsWithDot Z
10 26 7 completeExpr Ljava/lang/String;
11 26 8 topExpr Ljdk/nashorn/api/tree/ExpressionTree;
14 19 9 name Ljava/lang/String;
21 26 9 rightMostExpr Ljdk/nashorn/api/tree/Tree;
Signature: (Ljava/lang/String;ILjava/util/List<Ljava/lang/CharSequence;>;)I
MethodParameters:
Name Flags
test final
cursor final
result final
private java.lang.String readFileName(java.io.PrintWriter);
descriptor: (Ljava/io/PrintWriter;)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.fileChooserFunc:Ljdk/nashorn/internal/runtime/ScriptFunction;
aconst_null
iconst_0
anewarray java.lang.Object
invokestatic jdk.nashorn.internal.runtime.ScriptRuntime.apply:(Ljdk/nashorn/internal/runtime/ScriptFunction;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 2
start local 2 1: aload 2
instanceof java.lang.String
ifeq 2
aload 2
checkcast java.lang.String
goto 3
StackMap locals: java.lang.Object
StackMap stack:
2: aconst_null
StackMap locals:
StackMap stack: java.lang.String
3: areturn
end local 2 4: StackMap locals: jdk.nashorn.tools.jjs.NashornCompleter java.io.PrintWriter
StackMap stack: java.lang.Exception
astore 2
start local 2 5: aload 1
aload 2
invokevirtual java.io.PrintWriter.println:(Ljava/lang/Object;)V
6: getstatic jdk.nashorn.tools.jjs.Main.DEBUG:Z
ifeq 8
7: aload 2
invokevirtual java.lang.Exception.printStackTrace:()V
end local 2 8: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 9 1 err Ljava/io/PrintWriter;
1 4 2 res Ljava/lang/Object;
5 8 2 e Ljava/lang/Exception;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
MethodParameters:
Name Flags
err final
private int completeMemberSelect(java.lang.String, int, java.util.List<java.lang.CharSequence>, jdk.nashorn.api.tree.MemberSelectTree, );
descriptor: (Ljava/lang/String;ILjava/util/List;Ljdk/nashorn/api/tree/MemberSelectTree;Z)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=10, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 4
invokeinterface jdk.nashorn.api.tree.MemberSelectTree.getExpression:()Ljdk/nashorn/api/tree/ExpressionTree;
astore 6
start local 6 1: aload 1
aload 6
invokeinterface jdk.nashorn.api.tree.ExpressionTree.getStartPosition:()J
l2i
aload 6
invokeinterface jdk.nashorn.api.tree.ExpressionTree.getEndPosition:()J
l2i
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 7
start local 7 2: aconst_null
astore 8
start local 8 3: aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.context:Ljdk/nashorn/internal/runtime/Context;
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.global:Ljdk/nashorn/internal/objects/Global;
aload 7
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.global:Ljdk/nashorn/internal/objects/Global;
ldc "<suggestions>"
invokevirtual jdk.nashorn.internal.runtime.Context.eval:(Ljdk/nashorn/internal/runtime/ScriptObject;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
astore 8
4: goto 8
StackMap locals: jdk.nashorn.tools.jjs.NashornCompleter java.lang.String int java.util.List jdk.nashorn.api.tree.MemberSelectTree int jdk.nashorn.api.tree.ExpressionTree java.lang.String java.lang.Object
StackMap stack: java.lang.Exception
5: astore 9
start local 9 6: getstatic jdk.nashorn.tools.jjs.Main.DEBUG:Z
ifeq 8
7: aload 9
invokevirtual java.lang.Exception.printStackTrace:()V
end local 9 8: StackMap locals:
StackMap stack:
aload 8
ifnull 15
aload 8
getstatic jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED:Ljdk/nashorn/internal/runtime/Undefined;
if_acmpeq 15
9: iload 5
ifeq 12
10: aload 3
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.propsHelper:Ljdk/nashorn/tools/jjs/PropertiesHelper;
aload 8
invokevirtual jdk.nashorn.tools.jjs.PropertiesHelper.getProperties:(Ljava/lang/Object;)Ljava/util/List;
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
11: iload 2
ireturn
12: StackMap locals:
StackMap stack:
aload 4
invokeinterface jdk.nashorn.api.tree.MemberSelectTree.getIdentifier:()Ljava/lang/String;
astore 9
start local 9 13: aload 3
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.propsHelper:Ljdk/nashorn/tools/jjs/PropertiesHelper;
aload 8
aload 9
invokevirtual jdk.nashorn.tools.jjs.PropertiesHelper.getProperties:(Ljava/lang/Object;Ljava/lang/String;)Ljava/util/List;
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
14: iload 2
aload 9
invokevirtual java.lang.String.length:()I
isub
ireturn
end local 9 15: StackMap locals:
StackMap stack:
iload 2
ireturn
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 16 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 16 1 exprStr Ljava/lang/String;
0 16 2 cursor I
0 16 3 result Ljava/util/List<Ljava/lang/CharSequence;>;
0 16 4 select Ljdk/nashorn/api/tree/MemberSelectTree;
0 16 5 endsWithDot Z
1 16 6 objExpr Ljdk/nashorn/api/tree/ExpressionTree;
2 16 7 objExprCode Ljava/lang/String;
3 16 8 obj Ljava/lang/Object;
6 8 9 exp Ljava/lang/Exception;
13 15 9 prefix Ljava/lang/String;
Exception table:
from to target type
3 4 5 Class java.lang.Exception
Signature: (Ljava/lang/String;ILjava/util/List<Ljava/lang/CharSequence;>;Ljdk/nashorn/api/tree/MemberSelectTree;Z)I
MethodParameters:
Name Flags
exprStr final
cursor final
result final
select final
endsWithDot final
private int completeIdentifier(java.lang.String, int, java.util.List<java.lang.CharSequence>, jdk.nashorn.api.tree.IdentifierTree);
descriptor: (Ljava/lang/String;ILjava/util/List;Ljdk/nashorn/api/tree/IdentifierTree;)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=6, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 4
invokeinterface jdk.nashorn.api.tree.IdentifierTree.getName:()Ljava/lang/String;
astore 5
start local 5 1: aload 3
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.propsHelper:Ljdk/nashorn/tools/jjs/PropertiesHelper;
aload 0
getfield jdk.nashorn.tools.jjs.NashornCompleter.global:Ljdk/nashorn/internal/objects/Global;
aload 5
invokevirtual jdk.nashorn.tools.jjs.PropertiesHelper.getProperties:(Ljava/lang/Object;Ljava/lang/String;)Ljava/util/List;
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
2: iload 2
aload 5
invokevirtual java.lang.String.length:()I
isub
ireturn
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 3 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 3 1 test Ljava/lang/String;
0 3 2 cursor I
0 3 3 result Ljava/util/List<Ljava/lang/CharSequence;>;
0 3 4 ident Ljdk/nashorn/api/tree/IdentifierTree;
1 3 5 name Ljava/lang/String;
Signature: (Ljava/lang/String;ILjava/util/List<Ljava/lang/CharSequence;>;Ljdk/nashorn/api/tree/IdentifierTree;)I
MethodParameters:
Name Flags
test final
cursor final
result final
ident final
private jdk.nashorn.api.tree.ExpressionTree getTopLevelExpression(jdk.nashorn.api.tree.Parser, java.lang.String);
descriptor: (Ljdk/nashorn/api/tree/Parser;Ljava/lang/String;)Ljdk/nashorn/api/tree/ExpressionTree;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ldc "<code>"
aload 2
aconst_null
invokeinterface jdk.nashorn.api.tree.Parser.parse:(Ljava/lang/String;Ljava/lang/String;Ljdk/nashorn/api/tree/DiagnosticListener;)Ljdk/nashorn/api/tree/CompilationUnitTree;
astore 3
start local 3 1: aload 3
invokeinterface jdk.nashorn.api.tree.CompilationUnitTree.getSourceElements:()Ljava/util/List;
astore 4
start local 4 2: aload 4
invokeinterface java.util.List.size:()I
iconst_1
if_icmpne 8
3: aload 4
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast jdk.nashorn.api.tree.Tree
astore 5
start local 5 4: aload 5
instanceof jdk.nashorn.api.tree.ExpressionStatementTree
ifeq 8
5: aload 5
checkcast jdk.nashorn.api.tree.ExpressionStatementTree
invokeinterface jdk.nashorn.api.tree.ExpressionStatementTree.getExpression:()Ljdk/nashorn/api/tree/ExpressionTree;
6: areturn
end local 5 end local 4 end local 3 7: StackMap locals:
StackMap stack: jdk.nashorn.api.scripting.NashornException
pop
8: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 9 1 parser Ljdk/nashorn/api/tree/Parser;
0 9 2 code Ljava/lang/String;
1 7 3 cut Ljdk/nashorn/api/tree/CompilationUnitTree;
2 7 4 stats Ljava/util/List<+Ljdk/nashorn/api/tree/Tree;>;
4 7 5 stat Ljdk/nashorn/api/tree/Tree;
Exception table:
from to target type
0 6 7 Class jdk.nashorn.api.scripting.NashornException
MethodParameters:
Name Flags
parser final
code final
private jdk.nashorn.api.tree.Tree getRightMostExpression(jdk.nashorn.api.tree.ExpressionTree);
descriptor: (Ljdk/nashorn/api/tree/ExpressionTree;)Ljdk/nashorn/api/tree/Tree;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 1
new jdk.nashorn.tools.jjs.NashornCompleter$1
dup
aload 0
invokespecial jdk.nashorn.tools.jjs.NashornCompleter$1.<init>:(Ljdk/nashorn/tools/jjs/NashornCompleter;)V
1: aconst_null
2: invokeinterface jdk.nashorn.api.tree.ExpressionTree.accept:(Ljdk/nashorn/api/tree/TreeVisitor;Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.nashorn.api.tree.Tree
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/nashorn/tools/jjs/NashornCompleter;
0 3 1 expr Ljdk/nashorn/api/tree/ExpressionTree;
MethodParameters:
Name Flags
expr final
private static jdk.nashorn.api.tree.Parser createParser(jdk.nashorn.internal.runtime.ScriptEnvironment);
descriptor: (Ljdk/nashorn/internal/runtime/ScriptEnvironment;)Ljdk/nashorn/api/tree/Parser;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 1: aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._const_as_var:Z
ifeq 3
2: aload 1
ldc "--const-as-var"
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: StackMap locals: java.util.List
StackMap stack:
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._no_syntax_extensions:Z
ifeq 5
4: aload 1
ldc "-nse"
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
5: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._scripting:Z
ifeq 7
6: aload 1
ldc "-scripting"
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
7: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._strict:Z
ifeq 9
8: aload 1
ldc "-strict"
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
9: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._es6:Z
ifeq 11
10: aload 1
ldc "--language=es6"
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
11: StackMap locals:
StackMap stack:
aload 1
iconst_0
anewarray java.lang.String
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
invokestatic jdk.nashorn.api.tree.Parser.create:([Ljava/lang/String;)Ljdk/nashorn/api/tree/Parser;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 env Ljdk/nashorn/internal/runtime/ScriptEnvironment;
1 12 1 args Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
env final
}
SourceFile: "NashornCompleter.java"
NestMembers:
jdk.nashorn.tools.jjs.NashornCompleter$1
InnerClasses:
jdk.nashorn.tools.jjs.NashornCompleter$1