jruby/docs BETA
Navigation
org.jruby.ir.instructions 146
C AliasInstr
I ArgReceiver
C ArrayDerefInstr
C AsFixnumInstr
C AsStringInstr
C AttrAssignInstr
C BFalseInstr
C BIntInstr
C BNEInstr
C BNilInstr
C BSwitchInstr
C BTrueInstr
C BUndefInstr
C BlockGivenCallInstr
C BlockGivenInstr
C BranchInstr
C BreakInstr
C BuildBackrefInstr
C BuildCompoundArrayInstr
C BuildCompoundStringInstr
C BuildDynRegExpInstr
C BuildLambdaInstr
C BuildNthRefInstr
C BuildRangeInstr
C BuildSplatInstr
C CallBase
C CallInstr
C CheckArgsArrayArityInstr
C CheckArityInstr
C CheckForLJEInstr
C ClassSuperInstr
I ClosureAcceptingInstr
C CopyInstr
C DebugOutputInstr
C DefineClassInstr
C DefineClassMethodInstr
C DefineInstanceMethodInstr
C DefineMetaClassInstr
C DefineModuleInstr
C EQQInstr
C ExceptionRegionEndMarkerInstr
C ExceptionRegionStartMarkerInstr
I FixedArityInstr
C FrameNameCallInstr
C GVarAliasInstr
C GetClassVarContainerModuleInstr
C GetClassVariableInstr
C GetEncodingInstr
C GetFieldInstr
C GetGlobalVariableInstr
C GetInstr
C InheritanceSearchConstInstr
C InlinedLineNumberInstr
C InstanceSuperInstr
C Instr
C IntegerMathInstr
C JumpInstr
I JumpTargetInstr
C LabelInstr
C LexicalSearchConstInstr
C LineNumberInstr
C LoadBlockImplicitClosureInstr
C LoadFrameClosureInstr
C LoadImplicitClosureInstr
C LoadLocalVarInstr
C MatchInstr
C ModuleVersionGuardInstr
C MultiBranchInstr
C MultipleAsgnBase
C NOperandInstr
C NOperandResultBaseInstr
C NoOperandInstr
C NoOperandResultBaseInstr
C NoResultCallInstr
C NonlocalReturnInstr
C NopInstr
C OneOperandBranchInstr
C OneOperandInstr
C OneOperandResultBaseInstr
C OptArgMultipleAsgnInstr
C PopBackrefFrameInstr
C PopBindingInstr
C PopBlockFrameInstr
C PopMethodFrameInstr
C PrepareBlockArgsInstr
C PrepareFixedBlockArgsInstr
C PrepareNoBlockArgsInstr
C PrepareSingleBlockArgInstr
C ProcessModuleBodyInstr
C PushBackrefFrameInstr
C PushBlockBindingInstr
C PushBlockFrameInstr
C PushMethodBindingInstr
C PushMethodFrameInstr
C PutClassVariableInstr
C PutConstInstr
C PutFieldInstr
C PutGlobalVarInstr
C PutInstr
C RaiseArgumentErrorInstr
C RaiseRequiredKeywordArgumentError
C ReceiveArgBase
C ReceiveExceptionBase
C ReceiveIndexedArgBase
C ReceiveJRubyExceptionInstr
C ReceiveKeywordArgInstr
C ReceiveKeywordRestArgInstr
C ReceiveKeywordsInstr
C ReceiveOptArgInstr
C ReceivePostReqdArgInstr
C ReceivePreReqdArgInstr
C ReceiveRestArgInstr
C ReceiveRubyExceptionInstr
C ReceiveSelfInstr
C RecordEndBlockInstr
C ReifyClosureInstr
C ReqdArgMultipleAsgnInstr
C RescueEQQInstr
C RestArgMultipleAsgnInstr
C RestoreBindingVisibilityInstr
C ResultBaseInstr
I ResultInstr
C ReturnBase
C ReturnInstr
C ReturnOrRethrowSavedExcInstr
C RuntimeHelperCall
C SaveBindingVisibilityInstr
C SearchConstInstr
C SearchModuleForConstInstr
C SetCapturedVarInstr
I Site
C StoreLocalVarInstr
E SuperInstrType
C ThreadPollInstr
C ThrowExceptionInstr
C ToAryInstr
C ToggleBacktraceInstr
C TraceInstr
C TwoOperandBranchInstr
C TwoOperandInstr
C TwoOperandResultBaseInstr
C UndefMethodInstr
C UnresolvedSuperInstr
C UpdateBlockExecutionStateInstr
C YieldInstr
C ZSuperInstr
NoResultCallInstr — members 6+
C new(scope, op, call_type, name, receiver, args, closure, flags, is_potentially_refined)
M clone(ii) Instr
M create(scope, call_type, name, receiver, args, closure, flags, is_potentially_refined) NoResultCallInstr
M decode(d) NoResultCallInstr
M result() Variable
C visit(visitor)
from Instr
F EMPTY_OPERANDS Operand[]
M can_be_deleted_from_scope(fic) boolean
M can_raise_exception() boolean
M clone_operands(info) Operand[]
M dead?() boolean
M deletable?() boolean
M dumpable_fields() Field[]
M has_side_effects?() boolean
M interpret_and_get_new_ipc(context, curr_dyn_scope, curr_scope, self, temp, ipc) int
C mark_dead()
M operation() Operation
C rename_vars(rename_map)
M simplify_instr(manager) Instr
M simplify_operands(scope, value_map) Operand
M to_string() String
M transfers_control() boolean
M used_variables() Variable>
from NOperandInstr
M operands() Operand[]
C set_operand(i, operand)
from CallBase
F callSiteId long
M arg1() Operand
M args_count() int
C block_inlining()
M call_args() Operand[]
M call_site() CallSite
M call_site_id() long
C call_site_id=(call_site_id)
M call_type() CallType
M can_be_eval() boolean
M clone_call_args(ii) Operand[]
M closure_arg() Operand
M compute_scope_flags(scope, flags) boolean
C encode(e)
M flags() int
M get_closure_arg(if_unspecified) Operand
M has_literal_closure?() boolean
M id() String
M inlining_blocked() boolean
M interpret(context, curr_scope, dynamic_scope, self, temp) Object
M name() RubySymbol
M potentially_refined?() boolean
M prepare_arguments(context, self, curr_scope, dynamic_scope, temp) IRubyObject[]
M prepare_block(context, self, curr_scope, curr_dyn_scope, temp) Block
M receiver() Operand
M splat_map() boolean[]
M target_requires_callers_binding() boolean
M target_requires_callers_frame() boolean
M to_string_non_operand_args() String[]

org.jruby.ir.instructions.NoResultCallInstr

class extends CallBase 6 members

Constructors

new

new ( IRScope scope, Operation op, CallType call_type, RubySymbol name, Operand receiver, Operand[] args, Operand closure, int flags, boolean is_potentially_refined )
Java: <init>(org.jruby.ir.IRScope scope, org.jruby.ir.Operation op, org.jruby.runtime.CallType callType, org.jruby.RubySymbol name, org.jruby.ir.operands.Operand receiver, org.jruby.ir.operands.Operand[] args, org.jruby.ir.operands.Operand closure, int flags, boolean isPotentiallyRefined)

Class Methods

create

NoResultCallInstr create ( IRScope scope, CallType call_type, RubySymbol name, Operand receiver, Operand[] args, Operand closure, int flags, boolean is_potentially_refined )
Java: create(org.jruby.ir.IRScope scope, org.jruby.runtime.CallType callType, org.jruby.RubySymbol name, org.jruby.ir.operands.Operand receiver, org.jruby.ir.operands.Operand[] args, org.jruby.ir.operands.Operand closure, int flags, boolean isPotentiallyRefined)

decode

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

Instance Methods

clone

Instr clone ( CloneInfo ii )
Java: clone(org.jruby.ir.transformations.inlining.CloneInfo ii)

result

Variable result ( )
Java: getResult() · also: get_result

result and non-result call instructions are processed with the same code so we provide this method to make that same code simpler.

visit

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

Inherited

from Instr

fieldtypenote
EMPTY_OPERANDS Operand[]

can_be_deleted_from_scope

boolean can_be_deleted_from_scope ( FullInterpreterContext fic )
Java: canBeDeletedFromScope(org.jruby.ir.interpreter.FullInterpreterContext fic)

can_raise_exception

boolean can_raise_exception ( )
Java: canRaiseException()

clone_operands

Operand[] clone_operands ( CloneInfo info )
Java: cloneOperands(org.jruby.ir.transformations.inlining.CloneInfo info)

dead?

boolean dead? ( )
Java: isDead() · also: is_dead

deletable?

boolean deletable? ( )
Java: isDeletable() · also: is_deletable

Can this instruction be deleted? LVA will preserve instructions based on whether operands (variables) are living but even if there are no living variables then the instruction itself may not be able to be removed during DCE for other reasons (like if it unconditionally has a side-effect)

dumpable_fields

Field[] dumpable_fields ( )
Java: dumpableFields()

has_side_effects?

boolean has_side_effects? ( )
Java: hasSideEffects() · also: has_side_effects

interpret_and_get_new_ipc

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

mark_dead

mark_dead ( )
Java: markDead()

operation

Operation operation ( )
Java: getOperation() · also: get_operation

rename_vars

rename_vars ( Map<Operand,Operand> rename_map )
Java: renameVars(Map<org.jruby.ir.operands.Operand,org.jruby.ir.operands.Operand> renameMap)

simplify_instr

Instr simplify_instr ( IRManager manager )
Java: simplifyInstr(org.jruby.ir.IRManager manager)

simplify_operands

Operand simplify_operands ( IRScope scope, Map<Operand,Operand> value_map )
Java: simplifyOperands(org.jruby.ir.IRScope scope, Map<org.jruby.ir.operands.Operand,org.jruby.ir.operands.Operand> valueMap)

This method takes as input a map of operands to their values, and outputs the result of this instruction. If the value map provides a value for any of the instruction's operands the expectation is that the operand will be replaced with the simplified value. It is not required that it do so -- code correctness is not compromised by failure to simplify.

nametypedescription
scopeorg.jruby.ir.IRScopewhere this instr exists
value_mapMap<org.jruby.ir.operands.Operand,org.jruby.ir.operands.Operand>Mapping from operands to their simplified values

Returns: simplified result / output of this instruction

to_string

String to_string ( )
Java: toString()

Instructions are meant to be in a machine-readable format so offline tooling can parse the debugging output. The format is: (result_op '=')? instr '(' (operand ',' )* operand? ';' (extra_arg ',')* extra_arg? ')' extra_arg can either be plain value or in a key: value format.

Returns: a String

transfers_control

boolean transfers_control ( )
Java: transfersControl()

used_variables

List<Variable> used_variables ( )
Java: getUsedVariables() · also: get_used_variables

from NOperandInstr

operands

Operand[] operands ( )
Java: getOperands() · also: get_operands

set_operand

set_operand ( int i, Operand operand )
Java: setOperand(int i, org.jruby.ir.operands.Operand operand)

from CallBase

fieldtypenote
callSiteId long

arg1

Operand arg1 ( )
Java: getArg1() · also: get_arg1

This getter is potentially unsafe if you do not know you have >=1 arguments to the call. It may return null of the closure argument from operands.

args_count

int args_count ( )
Java: getArgsCount() · also: get_args_count

block_inlining

block_inlining ( )
Java: blockInlining()

call_args

Operand[] call_args ( )
Java: getCallArgs() · also: get_call_args

call_site

CallSite call_site ( )
Java: getCallSite() · also: get_call_site

call_site_id

long call_site_id ( )
Java: getCallSiteId() · also: get_call_site_id

call_site_id=

call_site_id= ( long call_site_id )
Java: setCallSiteId(long callSiteId) · also: set_call_site_id

call_type

CallType call_type ( )
Java: getCallType() · also: get_call_type

can_be_eval

boolean can_be_eval ( )
Java: canBeEval()

clone_call_args

Operand[] clone_call_args ( CloneInfo ii )
Java: cloneCallArgs(org.jruby.ir.transformations.inlining.CloneInfo ii)

closure_arg

Operand closure_arg ( )
Java: getClosureArg() · also: get_closure_arg

From interface ClosureAcceptingInstr

compute_scope_flags

boolean compute_scope_flags ( IRScope scope, EnumSet<IRFlags> flags )
Java: computeScopeFlags(org.jruby.ir.IRScope scope, EnumSet<org.jruby.ir.IRFlags> flags)

encode

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

flags

int flags ( )
Java: getFlags() · also: get_flags

get_closure_arg

Operand get_closure_arg ( Operand if_unspecified )
Java: getClosureArg(org.jruby.ir.operands.Operand ifUnspecified)

has_literal_closure?

boolean has_literal_closure? ( )
Java: hasLiteralClosure() · also: has_literal_closure

id

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

raw identifier string (used by method table).

inlining_blocked

boolean inlining_blocked ( )
Java: inliningBlocked()

interpret

Object interpret ( ThreadContext context, StaticScope curr_scope, DynamicScope dynamic_scope, IRubyObject self, Object[] temp )
Java: interpret(org.jruby.runtime.ThreadContext context, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope dynamicScope, org.jruby.runtime.builtin.IRubyObject self, Object[] temp)

name

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

potentially_refined?

boolean potentially_refined? ( )
Java: isPotentiallyRefined() · also: is_potentially_refined

prepare_arguments

IRubyObject[] prepare_arguments ( ThreadContext context, IRubyObject self, StaticScope curr_scope, DynamicScope dynamic_scope, Object[] temp )
Java: prepareArguments(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope dynamicScope, Object[] temp)

prepare_block

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

receiver

Operand receiver ( )
Java: getReceiver() · also: get_receiver

splat_map

boolean[] splat_map ( )
Java: splatMap()

target_requires_callers_binding

boolean target_requires_callers_binding ( )
Java: targetRequiresCallersBinding()

target_requires_callers_frame

boolean target_requires_callers_frame ( )
Java: targetRequiresCallersFrame()

to_string_non_operand_args

String[] to_string_non_operand_args ( )
Java: toStringNonOperandArgs()