jruby/docs BETA
Navigation
org.jruby.ir.operands 57
C Array
C Bignum
C Boolean
C BuiltinClass
C ChilledString
C ClosureLocalVariable
C Complex
C CurrentScope
I DepthCloneable
C DynamicSymbol
C Filename
C Fixnum
C Float
C FrozenString
C GlobalVariable
C Hash
C IRException
C ImmutableLiteral
C Integer
C Label
C LocalVariable
C MutableString
C Nil
C NullBlock
C Operand
E OperandType
C Range
C Rational
C Reference
C Regexp
C SValue
C Scope
C ScopeModule
C Self
C Splat
C StandardError
I StringLiteral
I Stringable
C Symbol
C SymbolProc
C TemporaryBooleanVariable
C TemporaryClosureVariable
C TemporaryCurrentModuleVariable
C TemporaryFixnumVariable
C TemporaryFloatVariable
C TemporaryIntVariable
C TemporaryLocalReplacementVariable
C TemporaryLocalVariable
C TemporaryVariable
E TemporaryVariableType
C UnboxedBoolean
C UnboxedFixnum
C UnboxedFloat
C UndefinedValue
C UnexecutableNil
C Variable
C WrappedIRClosure
Filename — members 9+
C new()
C add_used_variables(l)
M clone_for_inlining(ii) Operand
M decode(d) Filename
C encode(e)
M has_known_value?() boolean
M operand_type() OperandType
M retrieve(context, self, curr_scope, curr_dyn_scope, temp) Object
C visit(visitor)
from Operand
F EMPTY_ARRAY Operand[]
M can_copy_propagate() boolean
M falsey_immediate?() boolean
M get_simplified_operand(value_map, force) Operand
M get_value(value_map) Operand
M truthy_immediate?() boolean

org.jruby.ir.operands.Filename

class extends Operand 9 members

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.

Constructors

new

new ( )
Java: <init>()

Class Methods

decode

Filename decode ( IRReaderDecoder d )
Java: decode(org.jruby.ir.persistence.IRReaderDecoder d)

Instance Methods

add_used_variables

add_used_variables ( List<Variable> l )
Java: addUsedVariables(List<org.jruby.ir.operands.Variable> l)

clone_for_inlining

Operand clone_for_inlining ( CloneInfo ii )
Java: cloneForInlining(org.jruby.ir.transformations.inlining.CloneInfo ii)

encode

encode ( IRWriterEncoder e )
Java: encode(org.jruby.ir.persistence.IRWriterEncoder e)

has_known_value?

boolean has_known_value? ( )
Java: hasKnownValue() · also: has_known_value

operand_type

OperandType operand_type ( )
Java: getOperandType() · also: get_operand_type

retrieve

Object retrieve ( ThreadContext context, IRubyObject self, StaticScope curr_scope, DynamicScope curr_dyn_scope, Object[] temp )
Java: retrieve(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope currDynScope, Object[] temp)

visit

visit ( IRVisitor visitor )
Java: visit(org.jruby.ir.IRVisitor visitor)

Inherited

from Operand

fieldtypenote
EMPTY_ARRAY Operand[]

can_copy_propagate

boolean can_copy_propagate ( )
Java: 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: true if it is safe to copy-propagate the operand.

falsey_immediate?

boolean falsey_immediate? ( )
Java: isFalseyImmediate() · also: is_falsey_immediate

get_simplified_operand

Operand get_simplified_operand ( Map<Operand,Operand> value_map, boolean force )
Java: getSimplifiedOperand(Map<org.jruby.ir.operands.Operand,org.jruby.ir.operands.Operand> valueMap, boolean force)

get_value

Operand get_value ( Map<Operand,Operand> value_map )
Java: getValue(Map<org.jruby.ir.operands.Operand,org.jruby.ir.operands.Operand> valueMap)

truthy_immediate?

boolean truthy_immediate? ( )
Java: isTruthyImmediate() · also: is_truthy_immediate

Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)