public class ToAryInstr extends ResultBaseInstr implements FixedArityInstr
result
EMPTY_OPERANDS, operands
Constructor and Description |
---|
ToAryInstr(Variable result,
Operand array) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeDeleted(IRScope s)
Can this instruction be deleted? LVA will preserve instructions based on whether operands (variables)
are living but even if there are no living variables then the instruction itself may not be able to be removed
during DCE for other reasons (like if it unconditionally has a side-effect or it happens to be living in a
scope where a binding can escape and one of its operands is a local variable).
|
Instr |
clone(CloneInfo 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).
|
static ToAryInstr |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
Operand |
getArray() |
Object |
interpret(ThreadContext context,
StaticScope currScope,
DynamicScope currDynScope,
IRubyObject self,
Object[] temp) |
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 |
visit(IRVisitor visitor) |
getResult, updateResult
canRaiseException, cloneOperands, computeScopeFlags, getIPC, getOperands, getOperation, getRPC, getUsedVariables, hasSideEffects, interpretAndGetNewIPC, isDead, markDead, renameVars, setIPC, setRPC, simplifyOperands, toString, toStringNonOperandArgs, transfersControl
public Operand getArray()
public boolean canBeDeleted(IRScope s)
Instr
canBeDeleted
in class Instr
public Operand simplifyAndGetResult(IRScope scope, Map<Operand,Operand> valueMap)
Instr
simplifyAndGetResult
in class Instr
scope
- where this instr existsvalueMap
- Mapping from operands to their simplified valuespublic Instr clone(CloneInfo ii)
Instr
public void encode(IRWriterEncoder e)
encode
in class ResultBaseInstr
public static ToAryInstr decode(IRReaderDecoder d)
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)
Copyright © 2001-2015 JRuby. All Rights Reserved.