<init>(org.jruby.ir.IRScope scope, org.jruby.ir.operands.Operand obj, org.jruby.RubySymbol attr, org.jruby.ir.operands.Operand[] args, int flags, boolean isPotentiallyRefined)interpret(org.jruby.runtime.ThreadContext context, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope dynamicScope, org.jruby.runtime.builtin.IRubyObject self, Object[] temp)| field | type | note |
|---|---|---|
| EMPTY_OPERANDS | Operand[] |
canBeDeletedFromScope(org.jruby.ir.interpreter.FullInterpreterContext fic)canRaiseException()isDead() · also: is_deadisDeletable() · also: is_deletableCan 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)
dumpableFields()hasSideEffects() · also: has_side_effectsinterpretAndGetNewIPC(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)markDead()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.
| name | type | description |
|---|---|---|
| scope | org.jruby.ir.IRScope | where this instr exists |
| value_map | Map<org.jruby.ir.operands.Operand,org.jruby.ir.operands.Operand> | Mapping from operands to their simplified values |
Returns: simplified result / output of this instruction
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
transfersControl()setOperand(int i, org.jruby.ir.operands.Operand operand)| field | type | note |
|---|---|---|
| callSiteId | long |
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.
getArgsCount() · also: get_args_countblockInlining()getCallSiteId() · also: get_call_site_idsetCallSiteId(long callSiteId) · also: set_call_site_idcanBeEval()From interface ClosureAcceptingInstr
getFlags() · also: get_flagshasLiteralClosure() · also: has_literal_closuregetId() · also: get_idraw identifier string (used by method table).
inliningBlocked()isPotentiallyRefined() · also: is_potentially_refinedprepareArguments(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope dynamicScope, Object[] temp)prepareBlock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope currDynScope, Object[] temp)splatMap()targetRequiresCallersBinding()targetRequiresCallersFrame()toStringNonOperandArgs()result and non-result call instructions are processed with the same code so we provide this method to make that same code simpler.