Top Fields Constructors Methods
org.jruby.ir.operands

public Class Array

extends Operand
implements Iterable<Operand>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Imports
org.jruby.RubyArray, org.jruby.ir.IRVisitor, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, java.util.Arrays, .Iterator, .List, .Map

Field Summary

Modifier and TypeField and Description
private final Operand[]
Inherited from org.jruby.ir.operands.Operand:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
public
public
Array(Operand[] elts)

Method Summary

Modifier and TypeMethod and Description
public void
addUsedVariables(List<Variable> l)

Implements abstract org.jruby.ir.operands.Operand.addUsedVariables.

Append the list of variables used in this operand to the input list

public Operand
public static Array
public void
public Operand
get(int i)

public Operand[]
public OperandType
public Operand
public boolean
hasKnownValue()

Overrides org.jruby.ir.operands.Operand.hasKnownValue.

Do we know the value of this operand at compile-time?

public boolean
public Iterator<Operand>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public Object
public IRubyObject[]
retrieveArrayElts(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)

public int
size()

public Operand
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
Inherited from org.jruby.ir.operands.Operand:
canCopyPropagategetValueisFalseyImmediateisTruthyImmediate

Field Detail

eltsback to summary
private final Operand[] elts

Constructor Detail

Arrayback to summary
public Array()
Arrayback to summary
public Array(Operand[] elts)

Method Detail

addUsedVariablesback to summary
public void addUsedVariables(List<Variable> l)

Implements abstract org.jruby.ir.operands.Operand.addUsedVariables.

Append the list of variables used in this operand to the input list

Annotations
@Override
cloneForInliningback to summary
public Operand cloneForInlining(CloneInfo ii)

Implements abstract org.jruby.ir.operands.Operand.cloneForInlining.

Annotations
@Override
decodeback to summary
public static Array decode(IRReaderDecoder d)
encodeback to summary
public void encode(IRWriterEncoder e)

Overrides org.jruby.ir.operands.Operand.encode.

Annotations
@Override
getback to summary
public Operand get(int i)
getEltsback to summary
public Operand[] getElts()
getOperandTypeback to summary
public OperandType getOperandType()

Implements abstract org.jruby.ir.operands.Operand.getOperandType.

Annotations
@Override
getSimplifiedOperandback to summary
public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force)

Overrides org.jruby.ir.operands.Operand.getSimplifiedOperand.

Annotations
@Override
hasKnownValueback to summary
public boolean hasKnownValue()

Overrides org.jruby.ir.operands.Operand.hasKnownValue.

Doc from org.jruby.ir.operands.Operand.hasKnownValue.

Do we know the value of this operand at compile-time? If we do then it may be possible to constant propagate (one case: We also know it is also an ImmutableLiteral).

Returns:boolean

true if a known compile-time value.

Annotations
@Override
isBlankback to summary
public boolean isBlank()
iteratorback to summary
public Iterator<Operand> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<Operand>

an Iterator.

Annotations
@Override
retrieveback to summary
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)

Overrides org.jruby.ir.operands.Operand.retrieve.

Annotations
@Override
retrieveArrayEltsback to summary
public IRubyObject[] retrieveArrayElts(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
sizeback to summary
public int size()
toArrayback to summary
public Operand toArray()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

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

Overrides org.jruby.ir.operands.Operand.visit.

Annotations
@Override