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
StandardError — members 7+
C new()
C add_used_variables(l)
M clone_for_inlining(ii) Operand
M operand_type() OperandType
M retrieve(context, self, curr_scope, curr_dyn_scope, temp) Object
M to_string() String
C visit(visitor)
from Operand
F EMPTY_ARRAY Operand[]
M can_copy_propagate() boolean
C encode(e)
M falsey_immediate?() boolean
M get_simplified_operand(value_map, force) Operand
M get_value(value_map) Operand
M has_known_value?() boolean
M truthy_immediate?() boolean

org.jruby.ir.operands.StandardError

class extends Operand 7 members

Constructors

new

new ( )
Java: <init>()

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)

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)

to_string

String to_string ( )
Java: toString()

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.

encode

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

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)

has_known_value?

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

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: true if a known compile-time value.

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)