public class ToAryInstr extends Instr implements ResultInstr
EMPTY_OPERANDS
Constructor and Description |
---|
ToAryInstr(Variable result,
Operand array,
BooleanLiteral dontToAryArrays) |
Modifier and Type | Method and Description |
---|---|
Instr |
cloneForInlining(InlinerInfo ii)
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).
|
boolean |
dontToAryArrays() |
Operand |
getArrayArg() |
Operand[] |
getOperands() |
Variable |
getResult() |
Object |
interpret(ThreadContext context,
DynamicScope currDynScope,
IRubyObject self,
Object[] temp,
Block block) |
Operand |
simplifyAndGetResult(IRScope scope,
Map<Operand,Operand> valueMap)
This method takes as input a map of operands to their values, and outputs
the result of this instruction.
|
void |
simplifyOperands(Map<Operand,Operand> valueMap,
boolean force)
This method takes as input a map of operands to their values, and outputs
If the value map provides a value for any of the instruction's operands
this method is expected to replace the original operands with the simplified values.
|
String |
toString() |
void |
updateResult(Variable v) |
void |
visit(IRVisitor visitor) |
canBeDeleted, canRaiseException, cloneForBlockCloning, cloneForInlinedClosure, cloneForInlinedScope, getOperation, getUsedVariables, hasSideEffects, hasUnusedResult, interpretAndGetNewIPC, isDead, markDead, markUnusedResult, renameVars, transfersControl
public ToAryInstr(Variable result, Operand array, BooleanLiteral dontToAryArrays)
public Operand getArrayArg()
public boolean dontToAryArrays()
public Operand[] getOperands()
getOperands
in class Instr
public void simplifyOperands(Map<Operand,Operand> valueMap, boolean force)
Instr
simplifyOperands
in class Instr
public Operand simplifyAndGetResult(IRScope scope, Map<Operand,Operand> valueMap)
Instr
simplifyAndGetResult
in class Instr
valueMap
- Mapping from operands to their simplified valuespublic Variable getResult()
getResult
in interface ResultInstr
public void updateResult(Variable v)
updateResult
in interface ResultInstr
public Instr cloneForInlining(InlinerInfo ii)
Instr
cloneForInlining
in class Instr
ii
- This object manages renaming of variables and labels, handles
args and return values.public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block)
Copyright © 2001-2014 JRuby. All Rights Reserved.