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 BSwitchInstrvoidint[]getJumps()Label[]Operand[]Label[]intinterpretAndGetNewIPC(ThreadContext context, DynamicScope currDynScope, StaticScope currScope, IRubyObject self, Object[] temp, int ipc) voidsetOperand(int i, Operand operand) voidMethods 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:
getOperandsin classInstr
-
getCaseOperand
-
getJumps
public int[] getJumps() -
getRubyCaseLabel
-
getTargets
-
getElseTarget
-
getExpectedClass
-
setOperand
- Specified by:
setOperandin classInstr
-
clone
Description copied from class:InstrClone 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:
interpretAndGetNewIPCin classInstr
-
visit
-
getJumpTargets
- Specified by:
getJumpTargetsin classMultiBranchInstr
-