aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/iirs.ads')
-rw-r--r--src/vhdl/iirs.ads464
1 files changed, 285 insertions, 179 deletions
diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads
index f87159185..4c3ea7296 100644
--- a/src/vhdl/iirs.ads
+++ b/src/vhdl/iirs.ads
@@ -62,6 +62,8 @@ package Iirs is
-- have both an index_subtype_list and an index_constraint_list.
-- - Maybe_Ref trick: the Is_Ref flag tells whether the Maybe_Ref are
-- owner or ref.
+ -- - Maybe_Forward_Ref: the Is_Forward_Ref tells whether the field is
+ -- ref or forward_ref
-- The root of a semantic tree is a library_declaration.
-- All the library_declarations are kept in a private list, held by
@@ -296,8 +298,6 @@ package Iirs is
-- Iir_Kind_String_Literal8 (Short)
--
- -- Get/Set_Type (Field1)
- --
-- Used for computed literals. Literal_Origin contains the expression
-- whose value was computed during analysis and replaces the expression.
-- Get/Set_Literal_Origin (Field2)
@@ -305,6 +305,8 @@ package Iirs is
-- Same as Type, but marked as property of that node.
-- Get/Set_Literal_Subtype (Field3)
--
+ -- Get/Set_Type (Field1)
+ --
-- Number of literals in the expanded string.
-- Get/Set_String_Length (Field4)
--
@@ -328,24 +330,24 @@ package Iirs is
-- Iir_Kind_Integer_Literal (Int)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set the value of the integer.
-- Get/Set_Value (Int64)
--
-- Get/Set_Literal_Origin (Field2)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Expr_Staticness (State1)
-- Iir_Kind_Floating_Point_Literal (Fp)
--
- -- Get/Set_Type (Field1)
- --
-- The value of the literal.
-- Get/Set_Fp_Value (Fp64)
--
-- Get/Set_Literal_Origin (Field2)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Expr_Staticness (State1)
-- Iir_Kind_Null_Literal (Short)
@@ -358,12 +360,15 @@ package Iirs is
-- Iir_Kind_Physical_Int_Literal (Int)
-- Iir_Kind_Physical_Fp_Literal (Fp)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Literal_Origin (Field2)
--
-- The physical unit of the literal.
- -- Get/Set_Unit_Name (Field3)
+ -- Get/Set_Physical_Unit (Field3)
+ --
+ -- The name of the physical unit (if any).
+ -- Get/Set_Unit_Name (Field0)
+ --
+ -- Get/Set_Type (Field1)
--
-- Must be set to locally except for time literal, which is globally.
-- Get/Set_Expr_Staticness (State1)
@@ -380,26 +385,26 @@ package Iirs is
-- This node can only be generated by evaluation: it is an unidimentional
-- positional aggregate.
--
- -- Get/Set_Type (Field1)
- --
- -- Get/Set_Literal_Origin (Field2)
- --
-- Same as Type, but marked as property of that node.
-- Get/Set_Literal_Subtype (Field3)
--
+ -- Get/Set_Literal_Origin (Field2)
+ --
-- List of elements
-- Get/Set_Simple_Aggregate_List (Field4)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Expr_Staticness (State1)
-- Iir_Kind_Overflow_Literal (Short)
-- This node can only be generated by evaluation to represent an error: out
-- of range, division by zero...
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Literal_Origin (Field2)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Expr_Staticness (State1)
-------------
@@ -436,13 +441,17 @@ package Iirs is
-- Only for Iir_Kind_Association_Element_Type:
-- Get/Set_Subprogram_Association_Chain (Field4)
--
- -- Only for Iir_Kind_Association_Element_By_Individual:
- -- Get/Set_Actual_Type (Field5)
- --
-- A function call or a type conversion for the formal.
-- Only for Iir_Kind_Association_Element_By_Expression:
-- Get/Set_Out_Conversion (Field5)
--
+ -- Owner of Actual_Type if needed.
+ -- Only for Iir_Kind_Association_Element_By_Individual:
+ -- Get/Set_Actual_Type_Definition (Field5)
+ --
+ -- Only for Iir_Kind_Association_Element_By_Individual:
+ -- Get/Set_Actual_Type (Field3)
+ --
-- Get/Set the whole association flag (true if the formal is associated in
-- whole and not individually, see LRM93 4.3.2.2)
-- Get/Set_Whole_Association_Flag (Flag1)
@@ -519,6 +528,7 @@ package Iirs is
-- * a sequential statement chain for a case_statement.
-- Get/Set_Associated_Chain (Field4)
--
+ -- Should be a simple_name.
-- Only for Iir_Kind_Choice_By_Name:
-- Get/Set_Choice_Name (Field5)
--
@@ -619,8 +629,7 @@ package Iirs is
--
-- Get/Set_Component_Name (Field4)
--
- -- Must be one of designator_list, designator_by_others or
- -- designator_by_all.
+ -- A list, list_others or list_all.
-- Get/Set_Instantiation_List (Field1)
--
-- Only for Iir_Kind_Component_Configuration:
@@ -701,16 +710,16 @@ package Iirs is
--
-- Get/Set_Entity_Class (Field3)
--
- -- Get/Set_Attribute_Value_Spec_Chain (Field4)
+ -- Get/Set_Entity_Name_List (Field8)
--
-- Get/Set_Expression (Field5)
--
+ -- Get/Set_Attribute_Value_Spec_Chain (Field4)
+ --
-- Always a simple name.
-- Get/Set_Attribute_Designator (Field6)
--
-- Get/Set_Attribute_Specification_Chain (Field7)
- --
- -- Get/Set_Entity_Name_List (Field8)
-- Iir_Kind_Attribute_Value (Short)
-- An attribute value is the element of the chain of attribute of an
@@ -721,11 +730,13 @@ package Iirs is
-- This makes elaboration (and more precisely, expression evaluation)
-- easier.
--
- -- Get/Set_Spec_Chain (Field0)
+ -- Chain of attribute_value for the attribute specification
+ -- Get/Set_Spec_Chain (Field2)
--
-- Get/Set_Type (Field1)
--
- -- Get/Set_Chain (Field2)
+ -- Chain of all attribute_value for the node containing declarations
+ -- Get/Set_Value_Chain (Field0)
--
-- Get/Set_Designated_Entity (Field3)
--
@@ -768,18 +779,18 @@ package Iirs is
-- Get/Set_Parent (Field0)
-- Get/Set_Design_Unit (Alias Field0)
--
- -- Get/Set_Declaration_Chain (Field1)
- --
-- Get/Set_Identifier (Field3)
--
- -- Get/Set_Attribute_Value_Chain (Field4)
- --
- -- Get/Set_Concurrent_Statement_Chain (Field5)
- --
-- Get/Set_Generic_Chain (Field6)
--
-- Get/Set_Port_Chain (Field7)
--
+ -- Get/Set_Declaration_Chain (Field1)
+ --
+ -- Get/Set_Concurrent_Statement_Chain (Field5)
+ --
+ -- Get/Set_Attribute_Value_Chain (Field4)
+ --
-- Get/Set_Visible_Flag (Flag4)
--
-- Get/Set_Is_Within_Flag (Flag5)
@@ -795,17 +806,17 @@ package Iirs is
-- Get/Set_Parent (Field0)
-- Get/Set_Design_Unit (Alias Field0)
--
- -- Get/Set_Declaration_Chain (Field1)
- --
-- Name of the entity declaration for the architecture.
-- Get/Set_Entity_Name (Field2)
--
- -- Get/Set_Identifier (Field3)
+ -- Get/Set_Declaration_Chain (Field1)
--
- -- Get/Set_Attribute_Value_Chain (Field4)
+ -- Get/Set_Identifier (Field3)
--
-- Get/Set_Concurrent_Statement_Chain (Field5)
--
+ -- Get/Set_Attribute_Value_Chain (Field4)
+ --
-- The default configuration created by canon. This is a design unit.
-- Get/Set_Default_Configuration_Declaration (Field6)
--
@@ -852,19 +863,19 @@ package Iirs is
-- Get/Set_Parent (Field0)
-- Get/Set_Design_Unit (Alias Field0)
--
+ -- Get/Set_Identifier (Field3)
+ --
+ -- Get/Set_Package_Header (Field6)
+ --
-- Get/Set_Declaration_Chain (Field1)
--
-- For nested packages
-- Get/Set_Chain (Field2)
--
- -- Get/Set_Identifier (Field3)
- --
-- Get/Set_Attribute_Value_Chain (Field4)
--
-- Get/Set_Package_Body (Field5)
--
- -- Get/Set_Package_Header (Field6)
- --
-- Get/Set_Package_Origin (Field7)
--
-- Chain of bodies for package instantiation. Present only in certain
@@ -920,23 +931,28 @@ package Iirs is
-- Get/Set_Parent (Field0)
-- Get/Set_Design_Unit (Alias Field0)
--
+ -- Get/Set_Identifier (Field3)
+ --
+ -- The name of the uninstantiated package as it appear in the sources. May
+ -- be Null_Iir.
+ -- Get/Set_Uninstantiated_Package_Name (Field7)
+ --
+ -- The uninstantiated package declaration.
+ -- Get/Set_Uninstantiated_Package_Decl (Field9)
+ --
+ -- Get/Set_Generic_Chain (Field6)
+ --
+ -- Get/Set_Generic_Map_Aspect_Chain (Field8)
+ --
-- Get/Set_Declaration_Chain (Field1)
--
-- For nested packages
-- Get/Set_Chain (Field2)
--
- -- Get/Set_Identifier (Field3)
- --
-- Get/Set_Attribute_Value_Chain (Field4)
--
-- Get/Set_Package_Body (Field5)
--
- -- Get/Set_Generic_Chain (Field6)
- --
- -- Get/Set_Uninstantiated_Package_Name (Field7)
- --
- -- Get/Set_Generic_Map_Aspect_Chain (Field8)
- --
-- Get/Set_Visible_Flag (Flag4)
--
-- Get/Set_End_Has_Reserved_Id (Flag8)
@@ -1019,10 +1035,6 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
- -- The type can be deduced from the subtype indication, but this field is
- -- present for uniformity (and speed).
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Chain (Field2)
--
-- Get/Set_Identifier (Field3)
@@ -1032,6 +1044,10 @@ package Iirs is
-- The subtype indication may not be present.
-- Get/Set_Subtype_Indication (Field5)
--
+ -- The type can be deduced from the subtype indication, but this field is
+ -- present for uniformity (and speed).
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Expr_Staticness (State1)
--
-- Get/Set_Name_Staticness (State2)
@@ -1133,14 +1149,16 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Chain (Field2)
--
-- Get/Set_Identifier (Field3)
--
+ -- For integer and real types, the subtype_indication of the implicitly
+ -- declared subtype for the type is the subtype definition.
-- Get/Set_Subtype_Indication (Field5)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Visible_Flag (Flag4)
--
-- Get/Set_Use_Flag (Flag6)
@@ -1184,18 +1202,18 @@ package Iirs is
-- Useful to distinguish a port and an interface.
-- Get/Set_Parent (Field0)
--
- -- The type can be deduced from the subtype indication, but this field is
- -- present for uniformity (and speed).
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Chain (Field2)
--
-- Get/Set_Identifier (Field3)
--
+ -- Get/Set_Subtype_Indication (Field5)
+ --
-- Must always be null_iir for iir_kind_interface_file_declaration.
-- Get/Set_Default_Value (Field4)
--
- -- Get/Set_Subtype_Indication (Field5)
+ -- The type can be deduced from the subtype indication, but this field is
+ -- present for uniformity (and speed).
+ -- Get/Set_Type (Field1)
--
-- Get/Set_Mode (Odigit1)
--
@@ -1269,20 +1287,22 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
- -- Get/Set_Declaration_Chain (Field1)
- --
- -- Get/Set_Chain (Field2)
- --
-- Get/Set_Identifier (Field3)
--
- -- Get/Set_Attribute_Value_Chain (Field4)
+ -- Get/Set_Uninstantiated_Package_Name (Field7)
--
- -- Get/Set_Generic_Chain (Field6)
+ -- Get/Set_Uninstantiated_Package_Decl (Field9)
--
- -- Get/Set_Uninstantiated_Package_Name (Field7)
+ -- Get/Set_Generic_Chain (Field6)
--
-- Get/Set_Generic_Map_Aspect_Chain (Field8)
--
+ -- Get/Set_Declaration_Chain (Field1)
+ --
+ -- Get/Set_Chain (Field2)
+ --
+ -- Get/Set_Attribute_Value_Chain (Field4)
+ --
-- Get/Set_Visible_Flag (Flag4)
--
-- Get/Set_Is_Within_Flag (Flag5)
@@ -1494,15 +1514,15 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Chain (Field2)
--
-- Get/Set_Identifier (Field3)
--
+ -- Get/Set_Subtype_Indication (Field5)
+ --
-- Get/Set_Default_Value (Field4)
--
- -- Get/Set_Subtype_Indication (Field5)
+ -- Get/Set_Type (Field1)
--
-- For a non-resolved signal: null_iir if the signal has no driver, or
-- a process/concurrent_statement for which the signal should have a
@@ -1578,17 +1598,10 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Chain (Field2)
--
-- Get/Set_Identifier (Field3)
--
- -- Only for Iir_Kind_Constant_Declaration:
- -- Default value of a deferred constant points to the full constant
- -- declaration.
- -- Get/Set_Default_Value (Field4)
- --
-- For iterator, this is the reconstructed subtype indication.
-- Get/Set_Subtype_Indication (Field5)
--
@@ -1596,6 +1609,15 @@ package Iirs is
-- Get/Set_Discrete_Range (Field6)
--
-- Only for Iir_Kind_Constant_Declaration:
+ -- Default value of a deferred constant points to the full constant
+ -- declaration.
+ -- Get/Set_Default_Value (Field4)
+ --
+ -- Note that the type may be extracted from the default_value if the subtype
+ -- indication is unconstrained.
+ -- Get/Set_Type (Field1)
+ --
+ -- Only for Iir_Kind_Constant_Declaration:
-- Summary:
-- | constant C1 : integer; -- Deferred declaration (in a package)
-- | constant C2 : integer := 4; -- Declaration
@@ -1628,15 +1650,15 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Chain (Field2)
--
-- Get/Set_Identifier (Field3)
--
+ -- Get/Set_Subtype_Indication (Field5)
+ --
-- Get/Set_Default_Value (Field4)
--
- -- Get/Set_Subtype_Indication (Field5)
+ -- Get/Set_Type (Field1)
--
-- True if the variable is a shared variable.
-- Get/Set_Shared_Flag (Flag2)
@@ -1711,17 +1733,22 @@ package Iirs is
--
-- element_subtype_definition ::= subtype_indication
--
- -- The type can be deduced from the subtype indication, but this field is
- -- present for uniformity (and speed).
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Identifier (Field3)
--
+ -- Get/Set_Subtype_Indication (Field5)
+ --
-- Return the position of the element in the record, starting from 0 for
-- the first record element, increasing by one for each successive element.
-- Get/Set_Element_Position (Field4)
--
- -- Get/Set_Subtype_Indication (Field5)
+ -- The type can be deduced from the subtype indication, but this field is
+ -- present for uniformity (and speed).
+ -- Get/Set_Type (Field1)
+ --
+ -- The 'primary' element declaration, the one declared in the record type
+ -- definition. Other element declarations might be created for new
+ -- constraints in record subtypes.
+ -- Get/Set_Base_Element_Declaration (Field2)
--
-- Get/Set_Has_Identifier_List (Flag3)
--
@@ -1984,16 +2011,17 @@ package Iirs is
-- Iir_Kind_Enumeration_Type_Definition (Short)
--
- -- Get the range of the type (This is just an ascending range from the
- -- first literal to the last declared literal).
- -- Get/Set_Range_Constraint (Field1)
- --
-- Return the list of literals. This list is created when the node is
-- created.
-- Get/Set_Enumeration_Literal_List (Field2)
--
+ -- Get the range of the type (This is just an ascending range from the
+ -- first literal to the last declared literal).
+ -- Get/Set_Range_Constraint (Field1)
+ --
-- Get/Set_Type_Declarator (Field3)
--
+ -- Always itself
-- Get/Set_Base_Type (Field4)
--
-- Get/Set_Resolved_Flag (Flag1)
@@ -2004,6 +2032,8 @@ package Iirs is
--
-- Get/Set_Only_Characters_Flag (Flag4)
--
+ -- Get/Set_Is_Ref (Flag7)
+ --
-- Get/Set_Type_Staticness (State1)
-- Iir_Kind_Enumeration_Literal (Short)
@@ -2081,14 +2111,14 @@ package Iirs is
--
-- Get/Set_Identifier (Field3)
--
- -- The Physical_Literal is the expression that appear in the sources, so
- -- this is Null_Iir for a primary unit.
- -- Get/Set_Physical_Literal (Field4)
- --
-- The value of the unit, computed from the primary unit. This is always
-- a physical integer literal.
-- Get/Set_Physical_Unit_Value (Field5)
--
+ -- The Physical_Literal is the expression that appear in the sources, so
+ -- this is Null_Iir for a primary unit.
+ -- Get/Set_Physical_Literal (Field4)
+ --
-- Get/Set_Expr_Staticness (State1)
--
-- Get/Set_Name_Staticness (State2)
@@ -2132,19 +2162,19 @@ package Iirs is
--
-- index_subtype_definition ::= type_mark RANGE <>
--
- -- Get/Set_Element_Subtype (Field1)
+ -- This is a list of type marks.
+ -- Get/Set_Index_Subtype_Definition_List (Field6)
--
-- Get/Set_Element_Subtype_Indication (Field2)
--
- -- Get/Set_Type_Declarator (Field3)
+ -- Same as the index_subtype_definition_list.
+ -- Get/Set_Index_Subtype_List (Field9)
--
- -- Get/Set_Base_Type (Field4)
+ -- Get/Set_Element_Subtype (Field1)
--
- -- This is a list of type marks.
- -- Get/Set_Index_Subtype_Definition_List (Field6)
+ -- Get/Set_Type_Declarator (Field3)
--
- -- Same as the index_subtype_definition_list.
- -- Get/Set_Index_Subtype_List (Field9)
+ -- Get/Set_Base_Type (Field4)
--
-- Get/Set_Type_Staticness (State1)
--
@@ -2194,18 +2224,20 @@ package Iirs is
--
-- access_type_definition ::= ACCESS subtype_indication
--
- -- Next access type that also referenced the same incomplete type when
- -- defined.
- -- Get/Set_Incomplete_Type_Ref_Chain (Field0)
+ -- The subtype_indication as it appears. Can designate an
+ -- incomplete_type_definition.
+ -- Get/Set_Designated_Subtype_Indication (Field5)
--
+ -- The resolved designated type.
-- Get/Set_Designated_Type (Field1)
--
-- Get/Set_Type_Declarator (Field3)
--
-- Get/Set_Base_Type (Field4)
--
- -- Can designate incomplete_type_definition.
- -- Get/Set_Designated_Subtype_Indication (Field5)
+ -- Next access type that also referenced the same incomplete type when
+ -- defined.
+ -- Get/Set_Incomplete_Type_Ref_Chain (Field0)
--
-- Get/Set_Resolved_Flag (Flag1)
--
@@ -2419,6 +2451,8 @@ package Iirs is
--
-- Get/Set_Has_Signal_Flag (Flag3)
--
+ -- Get/Set_Is_Ref (Flag7)
+ --
-- Get/Set_Type_Staticness (State1)
-- Iir_Kind_Floating_Subtype_Definition (Medium)
@@ -2441,6 +2475,8 @@ package Iirs is
--
-- Get/Set_Has_Signal_Flag (Flag3)
--
+ -- Get/Set_Is_Ref (Flag7)
+ --
-- Get/Set_Type_Staticness (State1)
-- Iir_Kind_Access_Subtype_Definition (Short)
@@ -2469,7 +2505,11 @@ package Iirs is
--
-- array_element_resolution ::= resolution_indication
--
+ -- The indication as it appears in the sources.
-- Get/Set_Resolution_Indication (Field5)
+ --
+ -- The subtype definition of the element. Owner of it.
+ -- Get/Set_Element_Subtype_Indication (Field2)
-- Iir_Kind_Record_Resolution (Short)
--
@@ -2519,28 +2559,28 @@ package Iirs is
-- Iir_Kind_Array_Subtype_Definition (Medium)
--
- -- Get/Set_Element_Subtype (Field1)
- --
-- Get/Set_Subtype_Type_Mark (Field2)
--
- -- Get/Set_Type_Declarator (Field3)
- --
- -- Get/Set_Base_Type (Field4)
- --
-- Get/Set_Resolution_Indication (Field5)
--
-- The index_constraint list as it appears in the subtype indication (if
-- present). This is a list of subtype indication.
-- Get/Set_Index_Constraint_List (Field6)
--
- -- Get/Set_Tolerance (Field7)
- --
- -- Get/Set_Array_Element_Constraint (Field8)
- --
-- The type of the index. This is either the index_constraint list or the
-- index subtypes of the type_mark.
-- Get/Set_Index_Subtype_List (Field9)
--
+ -- Get/Set_Array_Element_Constraint (Field8)
+ --
+ -- Get/Set_Tolerance (Field7)
+ --
+ -- Get/Set_Element_Subtype (Field1)
+ --
+ -- Get/Set_Type_Declarator (Field3)
+ --
+ -- Get/Set_Base_Type (Field4)
+ --
-- Get/Set_Type_Staticness (State1)
--
-- Get/Set_Constraint_State (State2)
@@ -2555,22 +2595,22 @@ package Iirs is
-- Iir_Kind_Range_Expression (Short)
--
- -- Get/Set_Range_Origin (Field0)
- --
- -- Get/Set_Type (Field1)
- --
-- There are two fields for both limits: those that own the node
-- (Left_Limit_Expr and Right_Limit_Expr) and those that reference the node
-- (Left_Limit and Right_Limit). Always use the reference (they cannot be
-- Null_Iir, while the owner nodes can be Null_Iir. Set the owner nodes
-- only for owning purpose.
- -- Get/Set_Left_Limit (Field2)
+ -- Get/Set_Left_Limit_Expr (Field2)
+ --
+ -- Get/Set_Right_Limit_Expr (Field3)
+ --
+ -- Get/Set_Range_Origin (Field0)
--
- -- Get/Set_Right_Limit (Field3)
+ -- Get/Set_Type (Field1)
--
- -- Get/Set_Left_Limit_Expr (Field4)
+ -- Get/Set_Left_Limit (Field4)
--
- -- Get/Set_Right_Limit_Expr (Field5)
+ -- Get/Set_Right_Limit (Field5)
--
-- Get/Set_Expr_Staticness (State1)
--
@@ -2587,6 +2627,8 @@ package Iirs is
-- Get/Set_Resolution_Indication (Field5)
--
-- Get/Set_Tolerance (Field7)
+ --
+ -- Get/Set_Is_Ref (Flag7)
-------------------------
-- Nature definitions --
@@ -2822,6 +2864,12 @@ package Iirs is
--
-- Get/Set_Parent (Field0)
--
+ -- get/set_guard_decl is used for semantic analysis, in order to add
+ -- a signal declaration.
+ -- Get/Set_Guard_Decl (Field8)
+ --
+ -- Get/Set_Block_Header (Field7)
+ --
-- Get/Set_Declaration_Chain (Field1)
--
-- Get/Set_Chain (Field2)
@@ -2835,12 +2883,6 @@ package Iirs is
--
-- Get/Set_Block_Block_Configuration (Field6)
--
- -- Get/Set_Block_Header (Field7)
- --
- -- get/set_guard_decl is used for semantic analysis, in order to add
- -- a signal declaration.
- -- Get/Set_Guard_Decl (Field8)
- --
-- Get/Set_Visible_Flag (Flag4)
--
-- Get/Set_Is_Within_Flag (Flag5)
@@ -3347,14 +3389,14 @@ package Iirs is
-- Iir_Kind_Aggregate (Short)
--
- -- Get/Set_Type (Field1)
- --
- -- Get/Set_Aggregate_Info (Field2)
+ -- Get/Set_Association_Choices_Chain (Field4)
--
-- Same as Type, but marked as property of that node.
-- Get/Set_Literal_Subtype (Field3)
--
- -- Get/Set_Association_Choices_Chain (Field4)
+ -- Get/Set_Aggregate_Info (Field2)
+ --
+ -- Get/Set_Type (Field1)
--
-- Get/Set_Expr_Staticness (State1)
--
@@ -3395,10 +3437,10 @@ package Iirs is
-- Iir_Kind_Parenthesis_Expression (Short)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Expression (Field5)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Expr_Staticness (State1)
-- Iir_Kind_Qualified_Expression (Short)
@@ -3448,15 +3490,6 @@ package Iirs is
--
-- Get/Set_Type (Field1)
--
- -- To ease analysis: set to the designated type (either the type of the
- -- expression or the subtype)
- -- Get/Set_Allocator_Designated_Type (Field2)
- --
- -- Only for Iir_Kind_Allocator_By_Subtype:
- -- Same as subtype indication but set when the allocator defines a new
- -- subtype.
- -- Get/Set_Allocator_Subtype (Field3)
- --
-- Only for Iir_Kind_Allocator_By_Expression:
-- Contains the expression for a by expression allocator.
-- Get/Set_Expression (Field5)
@@ -3465,6 +3498,15 @@ package Iirs is
-- Contains the subtype indication for a by subtype allocator.
-- Get/Set_Subtype_Indication (Field5)
--
+ -- Only for Iir_Kind_Allocator_By_Subtype:
+ -- Same as subtype indication but set when the allocator defines a new
+ -- subtype. Used to track when an anonymous subtype is created.
+ -- Get/Set_Allocator_Subtype (Field3)
+ --
+ -- To ease analysis: set to the designated type (either the type of the
+ -- expression or the subtype)
+ -- Get/Set_Allocator_Designated_Type (Field2)
+ --
-- Get/Set_Expr_Staticness (State1)
------------
@@ -3483,6 +3525,8 @@ package Iirs is
--
-- Get/Set_Base_Name (Field5)
--
+ -- Get/Set_Is_Forward_Ref (Flag1)
+ --
-- Get/Set_Expr_Staticness (State1)
--
-- Get/Set_Name_Staticness (State2)
@@ -3499,6 +3543,8 @@ package Iirs is
--
-- Get/Set_Base_Name (Field5)
--
+ -- Get/Set_Is_Forward_Ref (Flag1)
+ --
-- Get/Set_Expr_Staticness (State1)
--
-- Get/Set_Name_Staticness (State2)
@@ -3514,6 +3560,19 @@ package Iirs is
-- Get/Set_Named_Entity (Field4)
--
-- Get/Set_Base_Name (Field5)
+ --
+ -- Get/Set_Is_Forward_Ref (Flag1)
+
+ -- Iir_Kind_Reference_Name (Short)
+ --
+ -- This doesn't correspond to a name in the sources. This is an artificial
+ -- name in the tree which is owned and reference another name.
+ --
+ -- Get/Set_Named_Entity (Field4)
+ --
+ -- Get/Set_Referenced_Name (Field2)
+ --
+ -- Get/Set_Is_Forward_Ref (Flag1)
-- Iir_Kind_Selected_Name (Short)
--
@@ -3529,6 +3588,8 @@ package Iirs is
--
-- Get/Set_Base_Name (Field5)
--
+ -- Get/Set_Is_Forward_Ref (Flag1)
+ --
-- Get/Set_Expr_Staticness (State1)
--
-- Get/Set_Name_Staticness (State2)
@@ -3543,6 +3604,8 @@ package Iirs is
--
-- Get/Set_Base_Name (Field5)
--
+ -- Get/Set_Is_Forward_Ref (Flag1)
+ --
-- Get/Set_Expr_Staticness (State1)
-- Iir_Kind_Indexed_Name (Short)
@@ -3564,12 +3627,12 @@ package Iirs is
--
-- Get/Set_Prefix (Field0)
--
- -- Get/Set_Type (Field1)
- --
-- Get/Set_Suffix (Field2)
--
-- Get/Set_Slice_Subtype (Field3)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Base_Name (Field5)
--
-- Get/Set_Expr_Staticness (State1)
@@ -3589,6 +3652,8 @@ package Iirs is
-- Get/Set_Association_Chain (Field2)
--
-- Get/Set_Named_Entity (Field4)
+ --
+ -- Get/Set_Is_Forward_Ref (Flag1)
-- Iir_Kind_Selected_Element (Short)
-- A record element selection. This corresponds to a reffined selected
@@ -3650,6 +3715,8 @@ package Iirs is
-- Get/Set_Identifier (Field3)
--
-- Get/Set_Named_Entity (Field4)
+ --
+ -- Get/Set_Is_Forward_Ref (Flag1)
-- Iir_Kind_Absolute_Pathname (Short)
-- Represents only the '.'.
@@ -3670,6 +3737,8 @@ package Iirs is
-- Get/Set_Named_Entity (Field4)
--
-- Get/Set_Pathname_Expression (Field5)
+ --
+ -- Get/Set_Is_Forward_Ref (Flag1)
-----------------
-- Attributes --
@@ -3689,6 +3758,8 @@ package Iirs is
--
-- Get/Set_Base_Name (Field5)
--
+ -- Get/Set_Is_Forward_Ref (Flag1)
+ --
-- Get/Set_Expr_Staticness (State1)
--
-- Get/Set_Name_Staticness (State2)
@@ -3823,14 +3894,14 @@ package Iirs is
--
-- Get/Set_Prefix (Field0)
--
- -- Get/Set_Type (Field1)
- --
-- Only for Iir_Kind_Simple_Name_Attribute:
-- Get/Set_Simple_Name_Identifier (Field3)
--
-- Only for Iir_Kind_Simple_Name_Attribute:
-- Get/Set_Simple_Name_Subtype (Field4)
--
+ -- Get/Set_Type (Field1)
+ --
-- Get/Set_Base_Name (Field5)
--
-- Get/Set_Expr_Staticness (State1)
@@ -4114,6 +4185,7 @@ package Iirs is
Iir_Kind_Simple_Name, -- denoting_name
Iir_Kind_Selected_Name, -- denoting_name
Iir_Kind_Operator_Symbol, -- denoting_name
+ Iir_Kind_Reference_Name, -- denoting_name
Iir_Kind_Selected_By_All_Name,
Iir_Kind_Parenthesis_Name,
@@ -4194,6 +4266,7 @@ package Iirs is
subtype Iir_In_Modes is Iir_Mode range Iir_Inout_Mode .. Iir_In_Mode;
subtype Iir_Out_Modes is Iir_Mode range Iir_Out_Mode .. Iir_Inout_Mode;
+ subtype Iir_Parameter_Modes is Iir_Mode range Iir_Out_Mode .. Iir_In_Mode;
type Iir_Delay_Mechanism is (Iir_Inertial_Delay, Iir_Transport_Delay);
@@ -4931,13 +5004,15 @@ package Iirs is
Iir_Kind_Character_Literal ..
--Iir_Kind_Simple_Name
--Iir_Kind_Selected_Name
- Iir_Kind_Operator_Symbol;
+ --Iir_Kind_Operator_Symbol
+ Iir_Kind_Reference_Name;
subtype Iir_Kinds_Name is Iir_Kind range
Iir_Kind_Character_Literal ..
--Iir_Kind_Simple_Name
--Iir_Kind_Selected_Name
--Iir_Kind_Operator_Symbol
+ --Iir_Kind_Reference_Name
--Iir_Kind_Selected_By_All_Name
Iir_Kind_Parenthesis_Name;
@@ -5621,7 +5696,7 @@ package Iirs is
-- Every design unit is put in an hash table to find quickly found by its
-- name. This field is a single chain for collisions.
- -- Field: Field7 Ref
+ -- Field: Field7 Forward_Ref
function Get_Hash_Chain (Design_Unit : Iir_Design_Unit) return Iir;
procedure Set_Hash_Chain (Design_Unit : Iir_Design_Unit; Chain : Iir);
@@ -5652,7 +5727,7 @@ package Iirs is
function Get_Enum_Pos (Lit : Iir) return Iir_Int32;
procedure Set_Enum_Pos (Lit : Iir; Val : Iir_Int32);
- -- Field: Field4
+ -- Field: Field4 Ref
function Get_Physical_Literal (Unit : Iir) return Iir;
procedure Set_Physical_Literal (Unit : Iir; Lit : Iir);
@@ -5667,7 +5742,7 @@ package Iirs is
procedure Set_Fp_Value (Lit : Iir; Val : Iir_Fp64);
-- List of elements of a simple aggregate.
- -- Field: Field4 (uc)
+ -- Field: Field4 Ref (uc)
function Get_Simple_Aggregate_List (Target : Iir) return Iir_List;
procedure Set_Simple_Aggregate_List (Target : Iir; List : Iir_List);
@@ -5738,7 +5813,7 @@ package Iirs is
-- Chain of attribute specifications. This is used only during sem, to
-- check that no named entity of a given class appear after an attr. spec.
-- with the entity name list OTHERS or ALL.
- -- Field: Field7
+ -- Field: Field7 Ref
function Get_Attribute_Specification_Chain (Target : Iir) return Iir;
procedure Set_Attribute_Specification_Chain (Target : Iir; Chain : Iir);
@@ -5750,7 +5825,7 @@ package Iirs is
function Get_Signal_List (Target : Iir) return Iir_List;
procedure Set_Signal_List (Target : Iir; List : Iir_List);
- -- Field: Field3 Ref
+ -- Field: Field3 Forward_Ref
function Get_Designated_Entity (Val : Iir_Attribute_Value) return Iir;
procedure Set_Designated_Entity (Val : Iir_Attribute_Value; Entity : Iir);
@@ -5865,19 +5940,26 @@ package Iirs is
procedure Set_Configuration_Item_Chain (Target : Iir; Chain : Iir);
-- Chain of attribute values for declared items.
- -- To be used with Get/Set_Chain.
+ -- To be used with Get/Set_Value_Chain.
-- There is no order, therefore, a new attribute value may be always
-- prepended.
- -- Field: Field4 Chain
+ -- Field: Field4 Ref
function Get_Attribute_Value_Chain (Target : Iir) return Iir;
procedure Set_Attribute_Value_Chain (Target : Iir; Chain : Iir);
-- Next attribute value in the attribute specification chain (of attribute
-- value).
- -- Field: Field0
+ -- FIXME: should be a Chain.
+ -- Field: Field2
function Get_Spec_Chain (Target : Iir) return Iir;
procedure Set_Spec_Chain (Target : Iir; Chain : Iir);
+ -- Next attribute value in the attribute specification chain (of attribute
+ -- value).
+ -- Field: Field0 Ref
+ function Get_Value_Chain (Target : Iir) return Iir;
+ procedure Set_Value_Chain (Target : Iir; Chain : Iir);
+
-- Chain of attribute values for attribute specification.
-- To be used with Get/Set_Spec_Chain.
-- Field: Field4
@@ -5895,7 +5977,7 @@ package Iirs is
procedure Set_Package (Package_Body : Iir; Decl : Iir);
-- The package body corresponding to the package declaration.
- -- Field: Field5 Ref
+ -- Field: Field5 Forward_Ref
function Get_Package_Body (Pkg : Iir) return Iir;
procedure Set_Package_Body (Pkg : Iir; Decl : Iir);
@@ -5960,7 +6042,7 @@ package Iirs is
procedure Set_Type_Definition (Decl : Iir; Atype : Iir);
-- The subtype definition associated with the type declaration (if any).
- -- Field: Field4
+ -- Field: Field4 Forward_Ref
function Get_Subtype_Definition (Target : Iir) return Iir;
procedure Set_Subtype_Definition (Target : Iir; Def : Iir);
@@ -6013,7 +6095,7 @@ package Iirs is
function Get_Sequential_Statement_Chain (Target : Iir) return Iir;
procedure Set_Sequential_Statement_Chain (Target : Iir; Chain : Iir);
- -- Field: Field9 Ref
+ -- Field: Field9 Forward_Ref
function Get_Subprogram_Body (Target : Iir) return Iir;
procedure Set_Subprogram_Body (Target : Iir; A_Body : Iir);
@@ -6072,7 +6154,7 @@ package Iirs is
-- declaration for a full constant declaration, or is null_iir for a
-- usual or deferred constant declaration.
-- Set only during sem.
- -- Field: Field6 Ref
+ -- Field: Field6 Forward_Ref
function Get_Deferred_Declaration (Target : Iir) return Iir;
procedure Set_Deferred_Declaration (Target : Iir; Decl : Iir);
@@ -6123,6 +6205,10 @@ package Iirs is
function Get_Element_Position (Target : Iir) return Iir_Index32;
procedure Set_Element_Position (Target : Iir; Pos : Iir_Index32);
+ -- Field: Field2 Ref
+ function Get_Base_Element_Declaration (Target : Iir) return Iir;
+ procedure Set_Base_Element_Declaration (Target : Iir; El : Iir);
+
-- Field: Field2
function Get_Element_Declaration (Target : Iir) return Iir;
procedure Set_Element_Declaration (Target : Iir; El : Iir);
@@ -6207,7 +6293,7 @@ package Iirs is
function Get_Visible_Flag (Target : Iir) return Boolean;
procedure Set_Visible_Flag (Target : Iir; Flag : Boolean);
- -- Field: Field1
+ -- Field: Field1 Maybe_Ref
function Get_Range_Constraint (Target : Iir) return Iir;
procedure Set_Range_Constraint (Target : Iir; Constraint : Iir);
@@ -6215,19 +6301,19 @@ package Iirs is
function Get_Direction (Decl : Iir) return Iir_Direction;
procedure Set_Direction (Decl : Iir; Dir : Iir_Direction);
- -- Field: Field2 Ref
+ -- Field: Field4 Ref
function Get_Left_Limit (Decl : Iir_Range_Expression) return Iir;
procedure Set_Left_Limit (Decl : Iir_Range_Expression; Limit : Iir);
- -- Field: Field3 Ref
+ -- Field: Field5 Ref
function Get_Right_Limit (Decl : Iir_Range_Expression) return Iir;
procedure Set_Right_Limit (Decl : Iir_Range_Expression; Limit : Iir);
- -- Field: Field4
+ -- Field: Field2
function Get_Left_Limit_Expr (Decl : Iir_Range_Expression) return Iir;
procedure Set_Left_Limit_Expr (Decl : Iir_Range_Expression; Limit : Iir);
- -- Field: Field5
+ -- Field: Field3
function Get_Right_Limit_Expr (Decl : Iir_Range_Expression) return Iir;
procedure Set_Right_Limit_Expr (Decl : Iir_Range_Expression; Limit : Iir);
@@ -6355,7 +6441,7 @@ package Iirs is
function Get_Waveform_Chain (Target : Iir) return Iir;
procedure Set_Waveform_Chain (Target : Iir; Chain : Iir);
- -- Field: Field8
+ -- Field: Field8 Ref
function Get_Guard (Target : Iir) return Iir;
procedure Set_Guard (Target : Iir; Guard : Iir);
@@ -6545,12 +6631,12 @@ package Iirs is
procedure Set_Configuration_Name (Target : Iir; Conf : Iir);
-- Component configuration for a component_instantiation_statement.
- -- Field: Field6
+ -- Field: Field6 Forward_Ref
function Get_Component_Configuration (Target : Iir) return Iir;
procedure Set_Component_Configuration (Target : Iir; Conf : Iir);
-- Configuration specification for a component_instantiation_statement.
- -- Field: Field7
+ -- Field: Field7 Ref
function Get_Configuration_Specification (Target : Iir) return Iir;
procedure Set_Configuration_Specification (Target : Iir; Conf : Iir);
@@ -6611,7 +6697,7 @@ package Iirs is
procedure Set_Signal_Attribute_Chain (Decl : Iir; Chain : Iir);
-- Block_Configuration that applies to this block statement.
- -- Field: Field6
+ -- Field: Field6 Forward_Ref
function Get_Block_Block_Configuration (Block : Iir) return Iir;
procedure Set_Block_Block_Configuration (Block : Iir; Conf : Iir);
@@ -6627,10 +6713,14 @@ package Iirs is
function Get_Uninstantiated_Package_Name (Inst : Iir) return Iir;
procedure Set_Uninstantiated_Package_Name (Inst : Iir; Name : Iir);
+ -- Field: Field9 Ref
+ function Get_Uninstantiated_Package_Decl (Inst : Iir) return Iir;
+ procedure Set_Uninstantiated_Package_Decl (Inst : Iir; Pkg : Iir);
+
-- Get/Set the block_configuration (there may be several
-- block_configuration through the use of prev_configuration singly linked
-- list) that apply to this generate statement.
- -- Field: Field2
+ -- Field: Field2 Forward_Ref
function Get_Generate_Block_Configuration (Target : Iir) return Iir;
procedure Set_Generate_Block_Configuration (Target : Iir; Conf : Iir);
@@ -6703,16 +6793,20 @@ package Iirs is
procedure Set_Binding_Indication (Target : Iir; Binding : Iir);
-- The named entity designated by a name.
- -- Field: Field4 Ref
+ -- Field: Field4 Maybe_Forward_Ref
function Get_Named_Entity (Name : Iir) return Iir;
procedure Set_Named_Entity (Name : Iir; Val : Iir);
-- If a name designate a non-object alias, the designated alias.
-- Named_Entity will designate the aliased entity.
- -- Field: Field2
+ -- Field: Field2 Ref
function Get_Alias_Declaration (Name : Iir) return Iir;
procedure Set_Alias_Declaration (Name : Iir; Val : Iir);
+ -- Field: Field2 Ref
+ function Get_Referenced_Name (N : Iir) return Iir;
+ procedure Set_Referenced_Name (N : Iir; Name : Iir);
+
-- Expression staticness, defined by rules of LRM 7.4
-- Field: State1 (pos)
function Get_Expr_Staticness (Target : Iir) return Iir_Staticness;
@@ -6738,7 +6832,11 @@ package Iirs is
function Get_Right (Target : Iir) return Iir;
procedure Set_Right (Target : Iir; An_Iir : Iir);
- -- Field: Field3
+ -- Field: Field3 Ref
+ function Get_Physical_Unit (Lit : Iir) return Iir;
+ procedure Set_Physical_Unit (Lit : Iir; Name : Iir);
+
+ -- Field: Field0
function Get_Unit_Name (Target : Iir) return Iir;
procedure Set_Unit_Name (Target : Iir; Name : Iir);
@@ -6761,7 +6859,7 @@ package Iirs is
procedure Set_Prefix (Target : Iir; Prefix : Iir);
-- Prefix of a name signature
- -- Field: Field1 Ref
+ -- Field: Field1
function Get_Signature_Prefix (Sign : Iir) return Iir;
procedure Set_Signature_Prefix (Sign : Iir; Prefix : Iir);
@@ -6811,17 +6909,21 @@ package Iirs is
-- Unless the formal is an unconstrained array type, this is the same as
-- the formal type.
-- Subtype indiciation for a type association.
- -- Field: Field5
+ -- Field: Field3 Ref
function Get_Actual_Type (Target : Iir) return Iir;
procedure Set_Actual_Type (Target : Iir; Atype : Iir);
+ -- Field: Field5
+ function Get_Actual_Type_Definition (Target : Iir) return Iir;
+ procedure Set_Actual_Type_Definition (Target : Iir; Atype : Iir);
+
-- List of individual associations for association_element_by_individual.
-- Associations for parenthesis_name.
-- Field: Field2 Chain
function Get_Association_Chain (Target : Iir) return Iir;
procedure Set_Association_Chain (Target : Iir; Chain : Iir);
- -- List of individual associations for association_element_by_individual.
+ -- List of choices for association_element_by_individual.
-- Field: Field4 Chain
function Get_Individual_Association_Chain (Target : Iir) return Iir;
procedure Set_Individual_Association_Chain (Target : Iir; Chain : Iir);
@@ -6856,12 +6958,12 @@ package Iirs is
procedure Set_Aggr_Min_Length (Info : Iir_Aggregate_Info; Nbr : Iir_Int32);
-- Highest index choice, if any.
- -- Field: Field2
+ -- Field: Field2 Ref
function Get_Aggr_Low_Limit (Target : Iir_Aggregate_Info) return Iir;
procedure Set_Aggr_Low_Limit (Target : Iir_Aggregate_Info; Limit : Iir);
-- Highest index choice, if any.
- -- Field: Field3
+ -- Field: Field3 Ref
function Get_Aggr_High_Limit (Target : Iir_Aggregate_Info) return Iir;
procedure Set_Aggr_High_Limit (Target : Iir_Aggregate_Info; Limit : Iir);
@@ -6913,7 +7015,7 @@ package Iirs is
procedure Set_Parameter_Association_Chain (Target : Iir; Chain : Iir);
-- Object of a method call. NULL_IIR if the subprogram is not a method.
- -- Field: Field4
+ -- Field: Field4 Ref
function Get_Method_Object (Target : Iir) return Iir;
procedure Set_Method_Object (Target : Iir; Object : Iir);
@@ -6993,7 +7095,7 @@ package Iirs is
procedure Set_Simple_Name_Subtype (Target : Iir; Atype : Iir);
-- Body of a protected type declaration.
- -- Field: Field2 Ref
+ -- Field: Field2 Forward_Ref
function Get_Protected_Type_Body (Target : Iir) return Iir;
procedure Set_Protected_Type_Body (Target : Iir; Bod : Iir);
@@ -7099,6 +7201,10 @@ package Iirs is
function Get_Is_Ref (N : Iir) return Boolean;
procedure Set_Is_Ref (N : Iir; Ref : Boolean);
+ -- Field: Flag1
+ function Get_Is_Forward_Ref (N : Iir) return Boolean;
+ procedure Set_Is_Forward_Ref (N : Iir; Ref : Boolean);
+
-- Field: Field1 (uc)
function Get_Psl_Property (Decl : Iir) return PSL_Node;
procedure Set_Psl_Property (Decl : Iir; Prop : PSL_Node);