A call to __method__ or __callee__ which can be optimized to use the frame method name directly.
<init>(org.jruby.ir.operands.Variable result, String methodName)decode(org.jruby.ir.persistence.IRReaderDecoder d)getFrameName(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, String compositeName)getMethodName() · also: get_method_name| field | type | note |
|---|---|---|
| EMPTY_OPERANDS | Operand[] |
canBeDeletedFromScope(org.jruby.ir.interpreter.FullInterpreterContext fic)canRaiseException()computeScopeFlags(org.jruby.ir.IRScope scope, EnumSet<org.jruby.ir.IRFlags> flags)Does this instruction do anything the scope is interested in?
Returns: true if it modified the scope or set any flags.
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_effectsinterpret(org.jruby.runtime.ThreadContext context, org.jruby.parser.StaticScope currScope, org.jruby.runtime.DynamicScope currDynScope, org.jruby.runtime.builtin.IRubyObject self, Object[] temp)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)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
toStringNonOperandArgs()transfersControl()setOperand(int i, org.jruby.ir.operands.Operand operand)