Direct_Field_Write_Operand¶
- class Direct_Field_Write_Operand (concrete, logical)¶
Write to a field of a variable:
obj.a.b.c.field = ....- Implemented interfaces:
implements Writing_Operand_Interface
- Direct parents:
inherits Direct_Field_Operand
- Ancestor classes and implemented interfaces:
Direct_Field_Operand, Direct_Operand, Direct_Partial_Operand, Execution_Node, Field_Operand_Interface, Logical_IR_Root, Operand, Partial_Operand_Interface, Writing_Operand_Interface
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
Offset (from Field_Operand_Interface)
attribute
builtin Natural
direct case: The_Object + Offset denotes the object used/defined. indirect case:
(*The_Object) + Offsetas inp->field. The offset is relative to the start of the object, and is not necessarily uniquely identifying a field (union, EBO,[[no_unique_address]], bit-fields).Offset_In_Bits (from Field_Operand_Interface)
attribute
builtin UInt64
Same as
Offset * CHAR_BIT. The Offset_In_Bits does not include the Bit_Position for bit-fields.Target (from Field_Operand_Interface)
semantic
class Field
The selected field, as symbolic information. If the operand represents a nested field access
object.a.b.c, Target will be the last field (c). The combination of Offset+Target is uniquely identifying the whole field chain, which can be retrieved with theget_field_chainfunction. To ensure uniqueness, union field accesses may only appear as the last element in the chain.