Helper_Variable¶
- class Helper_Variable (abstract, logical)¶
temporary as introduced by lowering
- Direct parents:
inherits Variable
- Ancestor classes and implemented interfaces:
Declarative_Node, General_Object_Interface, Initialization_Start_End_Interface, Logical_IR_Root, Named_Entity, Object, Stack_Object, Symbol, Typed_Object, Variable
- Direct child classes:
subclass Simple_Helper_Variable
subclass Init_Helper_Variable
subclass Is_Initialized_Helper_Variable
subclass Exception_Helper_Variable
subclass Return_Helper_Variable
subclass Static_Helper_Variable
Field
Kind
Type
Description
Physical (from Logical_IR_Root)
semantic to physical
class Physical_IR_Root
this just omits the inherited field
Name (from Named_Entity)
attribute
builtin String
replace field with default value
Initialization (from Variable)
semantic
class Instruction
If there is either:
A single instruction that uses a Direct_Full_Write_Operand to initialize the variable, or
A Direct_Call_Instruction calling a constructor that fully initializes the variable
then the Initialization edge will point to that instruction. Otherwise, it will be null.
Because constructors return type void, the two cases can be distinguished by checking whether Initialization.Left is
NoNode.Note that the variable can still be modified after it is initialized. Only when (!has_definition && !address_taken), it is guaranteed that the variable’s value is equal to that computed by the Initialization instruction.
Its_Type (from Typed_Object)
semantic
class Type
the normalized, ‘underlying’ type
Object_Flags (from Typed_Object)
attribute
bitfield Object_Flags_Type
bits like “address taken” and “is pointer”
Parent (from Logical_IR_Root)
semantic
class Logical_IR_Root
Initialization_Start (from Initialization_Start_End_Interface)
semantic
class Execution_Node
Start of the variable’s initialization. If set to an instruction, that instruction is part of the variable’s initialization. If set to a block, the variable’s initialization begins with the tail jump of that block, but does not include the block’s code. Use
is_part_of_variable_initialization()to determine if an instruction is between Initialization_Start and Initialization_End.Initialization_End (from Initialization_Start_End_Interface)
semantic
class Execution_Node
If set to an instruction, it is the first instruction after those responsible for the variable’s initialization. If set to a block, the initialization includes all instructions in that block but not the block’s tail jump. In other words: A block is used to refer to the “instruction-after-last” in that block; all instructions between Initialization_Start (inclusive) to Initialization_End (exclusive) belong to the variable’s initializer. If Initialization_Start==Initialization_End, then the variable has no initializer.