Top Description Fields Constructors Methods
org.jruby.ir.operands

public Class Filename

extends Operand
Class Inheritance
Imports
org.jruby.ir.IRVisitor, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, 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.List

Represents the script's __FILE__. Isolated as its own operand because we need to be able to replace it when loading persisted IR from a location different than original script.

Field Summary

Inherited from org.jruby.ir.operands.Operand:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
public

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 Operand
public static Filename
public void
public OperandType
public boolean
hasKnownValue()

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

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

public Object
public void
Inherited from org.jruby.ir.operands.Operand:
canCopyPropagategetSimplifiedOperandgetValueisFalseyImmediateisTruthyImmediate

Constructor Detail

Filenameback to summary
public Filename()

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
cloneForInliningback to summary
public Operand cloneForInlining(CloneInfo ii)

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

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

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

Annotations
@Override
getOperandTypeback to summary
public OperandType getOperandType()

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

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
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
visitback to summary
public void visit(IRVisitor visitor)

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

Annotations
@Override