Operand

class Operand (abstract, logical)

Operands of instructions. subclasses distinguish: read/write/address, direct/indirect, or full object/subobject. Write operands can only occur as the left operand of an instruction.

Direct parents:
Ancestor classes and implemented interfaces:

Execution_Node, Logical_IR_Root

Direct child classes:

Field

Kind

Type

Description

The_Object

semantic

interface General_Object_Interface

Affected object (direct case) or pointer (indirect case). For address operands, this can also be a routine. WARNING: because the meaning of this field is drastically different between direct operands and indirect operands, it is usually wrong to access this field without a preceding check of operand type!

Physical (from Logical_IR_Root)

semantic to physical

class Physical_IR_Root

Its_Type

semantic

class Type

The type of the operand. WARNING: For address operands, this field returns the pointed-to-type. That is, for int i, the operand &i will report Its_Type=int. Code using this field must check the read/write/address kind to avoid bugs!

Parent (from Logical_IR_Root)

semantic

class Instruction