Top Inners Fields Constructors Methods
org.jruby.ir.instructions

public Class IntegerMathInstr

extends TwoOperandResultBaseInstr
Class Inheritance
Imports
org.jruby.ir.IRVisitor, .Operation, org.jruby.ir.operands.Operand, .Variable, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final IntegerMathInstr.Op

Constructor Summary

AccessConstructor and Description
public
IntegerMathInstr(IntegerMathInstr.Op op, Variable result, Operand operand1, Operand operand2)

Method Summary

Modifier and TypeMethod and Description
public Instr
clone(CloneInfo
This object manages renaming of variables and labels, handles args and return values.
info
)

Implements abstract org.jruby.ir.instructions.Instr.clone.

Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope).

public static IntegerMathInstr
public void
public IntegerMathInstr.Op
public Object
public String[]
public void
Inherited from org.jruby.ir.instructions.TwoOperandResultBaseInstr:
getOperand1getOperand2getOperandssetOperandsetOperand1setOperand2

Field Detail

opback to summary
private final IntegerMathInstr.Op op

Constructor Detail

IntegerMathInstrback to summary
public IntegerMathInstr(IntegerMathInstr.Op op, Variable result, Operand operand1, Operand operand2)

Method Detail

cloneback to summary
public Instr clone(CloneInfo info)

Implements abstract org.jruby.ir.instructions.Instr.clone.

Doc from org.jruby.ir.instructions.Instr.clone.

Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). This might renaming variables and labels to eliminate naming conflicts. The implementation might vary on the cloning mode.

Parameters
info:CloneInfo

This object manages renaming of variables and labels, handles args and return values.

Returns:Instr

a new instruction that can be used in the target scope.

Annotations
@Override
decodeback to summary
public static IntegerMathInstr decode(IRReaderDecoder d)
encodeback to summary
public void encode(IRWriterEncoder e)

Overrides org.jruby.ir.instructions.ResultBaseInstr.encode.

Annotations
@Override
getOpback to summary
public IntegerMathInstr.Op getOp()
interpretback to summary
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)

Overrides org.jruby.ir.instructions.Instr.interpret.

Annotations
@Override
toStringNonOperandArgsback to summary
public String[] toStringNonOperandArgs()

Overrides org.jruby.ir.instructions.Instr.toStringNonOperandArgs.

visitback to summary
public void visit(IRVisitor visitor)

Overrides org.jruby.ir.instructions.Instr.visit.

Annotations
@Override
org.jruby.ir.instructions back to summary

public final Enum IntegerMathInstr.Op

extends Enum<IntegerMathInstr.Op>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final IntegerMathInstr.Op
public static final IntegerMathInstr.Op
public static final IntegerMathInstr.Op
public static final IntegerMathInstr.Op

Constructor Summary

AccessConstructor and Description
private
Op()

Method Summary

Modifier and TypeMethod and Description
public static IntegerMathInstr.Op
fromOrdinal(int value)

public static IntegerMathInstr.Op
public static IntegerMathInstr.Op[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADDback to summary
public static final IntegerMathInstr.Op ADD
DIVIDEback to summary
public static final IntegerMathInstr.Op DIVIDE
MULTIPLYback to summary
public static final IntegerMathInstr.Op MULTIPLY
SUBTRACTback to summary
public static final IntegerMathInstr.Op SUBTRACT

Constructor Detail

Opback to summary
private Op()

Method Detail

fromOrdinalback to summary
public static IntegerMathInstr.Op fromOrdinal(int value)
valueOfback to summary
public static IntegerMathInstr.Op valueOf(String name)
valuesback to summary
public static IntegerMathInstr.Op[] values()