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
ClosureLocalVariable — members 8+
C new(name, scope_depth, location)
C new(name, scope_depth, location, is_outer_scope_var)
M clone(ii) Variable
M clone_for_depth(n) LocalVariable
C encode(e)
M equals(obj) boolean
M to_string() String
C visit(visitor)
from Operand
F EMPTY_ARRAY Operand[]
M falsey_immediate?() boolean
M has_known_value?() boolean
M truthy_immediate?() boolean
from Variable
C add_used_variables(l)
M can_copy_propagate() boolean
M clone_for_inlining(ii) Operand
M get_simplified_operand(value_map, force) Operand
M get_value(value_map) Operand
M self?() boolean
from LocalVariable
M hash_code() int
M id() String
M is_same_depth(other) boolean
M location() int
M name() RubySymbol
M offset() int
M operand_type() OperandType
M outer_scope_var?() boolean
M retrieve(context, self, curr_scope, curr_dyn_scope, temp) Object
M scope_depth() int

org.jruby.ir.operands.ClosureLocalVariable

class extends LocalVariable 8 members

This represents a non-temporary variable used in a closure and defined in this or a parent closure.

Constructors

new

new ( RubySymbol name, int scope_depth, int location )
Java: <init>(org.jruby.RubySymbol name, int scopeDepth, int location)

new

new ( RubySymbol name, int scope_depth, int location, boolean is_outer_scope_var )
Java: <init>(org.jruby.RubySymbol name, int scopeDepth, int location, boolean isOuterScopeVar)

Instance Methods

clone

Variable clone ( SimpleCloneInfo ii )
Java: clone(org.jruby.ir.transformations.inlining.SimpleCloneInfo ii)

clone_for_depth

LocalVariable clone_for_depth ( int n )
Java: cloneForDepth(int n)

encode

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

equals

boolean equals ( Object obj )
Java: equals(Object obj)

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

falsey_immediate?

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

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)

from Variable

add_used_variables

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

Append the list of variables used in this operand to the input list

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)

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)

self?

boolean self? ( )
Java: isSelf() · also: is_self

from LocalVariable

hash_code

int hash_code ( )
Java: hashCode()

id

String id ( )
Java: getId() · also: get_id

is_same_depth

boolean is_same_depth ( LocalVariable other )
Java: isSameDepth(org.jruby.ir.operands.LocalVariable other)

location

int location ( )
Java: getLocation() · also: get_location

name

RubySymbol name ( )
Java: getName() · also: get_name

offset

int offset ( )
Java: getOffset() · also: get_offset

operand_type

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

outer_scope_var?

boolean outer_scope_var? ( )
Java: isOuterScopeVar() · also: is_outer_scope_var

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)

scope_depth

int scope_depth ( )
Java: getScopeDepth() · also: get_scope_depth