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 TypeMethodDescriptionvoid
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.static Filename
void
boolean
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).retrieve
(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) void
Methods inherited from class org.jruby.ir.operands.Operand
canCopyPropagate, getSimplifiedOperand, getValue, isFalseyImmediate, isTruthyImmediate
-
Constructor Details
-
Filename
public Filename()
-
-
Method Details
-
getOperandType
- Specified by:
getOperandType
in classOperand
-
hasKnownValue
public boolean hasKnownValue()Description copied from class:Operand
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).- Overrides:
hasKnownValue
in 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:
cloneForInlining
in classOperand
-
addUsedVariables
Description copied from class:Operand
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.- Specified by:
addUsedVariables
in classOperand
-