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

org.jruby.ir.operands.Nil

class extends ImmutableLiteral 6 members

Represents nil. Note: We used to protect the constructor, but since manager is the new way I got lazy and removed protected.

Constructors

new

new ( )
Java: <init>()

Instance Methods

create_cache_object

Object create_cache_object ( ThreadContext context )
Java: createCacheObject(org.jruby.runtime.ThreadContext context)

falsey_immediate?

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

operand_type

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

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[]

encode

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

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)

from ImmutableLiteral

add_used_variables

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

cached?

boolean cached? ( )
Java: isCached() · also: is_cached

Has this object already been cached?

cached_object

T cached_object ( ThreadContext context )
Java: cachedObject(org.jruby.runtime.ThreadContext context)

Returns the cached object. If not then it asks class to create an object to cache.

can_copy_propagate

boolean can_copy_propagate ( )
Java: canCopyPropagate()

clone_for_inlining

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

has_known_value?

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

retrieve

T 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)

retrieve the live value represented by this immutable literal. An interesting property of knowing something cannot change at compile time is that all information necessary to construct it is also known at compile time. We don't pre-create these since we don't want to assume the cost of constructing literals which may never be used.