Top Constructors Methods
org.jruby.ir.instructions

public Class ToAryInstr

extends OneOperandResultBaseInstr
implements FixedArityInstr
Class Inheritance
All Implemented Interfaces
org.jruby.ir.instructions.FixedArityInstr
Imports
org.jruby.ir.IRScope, .IRVisitor, .Operation, org.jruby.ir.interpreter.FullInterpreterContext, org.jruby.ir.operands.Array, .Operand, .Variable, org.jruby.ir.persistence.IRReaderDecoder, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, java.util.Map

Constructor Summary

AccessConstructor and Description
public
ToAryInstr(Variable result, Operand array)

Method Summary

Modifier and TypeMethod and Description
public boolean
public Instr
clone(CloneInfo
This object manages renaming of variables and labels, handles args and return values.
ii
)

Implements abstract org.jruby.ir.instructions.Instr.clone.

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).

public static ToAryInstr
public Operand
public Object
public Operand
simplifyOperands(IRScope
where this instr exists
scope
,
Map<Operand, Operand>
Mapping from operands to their simplified values
valueMap
)

Overrides org.jruby.ir.instructions.Instr.simplifyOperands.

This method takes as input a map of operands to their values, and outputs the result of this instruction.

public void
Inherited from org.jruby.ir.instructions.OneOperandResultBaseInstr:
encodegetOperand1getOperandssetOperandsetOperand1

Constructor Detail

ToAryInstrback to summary
public ToAryInstr(Variable result, Operand array)

Method Detail

canBeDeletedFromScopeback to summary
public boolean canBeDeletedFromScope(FullInterpreterContext fic)

Overrides org.jruby.ir.instructions.Instr.canBeDeletedFromScope.

Annotations
@Override
cloneback to summary
public Instr clone(CloneInfo ii)

Implements abstract org.jruby.ir.instructions.Instr.clone.

Doc from org.jruby.ir.instructions.Instr.clone.

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.

Parameters
ii:CloneInfo

This object manages renaming of variables and labels, handles args and return values.

Returns:Instr

a new instruction that can be used in the target scope.

Annotations
@Override
decodeback to summary
public static ToAryInstr decode(IRReaderDecoder d)
getArrayback to summary
public Operand getArray()
interpretback to summary
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)

Overrides org.jruby.ir.instructions.Instr.interpret.

Annotations
@Override
simplifyOperandsback to summary
public Operand simplifyOperands(IRScope scope, Map<Operand, Operand> valueMap)

Overrides org.jruby.ir.instructions.Instr.simplifyOperands.

Doc from org.jruby.ir.instructions.Instr.simplifyOperands.

This method takes as input a map of operands to their values, and outputs the result of this instruction. If the value map provides a value for any of the instruction's operands the expectation is that the operand will be replaced with the simplified value. It is not required that it do so -- code correctness is not compromised by failure to simplify.

Parameters
scope:IRScope

where this instr exists

valueMap:Map<Operand, Operand>

Mapping from operands to their simplified values

Returns:Operand

simplified result / output of this instruction

Annotations
@Override
visitback to summary
public void visit(IRVisitor visitor)

Overrides org.jruby.ir.instructions.Instr.visit.

Annotations
@Override