Package org.jruby.ir.operands
Class Filename
java.lang.Object
org.jruby.ir.operands.Operand
org.jruby.ir.operands.Filename
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
Fields inherited from class org.jruby.ir.operands.Operand
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend 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.static FilenamevoidbooleanDo 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).retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) voidMethods inherited from class org.jruby.ir.operands.Operand
canCopyPropagate, getSimplifiedOperand, getValue, isFalseyImmediate, isTruthyImmediate
-
Constructor Details
-
Filename
public Filename()
-
-
Method Details
-
getOperandType
- Specified by:
getOperandTypein classOperand
-
hasKnownValue
public boolean hasKnownValue()Description copied from class:OperandDo 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).- Overrides:
hasKnownValuein classOperand- Returns:
- true if a known compile-time value.
-
encode
-
decode
-
visit
-
retrieve
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) -
cloneForInlining
- Specified by:
cloneForInliningin classOperand
-
addUsedVariables
Description copied from class:OperandAppend 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.- Specified by:
addUsedVariablesin classOperand
-