Package org.jruby.ir.instructions
Class BSwitchInstr
java.lang.Object
org.jruby.ir.instructions.Instr
org.jruby.ir.instructions.MultiBranchInstr
org.jruby.ir.instructions.BSwitchInstr
Represents a multiple-target jump instruction based on a switch-like table
-
Field Summary
Fields inherited from class org.jruby.ir.instructions.Instr
EMPTY_OPERANDS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope).static BSwitchInstr
void
int[]
getJumps()
Label[]
Operand[]
Label[]
int
interpretAndGetNewIPC
(ThreadContext context, DynamicScope currDynScope, StaticScope currScope, IRubyObject self, Object[] temp, int ipc) void
setOperand
(int i, Operand operand) void
Methods inherited from class org.jruby.ir.instructions.Instr
canBeDeletedFromScope, canRaiseException, cloneOperands, computeScopeFlags, dumpableFields, getOperation, getUsedVariables, hasSideEffects, interpret, isDead, isDeletable, markDead, renameVars, simplifyInstr, simplifyOperands, simplifyOperands, toString, toStringNonOperandArgs, transfersControl
-
Constructor Details
-
BSwitchInstr
-
-
Method Details
-
getOperands
- Specified by:
getOperands
in classInstr
-
getCaseOperand
-
getJumps
public int[] getJumps() -
getRubyCaseLabel
-
getTargets
-
getElseTarget
-
getExpectedClass
-
setOperand
- Specified by:
setOperand
in classInstr
-
clone
Description copied from class:Instr
Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). This might renaming variables and labels to eliminate naming conflicts. The implementation might vary on the cloning mode. -
encode
-
decode
-
interpretAndGetNewIPC
public int interpretAndGetNewIPC(ThreadContext context, DynamicScope currDynScope, StaticScope currScope, IRubyObject self, Object[] temp, int ipc) - Overrides:
interpretAndGetNewIPC
in classInstr
-
visit
-
getJumpTargets
- Specified by:
getJumpTargets
in classMultiBranchInstr
-