Indirect_Dynamic_Array_Element_Operand¶
- class Indirect_Dynamic_Array_Element_Operand (abstract, logical)¶
Access to an element of an array obtained by dereferencing a pointer:
(*obj)[index]. The index is a runtime value stored in the index object (an integer variable). This operand is only used when The_Object is a pointer-to-array/vector, e.g.,int (*obj)[5] = &the_array;. It cannot be used for pointer arithmetic on regular data pointers. Subclasses distinguish: read/write/address- Implemented interfaces:
implements Dynamic_Array_Element_Operand_Interface
- Direct parents:
inherits Indirect_Array_Element_Operand
- Ancestor classes and implemented interfaces:
Array_Element_Operand_Interface, Dynamic_Array_Element_Operand_Interface, Execution_Node, Indirect_Array_Element_Operand, Indirect_Operand, Indirect_Partial_Operand, Logical_IR_Root, Operand, Partial_Operand_Interface
- Direct child classes:
Field
Kind
Type
Description
The_Object (from Operand)
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!
Its_Type (from Operand)
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&iwill 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 Logical_IR_Root
Physical (from Logical_IR_Root)
semantic to physical
class Physical_IR_Root
Index (from Dynamic_Array_Element_Operand_Interface)
semantic
class Object