public class org.jruby.ir.representations.CFGLinearizer
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ir.representations.CFGLinearizer
super_class: java.lang.Object
{
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/jruby/ir/representations/CFGLinearizer;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.jruby.ir.representations.CFGLinearizer.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/representations/CFGLinearizer;
public static org.jruby.ir.representations.BasicBlock[] linearize(org.jruby.ir.representations.CFG);
descriptor: (Lorg/jruby/ir/representations/CFG;)[Lorg/jruby/ir/representations/BasicBlock;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.ir.representations.CFG.size:()I
anewarray org.jruby.ir.representations.BasicBlock
astore 1
start local 1 1: new java.util.BitSet
dup
aload 0
invokevirtual org.jruby.ir.representations.CFG.size:()I
invokespecial java.util.BitSet.<init>:(I)V
astore 2
start local 2 2: aload 0
aload 1
iconst_0
aload 2
aload 0
invokevirtual org.jruby.ir.representations.CFG.getEntryBB:()Lorg/jruby/ir/representations/BasicBlock;
invokestatic org.jruby.ir.representations.CFGLinearizer.linearizeInner:(Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;ILjava/util/BitSet;Lorg/jruby/ir/representations/BasicBlock;)I
istore 3
start local 3 3: aload 0
aload 2
invokestatic org.jruby.ir.representations.CFGLinearizer.verifyAllBasicBlocksProcessed:(Lorg/jruby/ir/representations/CFG;Ljava/util/BitSet;)V
4: aload 0
aload 1
iload 3
invokestatic org.jruby.ir.representations.CFGLinearizer.fixupList:(Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;I)V
5: aload 1
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 cfg Lorg/jruby/ir/representations/CFG;
1 6 1 list [Lorg/jruby/ir/representations/BasicBlock;
2 6 2 processed Ljava/util/BitSet;
3 6 3 listSize I
MethodParameters:
Name Flags
cfg
private static int linearizeInner(org.jruby.ir.representations.CFG, org.jruby.ir.representations.BasicBlock[], int, java.util.BitSet, org.jruby.ir.representations.BasicBlock);
descriptor: (Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;ILjava/util/BitSet;Lorg/jruby/ir/representations/BasicBlock;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=9, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 3
aload 4
invokevirtual org.jruby.ir.representations.BasicBlock.getID:()I
invokevirtual java.util.BitSet.get:(I)Z
ifeq 1
iload 2
ireturn
1: StackMap locals:
StackMap stack:
aload 0
aload 4
getstatic org.jruby.ir.representations.CFG$EdgeType.FALL_THROUGH:Lorg/jruby/ir/representations/CFG$EdgeType;
invokevirtual org.jruby.ir.representations.CFG.getIncomingSourceOfType:(Lorg/jruby/ir/representations/BasicBlock;Ljava/lang/Object;)Lorg/jruby/ir/representations/BasicBlock;
astore 5
start local 5 2: aload 5
ifnull 3
aload 3
aload 5
invokevirtual org.jruby.ir.representations.BasicBlock.getID:()I
invokevirtual java.util.BitSet.get:(I)Z
ifne 3
iload 2
ireturn
3: StackMap locals: org.jruby.ir.representations.BasicBlock
StackMap stack:
aload 1
iload 2
aload 4
aastore
4: iinc 2 1
5: aload 3
aload 4
invokevirtual org.jruby.ir.representations.BasicBlock.getID:()I
invokevirtual java.util.BitSet.set:(I)V
6: aload 0
aload 4
getstatic org.jruby.ir.representations.CFG$EdgeType.FALL_THROUGH:Lorg/jruby/ir/representations/CFG$EdgeType;
invokevirtual org.jruby.ir.representations.CFG.getOutgoingDestinationOfType:(Lorg/jruby/ir/representations/BasicBlock;Ljava/lang/Object;)Lorg/jruby/ir/representations/BasicBlock;
astore 6
start local 6 7: aload 6
ifnull 8
aload 0
aload 1
iload 2
aload 3
aload 6
invokestatic org.jruby.ir.representations.CFGLinearizer.linearizeInner:(Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;ILjava/util/BitSet;Lorg/jruby/ir/representations/BasicBlock;)I
istore 2
8: StackMap locals: org.jruby.ir.representations.BasicBlock
StackMap stack:
aload 0
aload 4
getstatic org.jruby.ir.representations.CFG$EdgeType.REGULAR:Lorg/jruby/ir/representations/CFG$EdgeType;
invokevirtual org.jruby.ir.representations.CFG.getOutgoingDestinationsOfType:(Lorg/jruby/ir/representations/BasicBlock;Ljava/lang/Object;)Ljava/lang/Iterable;
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
astore 8
goto 11
StackMap locals: org.jruby.ir.representations.CFG org.jruby.ir.representations.BasicBlock[] int java.util.BitSet org.jruby.ir.representations.BasicBlock org.jruby.ir.representations.BasicBlock org.jruby.ir.representations.BasicBlock top java.util.Iterator
StackMap stack:
9: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.representations.BasicBlock
astore 7
start local 7 10: aload 0
aload 1
iload 2
aload 3
aload 7
invokestatic org.jruby.ir.representations.CFGLinearizer.linearizeInner:(Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;ILjava/util/BitSet;Lorg/jruby/ir/representations/BasicBlock;)I
istore 2
end local 7 11: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
12: aload 0
aload 4
getstatic org.jruby.ir.representations.CFG$EdgeType.EXCEPTION:Lorg/jruby/ir/representations/CFG$EdgeType;
invokevirtual org.jruby.ir.representations.CFG.getOutgoingDestinationsOfType:(Lorg/jruby/ir/representations/BasicBlock;Ljava/lang/Object;)Ljava/lang/Iterable;
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
astore 8
goto 15
StackMap locals:
StackMap stack:
13: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.representations.BasicBlock
astore 7
start local 7 14: aload 0
aload 1
iload 2
aload 3
aload 7
invokestatic org.jruby.ir.representations.CFGLinearizer.linearizeInner:(Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;ILjava/util/BitSet;Lorg/jruby/ir/representations/BasicBlock;)I
istore 2
end local 7 15: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 13
16: aload 0
aload 4
getstatic org.jruby.ir.representations.CFG$EdgeType.EXIT:Lorg/jruby/ir/representations/CFG$EdgeType;
invokevirtual org.jruby.ir.representations.CFG.getOutgoingDestinationsOfType:(Lorg/jruby/ir/representations/BasicBlock;Ljava/lang/Object;)Ljava/lang/Iterable;
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
astore 8
goto 19
StackMap locals:
StackMap stack:
17: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.representations.BasicBlock
astore 7
start local 7 18: aload 0
aload 1
iload 2
aload 3
aload 7
invokestatic org.jruby.ir.representations.CFGLinearizer.linearizeInner:(Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;ILjava/util/BitSet;Lorg/jruby/ir/representations/BasicBlock;)I
istore 2
end local 7 19: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 17
20: iload 2
ireturn
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 21 0 cfg Lorg/jruby/ir/representations/CFG;
0 21 1 list [Lorg/jruby/ir/representations/BasicBlock;
0 21 2 listSize I
0 21 3 processed Ljava/util/BitSet;
0 21 4 current Lorg/jruby/ir/representations/BasicBlock;
2 21 5 source Lorg/jruby/ir/representations/BasicBlock;
7 21 6 fallThrough Lorg/jruby/ir/representations/BasicBlock;
10 11 7 destination Lorg/jruby/ir/representations/BasicBlock;
14 15 7 destination Lorg/jruby/ir/representations/BasicBlock;
18 19 7 destination Lorg/jruby/ir/representations/BasicBlock;
MethodParameters:
Name Flags
cfg
list
listSize
processed
current
private static void fixupList(org.jruby.ir.representations.CFG, org.jruby.ir.representations.BasicBlock[], int);
descriptor: (Lorg/jruby/ir/representations/CFG;[Lorg/jruby/ir/representations/BasicBlock;I)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=7, args_size=3
start local 0 start local 1 start local 2 0: iconst_0
istore 3
start local 3 1: goto 12
2: StackMap locals: int
StackMap stack:
aload 1
iload 3
aaload
astore 4
start local 4 3: aload 4
invokevirtual org.jruby.ir.representations.BasicBlock.isExitBB:()Z
ifeq 6
4: aload 4
new org.jruby.ir.instructions.ReturnInstr
dup
aload 0
invokevirtual org.jruby.ir.representations.CFG.getManager:()Lorg/jruby/ir/IRManager;
invokevirtual org.jruby.ir.IRManager.getNil:()Lorg/jruby/ir/operands/Nil;
invokespecial org.jruby.ir.instructions.ReturnInstr.<init>:(Lorg/jruby/ir/operands/Operand;)V
invokevirtual org.jruby.ir.representations.BasicBlock.addInstr:(Lorg/jruby/ir/instructions/Instr;)V
5: goto 11
6: StackMap locals: org.jruby.ir.representations.BasicBlock
StackMap stack:
aload 4
invokevirtual org.jruby.ir.representations.BasicBlock.getLastInstr:()Lorg/jruby/ir/instructions/Instr;
astore 5
start local 5 7: aload 5
instanceof org.jruby.ir.instructions.JumpInstr
ifeq 10
8: aload 1
iload 3
iconst_1
iadd
aaload
aload 0
aload 5
aload 4
invokestatic org.jruby.ir.representations.CFGLinearizer.tryAndRemoveUnneededJump:(Lorg/jruby/ir/representations/BasicBlock;Lorg/jruby/ir/representations/CFG;Lorg/jruby/ir/instructions/Instr;Lorg/jruby/ir/representations/BasicBlock;)V
9: goto 11
10: StackMap locals: org.jruby.ir.instructions.Instr
StackMap stack:
aload 0
aload 1
iload 3
iconst_1
iadd
aaload
aload 5
aload 4
invokestatic org.jruby.ir.representations.CFGLinearizer.addJumpIfNextNotDestination:(Lorg/jruby/ir/representations/CFG;Lorg/jruby/ir/representations/BasicBlock;Lorg/jruby/ir/instructions/Instr;Lorg/jruby/ir/representations/BasicBlock;)V
end local 5 end local 4 11: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
12: iload 3
iload 2
iconst_1
isub
if_icmplt 2
end local 3 13: aload 1
iload 2
iconst_1
isub
aaload
astore 3
start local 3 14: aload 3
invokevirtual org.jruby.ir.representations.BasicBlock.isExitBB:()Z
ifne 23
15: aload 3
invokevirtual org.jruby.ir.representations.BasicBlock.getLastInstr:()Lorg/jruby/ir/instructions/Instr;
astore 4
start local 4 16: getstatic org.jruby.ir.representations.CFGLinearizer.$assertionsDisabled:Z
ifne 17
aload 4
instanceof org.jruby.ir.instructions.BranchInstr
ifeq 17
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
17: StackMap locals: org.jruby.ir.representations.CFG org.jruby.ir.representations.BasicBlock[] int org.jruby.ir.representations.BasicBlock org.jruby.ir.instructions.Instr
StackMap stack:
aload 4
ifnull 18
aload 4
invokevirtual org.jruby.ir.instructions.Instr.getOperation:()Lorg/jruby/ir/Operation;
invokevirtual org.jruby.ir.Operation.transfersControl:()Z
ifne 23
18: StackMap locals:
StackMap stack:
aload 0
aload 3
getstatic org.jruby.ir.representations.CFG$EdgeType.EXCEPTION:Lorg/jruby/ir/representations/CFG$EdgeType;
invokevirtual org.jruby.ir.representations.CFG.getOutgoingDestinationsNotOfType:(Lorg/jruby/ir/representations/BasicBlock;Ljava/lang/Object;)Ljava/lang/Iterable;
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
astore 5
start local 5 19: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.representations.BasicBlock
astore 6
start local 6 20: getstatic org.jruby.ir.representations.CFGLinearizer.$assertionsDisabled:Z
ifne 22
aload 6
ifnull 21
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifeq 22
StackMap locals: java.util.Iterator org.jruby.ir.representations.BasicBlock
StackMap stack:
21: new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
22: StackMap locals:
StackMap stack:
aload 3
new org.jruby.ir.instructions.JumpInstr
dup
aload 6
invokevirtual org.jruby.ir.representations.BasicBlock.getLabel:()Lorg/jruby/ir/operands/Label;
invokespecial org.jruby.ir.instructions.JumpInstr.<init>:(Lorg/jruby/ir/operands/Label;)V
invokevirtual org.jruby.ir.representations.BasicBlock.addInstr:(Lorg/jruby/ir/instructions/Instr;)V
end local 6 end local 5 end local 4 23: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 cfg Lorg/jruby/ir/representations/CFG;
0 24 1 list [Lorg/jruby/ir/representations/BasicBlock;
0 24 2 listSize I
1 13 3 i I
3 11 4 current Lorg/jruby/ir/representations/BasicBlock;
7 11 5 lastInstr Lorg/jruby/ir/instructions/Instr;
14 24 3 current Lorg/jruby/ir/representations/BasicBlock;
16 23 4 lastInstr Lorg/jruby/ir/instructions/Instr;
19 23 5 iter Ljava/util/Iterator<Lorg/jruby/ir/representations/BasicBlock;>;
20 23 6 target Lorg/jruby/ir/representations/BasicBlock;
MethodParameters:
Name Flags
cfg
list
listSize
private static void tryAndRemoveUnneededJump(org.jruby.ir.representations.BasicBlock, org.jruby.ir.representations.CFG, org.jruby.ir.instructions.Instr, org.jruby.ir.representations.BasicBlock);
descriptor: (Lorg/jruby/ir/representations/BasicBlock;Lorg/jruby/ir/representations/CFG;Lorg/jruby/ir/instructions/Instr;Lorg/jruby/ir/representations/BasicBlock;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 2
checkcast org.jruby.ir.instructions.JumpInstr
invokevirtual org.jruby.ir.instructions.JumpInstr.getJumpTarget:()Lorg/jruby/ir/operands/Label;
invokevirtual org.jruby.ir.representations.CFG.getBBForLabel:(Lorg/jruby/ir/operands/Label;)Lorg/jruby/ir/representations/BasicBlock;
if_acmpne 1
aload 3
aload 2
invokevirtual org.jruby.ir.representations.BasicBlock.removeInstr:(Lorg/jruby/ir/instructions/Instr;)Z
pop
1: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 next Lorg/jruby/ir/representations/BasicBlock;
0 2 1 cfg Lorg/jruby/ir/representations/CFG;
0 2 2 lastInstr Lorg/jruby/ir/instructions/Instr;
0 2 3 current Lorg/jruby/ir/representations/BasicBlock;
MethodParameters:
Name Flags
next
cfg
lastInstr
current
private static void addJumpIfNextNotDestination(org.jruby.ir.representations.CFG, org.jruby.ir.representations.BasicBlock, org.jruby.ir.instructions.Instr, org.jruby.ir.representations.BasicBlock);
descriptor: (Lorg/jruby/ir/representations/CFG;Lorg/jruby/ir/representations/BasicBlock;Lorg/jruby/ir/instructions/Instr;Lorg/jruby/ir/representations/BasicBlock;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 3
invokevirtual org.jruby.ir.representations.CFG.getOutgoingDestinations:(Lorg/jruby/ir/representations/BasicBlock;)Ljava/lang/Iterable;
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
astore 4
start local 4 1: aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifeq 2
aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.representations.BasicBlock
goto 3
StackMap locals: java.util.Iterator
StackMap stack:
2: aconst_null
StackMap locals:
StackMap stack: org.jruby.ir.representations.BasicBlock
3: astore 5
start local 5 4: aload 5
ifnull 7
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
5: aload 5
aload 1
if_acmpeq 7
aload 2
ifnull 6
aload 2
invokevirtual org.jruby.ir.instructions.Instr.getOperation:()Lorg/jruby/ir/Operation;
invokevirtual org.jruby.ir.Operation.transfersControl:()Z
ifne 7
6: StackMap locals: org.jruby.ir.representations.BasicBlock
StackMap stack:
aload 3
new org.jruby.ir.instructions.JumpInstr
dup
aload 5
invokevirtual org.jruby.ir.representations.BasicBlock.getLabel:()Lorg/jruby/ir/operands/Label;
invokespecial org.jruby.ir.instructions.JumpInstr.<init>:(Lorg/jruby/ir/operands/Label;)V
invokevirtual org.jruby.ir.representations.BasicBlock.addInstr:(Lorg/jruby/ir/instructions/Instr;)V
7: StackMap locals:
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 8 0 cfg Lorg/jruby/ir/representations/CFG;
0 8 1 next Lorg/jruby/ir/representations/BasicBlock;
0 8 2 lastInstr Lorg/jruby/ir/instructions/Instr;
0 8 3 current Lorg/jruby/ir/representations/BasicBlock;
1 8 4 outs Ljava/util/Iterator<Lorg/jruby/ir/representations/BasicBlock;>;
4 8 5 target Lorg/jruby/ir/representations/BasicBlock;
MethodParameters:
Name Flags
cfg
next
lastInstr
current
private static void verifyAllBasicBlocksProcessed(org.jruby.ir.representations.CFG, java.util.BitSet);
descriptor: (Lorg/jruby/ir/representations/CFG;Ljava/util/BitSet;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ir.representations.CFG.getBasicBlocks:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: org.jruby.ir.representations.CFG java.util.BitSet top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.representations.BasicBlock
astore 2
start local 2 2: aload 1
aload 2
invokevirtual org.jruby.ir.representations.BasicBlock.getID:()I
invokevirtual java.util.BitSet.get:(I)Z
ifne 4
3: new java.lang.RuntimeException
dup
new java.lang.StringBuilder
dup
ldc "Bad CFG linearization: BB "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual org.jruby.ir.representations.BasicBlock.getID:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " has been missed!"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 cfg Lorg/jruby/ir/representations/CFG;
0 6 1 processed Ljava/util/BitSet;
2 4 2 b Lorg/jruby/ir/representations/BasicBlock;
Exceptions:
throws java.lang.RuntimeException
MethodParameters:
Name Flags
cfg
processed
}
SourceFile: "CFGLinearizer.java"
InnerClasses:
public final EdgeType = org.jruby.ir.representations.CFG$EdgeType of org.jruby.ir.representations.CFG