public class org.jruby.ir.instructions.BSwitchInstr extends org.jruby.ir.instructions.MultiBranchInstr
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ir.instructions.BSwitchInstr
super_class: org.jruby.ir.instructions.MultiBranchInstr
{
private final int[] jumps;
descriptor: [I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private org.jruby.ir.operands.Operand operand;
descriptor: Lorg/jruby/ir/operands/Operand;
flags: (0x0002) ACC_PRIVATE
private final org.jruby.ir.operands.Label rubyCase;
descriptor: Lorg/jruby/ir/operands/Label;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.ir.operands.Label[] targets;
descriptor: [Lorg/jruby/ir/operands/Label;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.ir.operands.Label elseTarget;
descriptor: Lorg/jruby/ir/operands/Label;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
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/instructions/BSwitchInstr;
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.instructions.BSwitchInstr.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(int[], org.jruby.ir.operands.Operand, org.jruby.ir.operands.Label, org.jruby.ir.operands.Label[], org.jruby.ir.operands.Label);
descriptor: ([ILorg/jruby/ir/operands/Operand;Lorg/jruby/ir/operands/Label;[Lorg/jruby/ir/operands/Label;Lorg/jruby/ir/operands/Label;)V
flags: (0x0001) ACC_PUBLIC
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
getstatic org.jruby.ir.Operation.B_SWITCH:Lorg/jruby/ir/Operation;
invokespecial org.jruby.ir.instructions.MultiBranchInstr.<init>:(Lorg/jruby/ir/Operation;)V
1: getstatic org.jruby.ir.instructions.BSwitchInstr.$assertionsDisabled:Z
ifne 2
aload 1
invokestatic org.jruby.ir.instructions.BSwitchInstr.jumpsAreSorted:([I)Z
ifne 2
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
2: StackMap locals: org.jruby.ir.instructions.BSwitchInstr int[] org.jruby.ir.operands.Operand org.jruby.ir.operands.Label org.jruby.ir.operands.Label[] org.jruby.ir.operands.Label
StackMap stack:
aload 0
aload 1
putfield org.jruby.ir.instructions.BSwitchInstr.jumps:[I
3: aload 0
aload 2
putfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
4: aload 0
aload 3
putfield org.jruby.ir.instructions.BSwitchInstr.rubyCase:Lorg/jruby/ir/operands/Label;
5: aload 0
aload 4
putfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
6: aload 0
aload 5
putfield org.jruby.ir.instructions.BSwitchInstr.elseTarget:Lorg/jruby/ir/operands/Label;
7: 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 this Lorg/jruby/ir/instructions/BSwitchInstr;
0 8 1 jumps [I
0 8 2 operand Lorg/jruby/ir/operands/Operand;
0 8 3 rubyCase Lorg/jruby/ir/operands/Label;
0 8 4 targets [Lorg/jruby/ir/operands/Label;
0 8 5 elseTarget Lorg/jruby/ir/operands/Label;
MethodParameters:
Name Flags
jumps
operand
rubyCase
targets
elseTarget
public org.jruby.ir.operands.Operand[] getOperands();
descriptor: ()[Lorg/jruby/ir/operands/Operand;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: iconst_1
anewarray org.jruby.ir.operands.Operand
dup
iconst_0
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
aastore
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
public org.jruby.ir.operands.Operand getCaseOperand();
descriptor: ()Lorg/jruby/ir/operands/Operand;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
public int[] getJumps();
descriptor: ()[I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.jumps:[I
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
public org.jruby.ir.operands.Label getRubyCaseLabel();
descriptor: ()Lorg/jruby/ir/operands/Label;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.rubyCase:Lorg/jruby/ir/operands/Label;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
public org.jruby.ir.operands.Label[] getTargets();
descriptor: ()[Lorg/jruby/ir/operands/Label;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
public org.jruby.ir.operands.Label getElseTarget();
descriptor: ()Lorg/jruby/ir/operands/Label;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.elseTarget:Lorg/jruby/ir/operands/Label;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
public void setOperand(int, org.jruby.ir.operands.Operand);
descriptor: (ILorg/jruby/ir/operands/Operand;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.jruby.ir.instructions.BSwitchInstr.$assertionsDisabled:Z
ifne 1
iload 1
ifeq 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
aload 2
putfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
0 3 1 i I
0 3 2 operand Lorg/jruby/ir/operands/Operand;
MethodParameters:
Name Flags
i
operand
public org.jruby.ir.instructions.Instr clone(org.jruby.ir.transformations.inlining.CloneInfo);
descriptor: (Lorg/jruby/ir/transformations/inlining/CloneInfo;)Lorg/jruby/ir/instructions/Instr;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
aload 1
invokevirtual org.jruby.ir.operands.Operand.cloneForInlining:(Lorg/jruby/ir/transformations/inlining/CloneInfo;)Lorg/jruby/ir/operands/Operand;
astore 2
start local 2 1: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.rubyCase:Lorg/jruby/ir/operands/Label;
invokevirtual org.jruby.ir.transformations.inlining.CloneInfo.getRenamedLabel:(Lorg/jruby/ir/operands/Label;)Lorg/jruby/ir/operands/Label;
astore 3
start local 3 2: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
arraylength
anewarray org.jruby.ir.operands.Label
astore 4
start local 4 3: iconst_0
istore 5
start local 5 4: goto 6
StackMap locals: org.jruby.ir.instructions.BSwitchInstr org.jruby.ir.transformations.inlining.CloneInfo org.jruby.ir.operands.Operand org.jruby.ir.operands.Label org.jruby.ir.operands.Label[] int
StackMap stack:
5: aload 4
iload 5
aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
iload 5
aaload
invokevirtual org.jruby.ir.transformations.inlining.CloneInfo.getRenamedLabel:(Lorg/jruby/ir/operands/Label;)Lorg/jruby/ir/operands/Label;
aastore
iinc 5 1
StackMap locals:
StackMap stack:
6: iload 5
aload 4
arraylength
if_icmplt 5
end local 5 7: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.elseTarget:Lorg/jruby/ir/operands/Label;
invokevirtual org.jruby.ir.transformations.inlining.CloneInfo.getRenamedLabel:(Lorg/jruby/ir/operands/Label;)Lorg/jruby/ir/operands/Label;
astore 5
start local 5 8: new org.jruby.ir.instructions.BSwitchInstr
dup
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.jumps:[I
aload 2
aload 3
aload 4
aload 5
invokespecial org.jruby.ir.instructions.BSwitchInstr.<init>:([ILorg/jruby/ir/operands/Operand;Lorg/jruby/ir/operands/Label;[Lorg/jruby/ir/operands/Label;Lorg/jruby/ir/operands/Label;)V
areturn
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 Lorg/jruby/ir/instructions/BSwitchInstr;
0 9 1 info Lorg/jruby/ir/transformations/inlining/CloneInfo;
1 9 2 operand Lorg/jruby/ir/operands/Operand;
2 9 3 rubyCase Lorg/jruby/ir/operands/Label;
3 9 4 targets [Lorg/jruby/ir/operands/Label;
4 7 5 i I
8 9 5 elseTarget Lorg/jruby/ir/operands/Label;
MethodParameters:
Name Flags
info
public void encode(org.jruby.ir.persistence.IRWriterEncoder);
descriptor: (Lorg/jruby/ir/persistence/IRWriterEncoder;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial org.jruby.ir.instructions.MultiBranchInstr.encode:(Lorg/jruby/ir/persistence/IRWriterEncoder;)V
1: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.jumps:[I
invokeinterface org.jruby.ir.persistence.IRWriterEncoder.encode:([I)V
2: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
invokeinterface org.jruby.ir.persistence.IRWriterEncoder.encode:(Lorg/jruby/ir/operands/Operand;)V
3: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.rubyCase:Lorg/jruby/ir/operands/Label;
invokeinterface org.jruby.ir.persistence.IRWriterEncoder.encode:(Lorg/jruby/ir/operands/Operand;)V
4: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
invokeinterface org.jruby.ir.persistence.IRWriterEncoder.encode:([Lorg/jruby/ir/operands/Operand;)V
5: aload 1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.elseTarget:Lorg/jruby/ir/operands/Label;
invokeinterface org.jruby.ir.persistence.IRWriterEncoder.encode:(Lorg/jruby/ir/operands/Operand;)V
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
0 7 1 e Lorg/jruby/ir/persistence/IRWriterEncoder;
MethodParameters:
Name Flags
e
public static org.jruby.ir.instructions.BSwitchInstr decode(org.jruby.ir.persistence.IRReaderDecoder);
descriptor: (Lorg/jruby/ir/persistence/IRReaderDecoder;)Lorg/jruby/ir/instructions/BSwitchInstr;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: new org.jruby.ir.instructions.BSwitchInstr
dup
aload 0
invokeinterface org.jruby.ir.persistence.IRReaderDecoder.decodeIntArray:()[I
aload 0
invokeinterface org.jruby.ir.persistence.IRReaderDecoder.decodeOperand:()Lorg/jruby/ir/operands/Operand;
aload 0
invokeinterface org.jruby.ir.persistence.IRReaderDecoder.decodeLabel:()Lorg/jruby/ir/operands/Label;
aload 0
invokeinterface org.jruby.ir.persistence.IRReaderDecoder.decodeLabelArray:()[Lorg/jruby/ir/operands/Label;
aload 0
invokeinterface org.jruby.ir.persistence.IRReaderDecoder.decodeLabel:()Lorg/jruby/ir/operands/Label;
invokespecial org.jruby.ir.instructions.BSwitchInstr.<init>:([ILorg/jruby/ir/operands/Operand;Lorg/jruby/ir/operands/Label;[Lorg/jruby/ir/operands/Label;Lorg/jruby/ir/operands/Label;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 d Lorg/jruby/ir/persistence/IRReaderDecoder;
MethodParameters:
Name Flags
d
public int interpretAndGetNewIPC(org.jruby.runtime.ThreadContext, org.jruby.runtime.DynamicScope, org.jruby.parser.StaticScope, org.jruby.runtime.builtin.IRubyObject, java.lang.Object[], int);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/DynamicScope;Lorg/jruby/parser/StaticScope;Lorg/jruby/runtime/builtin/IRubyObject;[Ljava/lang/Object;I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=10, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.operand:Lorg/jruby/ir/operands/Operand;
aload 1
aload 4
aload 3
aload 2
aload 5
invokevirtual org.jruby.ir.operands.Operand.retrieve:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/parser/StaticScope;Lorg/jruby/runtime/DynamicScope;[Ljava/lang/Object;)Ljava/lang/Object;
astore 7
start local 7 1: aload 7
instanceof org.jruby.RubyFixnum
ifne 3
2: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.rubyCase:Lorg/jruby/ir/operands/Label;
invokevirtual org.jruby.ir.operands.Label.getTargetPC:()I
ireturn
3: StackMap locals: java.lang.Object
StackMap stack:
aload 7
checkcast org.jruby.RubyFixnum
invokevirtual org.jruby.RubyFixnum.getIntValue:()I
istore 8
start local 8 4: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.jumps:[I
iload 8
invokestatic java.util.Arrays.binarySearch:([II)I
istore 9
start local 9 5: iload 9
ifge 7
6: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.elseTarget:Lorg/jruby/ir/operands/Label;
invokevirtual org.jruby.ir.operands.Label.getTargetPC:()I
ireturn
7: StackMap locals: int int
StackMap stack:
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
iload 9
aaload
invokevirtual org.jruby.ir.operands.Label.getTargetPC:()I
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 8 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
0 8 1 context Lorg/jruby/runtime/ThreadContext;
0 8 2 currDynScope Lorg/jruby/runtime/DynamicScope;
0 8 3 currScope Lorg/jruby/parser/StaticScope;
0 8 4 self Lorg/jruby/runtime/builtin/IRubyObject;
0 8 5 temp [Ljava/lang/Object;
0 8 6 ipc I
1 8 7 result Ljava/lang/Object;
4 8 8 value I
5 8 9 index I
MethodParameters:
Name Flags
context
currDynScope
currScope
self
temp
ipc
public void visit(org.jruby.ir.IRVisitor);
descriptor: (Lorg/jruby/ir/IRVisitor;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual org.jruby.ir.IRVisitor.BSwitchInstr:(Lorg/jruby/ir/instructions/BSwitchInstr;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
0 2 1 visitor Lorg/jruby/ir/IRVisitor;
MethodParameters:
Name Flags
visitor
public org.jruby.ir.operands.Label[] getJumpTargets();
descriptor: ()[Lorg/jruby/ir/operands/Label;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
arraylength
iconst_2
iadd
anewarray org.jruby.ir.operands.Label
astore 1
start local 1 1: aload 1
iconst_0
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.rubyCase:Lorg/jruby/ir/operands/Label;
aastore
2: aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
iconst_0
aload 1
iconst_1
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.targets:[Lorg/jruby/ir/operands/Label;
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
3: aload 1
aload 1
arraylength
iconst_1
isub
aload 0
getfield org.jruby.ir.instructions.BSwitchInstr.elseTarget:Lorg/jruby/ir/operands/Label;
aastore
4: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/ir/instructions/BSwitchInstr;
1 5 1 jumpTargets [Lorg/jruby/ir/operands/Label;
private static boolean jumpsAreSorted(int[]);
descriptor: ([I)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
arraylength
ifne 1
iconst_1
ireturn
1: StackMap locals:
StackMap stack:
aload 0
iconst_0
iaload
istore 1
start local 1 2: iconst_1
istore 2
start local 2 3: goto 8
4: StackMap locals: int int
StackMap stack:
aload 0
iload 2
iaload
istore 3
start local 3 5: iload 1
iload 3
if_icmple 6
iconst_0
ireturn
6: StackMap locals: int
StackMap stack:
iload 3
istore 1
end local 3 7: iinc 2 1
StackMap locals:
StackMap stack:
8: iload 2
aload 0
arraylength
if_icmplt 4
end local 2 9: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 jumps [I
2 10 1 prev I
3 9 2 i I
5 7 3 curr I
MethodParameters:
Name Flags
jumps final
}
SourceFile: "BSwitchInstr.java"