L2OperandType

enum L2OperandType : Enum<L2OperandType>

An L2OperandType specifies the nature of a level two operand. It doesn't fully specify how the operand is used, but it does say whether the associated register is being read or written or both.

Author

Mark van Gulik

Todd L Smith

Entries

Link copied to clipboard

The L2CommentOperand holds descriptive text that does not affect analysis or execution of level two code. It is for diagnostic purposes only.

Link copied to clipboard
PC_VECTOR(true)

The L2PcVectorOperand holds a List of L2PcOperands which can be the targets of a multi-way jump.

Link copied to clipboard

The L2ReadVectorOperand holds a List of L2ReadBoxedOperands which will be read.

Link copied to clipboard

The L2ReadVectorOperand holds a List of L2ReadBoxedOperands which will be read.

Link copied to clipboard

The L2ReadVectorOperand holds a List of L2ReadBoxedOperands which will be read.

Link copied to clipboard

The L2WriteFloatOperand holds the L2FloatRegister that will be written.

Link copied to clipboard

The L2WriteFloatOperand holds the L2FloatRegister that will be read.

Link copied to clipboard
WRITE_INT(true)

The L2WriteIntOperand holds the L2IntRegister that will be written.

Link copied to clipboard

The L2ReadIntOperand holds the L2IntRegister that will be read.

Link copied to clipboard

The L2WriteBoxedOperand holds the L2BoxedRegister that will be written.

Link copied to clipboard

The L2ReadBoxedOperand holds the L2BoxedRegister that will be read.

Link copied to clipboard

Like a CONSTANT, the L2SelectorOperand holds the actual AvailObject, but it is known to be an A_Bundle. The L2Chunk depends on this bundle, invalidating itself if its definitions change.

Link copied to clipboard

An L2PrimitiveOperand holds a Primitive to be invoked.

Link copied to clipboard
PC(true)

An L2PcOperand holds an offset into the chunk's instructions, presumably for the purpose of branching there at some time and under some condition.

Link copied to clipboard

An L2FloatImmediateOperand holds a double value.

Link copied to clipboard

An L2IntImmediateOperand holds an Int value.

Link copied to clipboard

An L2ConstantOperand holds a specific AvailObject. The value is always made immutable for safety during L2 code generation. And then made shared prior to installing the L2Chunk.

Link copied to clipboard

An L2ConstantOperand holds a Java object of any type, except AvailObject, which should be handled with a CONSTANT operand.

Functions

Link copied to clipboard
fun named(roleName: String): L2NamedOperandType

Create a L2NamedOperandType from the receiver and a String naming its role within some L2Operation.

fun named(roleName: String, purpose: L2NamedOperandType.Purpose): L2NamedOperandType

Create a L2NamedOperandType from the receiver, a String naming its role within some L2Operation, and a designator of its purpose. The purpose is used to designate branch edges, and correlate them to register writes that only happen if the corresponding edge is taken.

Properties

Link copied to clipboard
val canHavePurpose: Boolean = false

Whether this kind of operand can have a Purpose.

Link copied to clipboard
val name: String
Link copied to clipboard
val ordinal: Int