final class jdk.nashorn.internal.codegen.FoldConstants extends jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor implements jdk.nashorn.internal.runtime.logging.Loggable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.nashorn.internal.codegen.FoldConstants
super_class: jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor
{
private final jdk.nashorn.internal.runtime.logging.DebugLogger log;
descriptor: Ljdk/nashorn/internal/runtime/logging/DebugLogger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(jdk.nashorn.internal.codegen.Compiler);
descriptor: (Ljdk/nashorn/internal/codegen/Compiler;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor.<init>:()V
1: aload 0
aload 0
aload 1
invokevirtual jdk.nashorn.internal.codegen.Compiler.getContext:()Ljdk/nashorn/internal/runtime/Context;
invokevirtual jdk.nashorn.internal.codegen.FoldConstants.initLogger:(Ljdk/nashorn/internal/runtime/Context;)Ljdk/nashorn/internal/runtime/logging/DebugLogger;
putfield jdk.nashorn.internal.codegen.FoldConstants.log:Ljdk/nashorn/internal/runtime/logging/DebugLogger;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 3 1 compiler Ljdk/nashorn/internal/codegen/Compiler;
MethodParameters:
Name Flags
compiler final
public jdk.nashorn.internal.runtime.logging.DebugLogger getLogger();
descriptor: ()Ljdk/nashorn/internal/runtime/logging/DebugLogger;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nashorn.internal.codegen.FoldConstants.log:Ljdk/nashorn/internal/runtime/logging/DebugLogger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
public jdk.nashorn.internal.runtime.logging.DebugLogger initLogger(jdk.nashorn.internal.runtime.Context);
descriptor: (Ljdk/nashorn/internal/runtime/Context;)Ljdk/nashorn/internal/runtime/logging/DebugLogger;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual jdk.nashorn.internal.runtime.Context.getLogger:(Ljava/lang/Class;)Ljdk/nashorn/internal/runtime/logging/DebugLogger;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 1 1 context Ljdk/nashorn/internal/runtime/Context;
MethodParameters:
Name Flags
context final
public jdk.nashorn.internal.ir.Node leaveUnaryNode(jdk.nashorn.internal.ir.UnaryNode);
descriptor: (Ljdk/nashorn/internal/ir/UnaryNode;)Ljdk/nashorn/internal/ir/Node;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: new jdk.nashorn.internal.codegen.FoldConstants$UnaryNodeConstantEvaluator
dup
aload 1
invokespecial jdk.nashorn.internal.codegen.FoldConstants$UnaryNodeConstantEvaluator.<init>:(Ljdk/nashorn/internal/ir/UnaryNode;)V
invokevirtual jdk.nashorn.internal.codegen.FoldConstants$UnaryNodeConstantEvaluator.eval:()Ljdk/nashorn/internal/ir/LiteralNode;
astore 2
start local 2 1: aload 2
ifnull 4
2: aload 0
getfield jdk.nashorn.internal.codegen.FoldConstants.log:Ljdk/nashorn/internal/runtime/logging/DebugLogger;
iconst_4
anewarray java.lang.Object
dup
iconst_0
ldc "Unary constant folded "
aastore
dup
iconst_1
aload 1
aastore
dup
iconst_2
ldc " to "
aastore
dup
iconst_3
aload 2
aastore
invokevirtual jdk.nashorn.internal.runtime.logging.DebugLogger.info:([Ljava/lang/Object;)V
3: aload 2
areturn
4: StackMap locals: jdk.nashorn.internal.ir.LiteralNode
StackMap stack:
aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 5 1 unaryNode Ljdk/nashorn/internal/ir/UnaryNode;
1 5 2 literalNode Ljdk/nashorn/internal/ir/LiteralNode<*>;
MethodParameters:
Name Flags
unaryNode final
public jdk.nashorn.internal.ir.Node leaveBinaryNode(jdk.nashorn.internal.ir.BinaryNode);
descriptor: (Ljdk/nashorn/internal/ir/BinaryNode;)Ljdk/nashorn/internal/ir/Node;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: new jdk.nashorn.internal.codegen.FoldConstants$BinaryNodeConstantEvaluator
dup
aload 1
invokespecial jdk.nashorn.internal.codegen.FoldConstants$BinaryNodeConstantEvaluator.<init>:(Ljdk/nashorn/internal/ir/BinaryNode;)V
invokevirtual jdk.nashorn.internal.codegen.FoldConstants$BinaryNodeConstantEvaluator.eval:()Ljdk/nashorn/internal/ir/LiteralNode;
astore 2
start local 2 1: aload 2
ifnull 4
2: aload 0
getfield jdk.nashorn.internal.codegen.FoldConstants.log:Ljdk/nashorn/internal/runtime/logging/DebugLogger;
iconst_4
anewarray java.lang.Object
dup
iconst_0
ldc "Binary constant folded "
aastore
dup
iconst_1
aload 1
aastore
dup
iconst_2
ldc " to "
aastore
dup
iconst_3
aload 2
aastore
invokevirtual jdk.nashorn.internal.runtime.logging.DebugLogger.info:([Ljava/lang/Object;)V
3: aload 2
areturn
4: StackMap locals: jdk.nashorn.internal.ir.LiteralNode
StackMap stack:
aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 5 1 binaryNode Ljdk/nashorn/internal/ir/BinaryNode;
1 5 2 literalNode Ljdk/nashorn/internal/ir/LiteralNode<*>;
MethodParameters:
Name Flags
binaryNode final
public jdk.nashorn.internal.ir.Node leaveFunctionNode(jdk.nashorn.internal.ir.FunctionNode);
descriptor: (Ljdk/nashorn/internal/ir/FunctionNode;)Ljdk/nashorn/internal/ir/Node;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 1 1 functionNode Ljdk/nashorn/internal/ir/FunctionNode;
MethodParameters:
Name Flags
functionNode final
public jdk.nashorn.internal.ir.Node leaveIfNode(jdk.nashorn.internal.ir.IfNode);
descriptor: (Ljdk/nashorn/internal/ir/IfNode;)Ljdk/nashorn/internal/ir/Node;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=7, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual jdk.nashorn.internal.ir.IfNode.getTest:()Ljdk/nashorn/internal/ir/Expression;
astore 2
start local 2 1: aload 2
instanceof jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode
ifeq 17
2: aload 2
checkcast jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode
invokevirtual jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode.isTrue:()Z
istore 3
start local 3 3: iload 3
ifeq 4
aload 1
invokevirtual jdk.nashorn.internal.ir.IfNode.getPass:()Ljdk/nashorn/internal/ir/Block;
goto 5
StackMap locals: jdk.nashorn.internal.ir.Node int
StackMap stack:
4: aload 1
invokevirtual jdk.nashorn.internal.ir.IfNode.getFail:()Ljdk/nashorn/internal/ir/Block;
StackMap locals:
StackMap stack: jdk.nashorn.internal.ir.Block
5: astore 4
start local 4 6: iload 3
ifeq 7
aload 1
invokevirtual jdk.nashorn.internal.ir.IfNode.getFail:()Ljdk/nashorn/internal/ir/Block;
goto 8
StackMap locals: jdk.nashorn.internal.ir.Block
StackMap stack:
7: aload 1
invokevirtual jdk.nashorn.internal.ir.IfNode.getPass:()Ljdk/nashorn/internal/ir/Block;
StackMap locals:
StackMap stack: jdk.nashorn.internal.ir.Block
8: astore 5
start local 5 9: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 6
start local 6 10: aload 4
ifnull 12
11: aload 6
aload 4
invokevirtual jdk.nashorn.internal.ir.Block.getStatements:()Ljava/util/List;
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
12: StackMap locals: jdk.nashorn.internal.ir.Block java.util.List
StackMap stack:
aload 5
ifnull 14
13: aload 5
aload 6
invokestatic jdk.nashorn.internal.codegen.FoldConstants.extractVarNodesFromDeadCode:(Ljdk/nashorn/internal/ir/Node;Ljava/util/List;)V
14: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.List.isEmpty:()Z
ifeq 16
15: new jdk.nashorn.internal.ir.EmptyNode
dup
aload 1
invokespecial jdk.nashorn.internal.ir.EmptyNode.<init>:(Ljdk/nashorn/internal/ir/Statement;)V
areturn
16: StackMap locals:
StackMap stack:
aload 1
aload 1
invokevirtual jdk.nashorn.internal.ir.IfNode.getFinish:()I
aload 6
invokestatic jdk.nashorn.internal.ir.BlockStatement.createReplacement:(Ljdk/nashorn/internal/ir/Statement;ILjava/util/List;)Ljdk/nashorn/internal/ir/BlockStatement;
areturn
end local 6 end local 5 end local 4 end local 3 17: StackMap locals: jdk.nashorn.internal.codegen.FoldConstants jdk.nashorn.internal.ir.IfNode jdk.nashorn.internal.ir.Node
StackMap stack:
aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 18 1 ifNode Ljdk/nashorn/internal/ir/IfNode;
1 18 2 test Ljdk/nashorn/internal/ir/Node;
3 17 3 isTrue Z
6 17 4 executed Ljdk/nashorn/internal/ir/Block;
9 17 5 dropped Ljdk/nashorn/internal/ir/Block;
10 17 6 statements Ljava/util/List<Ljdk/nashorn/internal/ir/Statement;>;
MethodParameters:
Name Flags
ifNode final
public jdk.nashorn.internal.ir.Node leaveTernaryNode(jdk.nashorn.internal.ir.TernaryNode);
descriptor: (Ljdk/nashorn/internal/ir/TernaryNode;)Ljdk/nashorn/internal/ir/Node;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual jdk.nashorn.internal.ir.TernaryNode.getTest:()Ljdk/nashorn/internal/ir/Expression;
astore 2
start local 2 1: aload 2
instanceof jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode
ifeq 5
2: aload 2
checkcast jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode
invokevirtual jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode.isTrue:()Z
ifeq 3
aload 1
invokevirtual jdk.nashorn.internal.ir.TernaryNode.getTrueExpression:()Ljdk/nashorn/internal/ir/JoinPredecessorExpression;
goto 4
StackMap locals: jdk.nashorn.internal.ir.Node
StackMap stack:
3: aload 1
invokevirtual jdk.nashorn.internal.ir.TernaryNode.getFalseExpression:()Ljdk/nashorn/internal/ir/JoinPredecessorExpression;
StackMap locals:
StackMap stack: jdk.nashorn.internal.ir.JoinPredecessorExpression
4: invokevirtual jdk.nashorn.internal.ir.JoinPredecessorExpression.getExpression:()Ljdk/nashorn/internal/ir/Expression;
areturn
5: StackMap locals:
StackMap stack:
aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 6 1 ternaryNode Ljdk/nashorn/internal/ir/TernaryNode;
1 6 2 test Ljdk/nashorn/internal/ir/Node;
MethodParameters:
Name Flags
ternaryNode final
public jdk.nashorn.internal.ir.Node leaveSwitchNode(jdk.nashorn.internal.ir.SwitchNode);
descriptor: (Ljdk/nashorn/internal/ir/SwitchNode;)Ljdk/nashorn/internal/ir/Node;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield jdk.nashorn.internal.codegen.FoldConstants.lc:Ljdk/nashorn/internal/ir/LexicalContext;
aload 1
invokestatic jdk.nashorn.internal.codegen.FoldConstants.isUniqueIntegerSwitchNode:(Ljdk/nashorn/internal/ir/SwitchNode;)Z
invokevirtual jdk.nashorn.internal.ir.SwitchNode.setUniqueInteger:(Ljdk/nashorn/internal/ir/LexicalContext;Z)Ljdk/nashorn/internal/ir/SwitchNode;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/nashorn/internal/codegen/FoldConstants;
0 1 1 switchNode Ljdk/nashorn/internal/ir/SwitchNode;
MethodParameters:
Name Flags
switchNode final
private static boolean isUniqueIntegerSwitchNode(jdk.nashorn.internal.ir.SwitchNode);
descriptor: (Ljdk/nashorn/internal/ir/SwitchNode;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=5, args_size=1
start local 0 0: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 1
start local 1 1: aload 0
invokevirtual jdk.nashorn.internal.ir.SwitchNode.getCases:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 6
StackMap locals: jdk.nashorn.internal.ir.SwitchNode java.util.Set top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.nashorn.internal.ir.CaseNode
astore 2
start local 2 3: aload 2
invokevirtual jdk.nashorn.internal.ir.CaseNode.getTest:()Ljdk/nashorn/internal/ir/Expression;
astore 4
start local 4 4: aload 4
ifnull 6
aload 4
aload 1
invokestatic jdk.nashorn.internal.codegen.FoldConstants.isUniqueIntegerLiteral:(Ljdk/nashorn/internal/ir/Expression;Ljava/util/Set;)Z
ifne 6
5: iconst_0
ireturn
end local 4 end local 2 6: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
7: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 switchNode Ljdk/nashorn/internal/ir/SwitchNode;
1 8 1 alreadySeen Ljava/util/Set<Ljava/lang/Integer;>;
3 6 2 caseNode Ljdk/nashorn/internal/ir/CaseNode;
4 6 4 test Ljdk/nashorn/internal/ir/Expression;
MethodParameters:
Name Flags
switchNode final
private static boolean isUniqueIntegerLiteral(jdk.nashorn.internal.ir.Expression, java.util.Set<java.lang.Integer>);
descriptor: (Ljdk/nashorn/internal/ir/Expression;Ljava/util/Set;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
instanceof jdk.nashorn.internal.ir.LiteralNode
ifeq 4
1: aload 0
checkcast jdk.nashorn.internal.ir.LiteralNode
invokevirtual jdk.nashorn.internal.ir.LiteralNode.getValue:()Ljava/lang/Object;
astore 2
start local 2 2: aload 2
instanceof java.lang.Integer
ifeq 4
3: aload 1
aload 2
checkcast java.lang.Integer
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
ireturn
end local 2 4: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 expr Ljdk/nashorn/internal/ir/Expression;
0 5 1 alreadySeen Ljava/util/Set<Ljava/lang/Integer;>;
2 4 2 value Ljava/lang/Object;
Signature: (Ljdk/nashorn/internal/ir/Expression;Ljava/util/Set<Ljava/lang/Integer;>;)Z
MethodParameters:
Name Flags
expr final
alreadySeen final
static void extractVarNodesFromDeadCode(jdk.nashorn.internal.ir.Node, java.util.List<jdk.nashorn.internal.ir.Statement>);
descriptor: (Ljdk/nashorn/internal/ir/Node;Ljava/util/List;)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new jdk.nashorn.internal.codegen.FoldConstants$1
dup
aload 1
invokespecial jdk.nashorn.internal.codegen.FoldConstants$1.<init>:(Ljava/util/List;)V
invokevirtual jdk.nashorn.internal.ir.Node.accept:(Ljdk/nashorn/internal/ir/visitor/NodeVisitor;)Ljdk/nashorn/internal/ir/Node;
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 deadCodeRoot Ljdk/nashorn/internal/ir/Node;
0 2 1 statements Ljava/util/List<Ljdk/nashorn/internal/ir/Statement;>;
Signature: (Ljdk/nashorn/internal/ir/Node;Ljava/util/List<Ljdk/nashorn/internal/ir/Statement;>;)V
MethodParameters:
Name Flags
deadCodeRoot final
statements final
}
SourceFile: "FoldConstants.java"
NestMembers:
jdk.nashorn.internal.codegen.FoldConstants$1 jdk.nashorn.internal.codegen.FoldConstants$BinaryNodeConstantEvaluator jdk.nashorn.internal.codegen.FoldConstants$ConstantEvaluator jdk.nashorn.internal.codegen.FoldConstants$UnaryNodeConstantEvaluator
InnerClasses:
jdk.nashorn.internal.codegen.FoldConstants$1
private BinaryNodeConstantEvaluator = jdk.nashorn.internal.codegen.FoldConstants$BinaryNodeConstantEvaluator of jdk.nashorn.internal.codegen.FoldConstants
abstract ConstantEvaluator = jdk.nashorn.internal.codegen.FoldConstants$ConstantEvaluator of jdk.nashorn.internal.codegen.FoldConstants
private UnaryNodeConstantEvaluator = jdk.nashorn.internal.codegen.FoldConstants$UnaryNodeConstantEvaluator of jdk.nashorn.internal.codegen.FoldConstants
public PrimitiveLiteralNode = jdk.nashorn.internal.ir.LiteralNode$PrimitiveLiteralNode of jdk.nashorn.internal.ir.LiteralNode
RuntimeVisibleAnnotations:
jdk.nashorn.internal.runtime.logging.Logger(name = "fold")