Top Fields Constructors Methods
org.jruby.ir.operands

public Class IRException

extends Operand
Class Inheritance
Imports
org.jruby.Ruby, .RubyLocalJumpError, org.jruby.ir.IRVisitor, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.runtime.Helpers, java.util.List

Field Summary

Modifier and TypeField and Description
public static final IRException
public static final IRException
public static final IRException
public static final IRException
public static final IRException
private final RubyLocalJumpError.Reason
Inherited from org.jruby.ir.operands.Operand:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
protected

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 -- force every operand to implement this because a missing implementation can cause bad failures.

public boolean
canCopyPropagate()

Overrides org.jruby.ir.operands.Operand.canCopyPropagate.

Can we replace every use of a variable 'v' that contains the value of this operand with the operand itself?

public Operand
public static IRException
public void
public RuntimeException
getException(Ruby runtime)

public static IRException
public OperandType
public RubyLocalJumpError.Reason
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

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

Field Detail

BREAK_LocalJumpErrorback to summary
public static final IRException BREAK_LocalJumpError
NEXT_LocalJumpErrorback to summary
public static final IRException NEXT_LocalJumpError
REDO_LocalJumpErrorback to summary
public static final IRException REDO_LocalJumpError
RETRY_LocalJumpErrorback to summary
public static final IRException RETRY_LocalJumpError
RETURN_LocalJumpErrorback to summary
public static final IRException RETURN_LocalJumpError
typeback to summary
private final RubyLocalJumpError.Reason type

Constructor Detail

IRExceptionback to summary
protected IRException(RubyLocalJumpError.Reason type)

Method Detail

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

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

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

Append the list of variables used in this operand to the input list -- force every operand to implement this because a missing implementation can cause bad failures.

Annotations
@Override
canCopyPropagateback to summary
public boolean canCopyPropagate()

Overrides org.jruby.ir.operands.Operand.canCopyPropagate.

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

Can we replace every use of a variable 'v' that contains the value of this operand with the operand itself? This takes importance when there are at least two uses of 'v' within this scope. Ex: v = [1,2,3]; x = v; y = v In this case, we cannot replace the occurrences of 'v' because we would then get x = [1,2,3]; y = [1,2,3] which would then result in two different array objects being constructed instead of a single one.

Returns:boolean

true if it is safe to copy-propagate the operand.

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 IRException decode(IRReaderDecoder d)
encodeback to summary
public void encode(IRWriterEncoder e)

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

Annotations
@Override
getExceptionback to summary
public RuntimeException getException(Ruby runtime)
getExceptionFromOrdinalback to summary
public static IRException getExceptionFromOrdinal(int ordinal)
getOperandTypeback to summary
public OperandType getOperandType()

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

Annotations
@Override
getTypeback to summary
public RubyLocalJumpError.Reason getType()
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