public class org.graalvm.compiler.core.test.SwitchCanonicalizerTest extends org.graalvm.compiler.core.test.GraalCompilerTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.compiler.core.test.SwitchCanonicalizerTest
super_class: org.graalvm.compiler.core.test.GraalCompilerTest
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.graalvm.compiler.core.test.GraalCompilerTest.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
public int divByPowerOf2(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
bipush 8
idiv
tableswitch { // 268435456 - 268435456
268435456: 1
default: 2
}
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
2: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 3 1 n I
MethodParameters:
Name Flags
n
public void testDivByPowerOf2();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
RuntimeInvisibleAnnotations:
Test()
public int divByNonPowerOf2(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
bipush 7
idiv
tableswitch { // 306783379 - 306783379
306783379: 1
default: 2
}
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
2: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 3 1 n I
MethodParameters:
Name Flags
n
public void testDivByNonPowerOf2();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
RuntimeInvisibleAnnotations:
Test()
public int remByPowerOf2(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
bipush 8
irem
tableswitch { // 9 - 9
9: 1
default: 2
}
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
2: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 3 1 n I
MethodParameters:
Name Flags
n
public void testRemByPowerOf2();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
RuntimeInvisibleAnnotations:
Test()
public int remByPowerOf2PositiveX(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: iload 1
ifle 1
bipush 8
goto 2
StackMap locals:
StackMap stack:
1: bipush 9
StackMap locals:
StackMap stack: int
2: istore 2
start local 2 3: iload 2
bipush 8
irem
tableswitch { // 9 - 9
9: 4
default: 5
}
4: StackMap locals: int
StackMap stack:
aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
5: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 6 1 n I
3 6 2 n0 I
MethodParameters:
Name Flags
n
public void testRemByPowerOf2PositiveX();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
RuntimeInvisibleAnnotations:
Test()
public int remByPowerOf2NegativeX(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: iload 1
ifle 1
bipush -8
goto 2
StackMap locals:
StackMap stack:
1: bipush -9
StackMap locals:
StackMap stack: int
2: istore 2
start local 2 3: iload 2
bipush 8
irem
tableswitch { // 9 - 9
9: 4
default: 5
}
4: StackMap locals: int
StackMap stack:
aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
5: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 6 1 n I
3 6 2 n0 I
MethodParameters:
Name Flags
n
public void testRemByPowerOf2NegativeX();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
RuntimeInvisibleAnnotations:
Test()
public int remByNonPowerOf2(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
bipush 7
irem
tableswitch { // 9 - 9
9: 1
default: 2
}
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
2: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 3 1 n I
MethodParameters:
Name Flags
n
public void testRemByNonPowerOf2();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tTest cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
RuntimeInvisibleAnnotations:
Test()
private void shouldFoldSwitch(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 0
aload 1
invokevirtual org.graalvm.compiler.core.test.SwitchCanonicalizerTest.getResolvedJavaMethod:(Ljava/lang/String;)Ljdk/vm/ci/meta/ResolvedJavaMethod;
invokevirtual org.graalvm.compiler.core.test.SwitchCanonicalizerTest.parseForCompile:(Ljdk/vm/ci/meta/ResolvedJavaMethod;)Lorg/graalvm/compiler/nodes/StructuredGraph;
astore 2
start local 2 1: aload 0
invokevirtual org.graalvm.compiler.core.test.SwitchCanonicalizerTest.createCanonicalizerPhase:()Lorg/graalvm/compiler/phases/common/CanonicalizerPhase;
aload 2
aload 0
invokevirtual org.graalvm.compiler.core.test.SwitchCanonicalizerTest.getDefaultHighTierContext:()Lorg/graalvm/compiler/phases/tiers/HighTierContext;
invokevirtual org.graalvm.compiler.phases.common.CanonicalizerPhase.apply:(Lorg/graalvm/compiler/nodes/StructuredGraph;Ljava/lang/Object;)V
2: aload 2
invokevirtual org.graalvm.compiler.nodes.StructuredGraph.getNodes:()Lorg/graalvm/compiler/graph/iterators/NodeIterable;
ldc Lorg/graalvm/compiler/nodes/extended/IntegerSwitchNode;
invokeinterface org.graalvm.compiler.graph.iterators.NodeIterable.filter:(Ljava/lang/Class;)Lorg/graalvm/compiler/graph/iterators/NodeIterable;
invokeinterface org.graalvm.compiler.graph.iterators.NodeIterable.isEmpty:()Z
invokestatic org.graalvm.compiler.core.test.SwitchCanonicalizerTest.assertTrue:(Z)V
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/graalvm/compiler/core/test/SwitchCanonicalizerTest;
0 4 1 methodName Ljava/lang/String;
1 4 2 graph Lorg/graalvm/compiler/nodes/StructuredGraph;
MethodParameters:
Name Flags
methodName
}
SourceFile: "SwitchCanonicalizerTest.java"