Global_Binding_Variable¶
- class Global_Binding_Variable (abstract, logical)¶
- Implemented interfaces:
implements Binding_Variable_Interface
- Direct parents:
inherits Variable
- Ancestor classes and implemented interfaces:
Binding_Variable_Interface, 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 Global_Static_Binding_Variable
Field
Kind
Type
Description
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
Physical (from Logical_IR_Root)
semantic to physical
class Physical_IR_Root
Container (from Binding_Variable_Interface)
semantic
Bound_To (from Binding_Variable_Interface)
semantic
class Field
If bound to a data member, the field that was bound to. Not set if bound to an array or tuple-like type.
Element_Index (from Binding_Variable_Interface)
attribute
builtin Natural
If bound to an array element or tuple element, the index of the element that was bound to.
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.
Name (from Named_Entity)
attribute
builtin String