diff options
Diffstat (limited to 'iirs.ads')
-rw-r--r-- | iirs.ads | 379 |
1 files changed, 258 insertions, 121 deletions
@@ -71,6 +71,56 @@ package Iirs is -- add an entry in disp_tree (debugging) -- handle this node in Errorout.Disp_Node + -- Meta-grammar + -- This file is processed by a tool to automatically generate the body, so + -- it must follow a meta-grammar. + -- + -- The low level representation is described in nodes.ads. + -- + -- The literals for the nodes must be declared in this file like this: + -- type Iir_Kind is + -- ( + -- Iir_Kind_AAA, + -- ... + -- Iir_Kind_ZZZ + -- ); + -- The tool doesn't check for uniqness as this is done by the compiler. + -- + -- It is possible to declare ranges of kinds like this: + -- subtype Iir_Kinds_RANGE is Iir_Kind range + -- Iir_Kind_FIRST .. + -- --Iir_Kind_MID + -- Iir_Kind_LAST; + -- Literals Iir_Kind_MID are optionnal (FIXME: make them required ?), but + -- if present all the values between FIRST and LAST must be present. + -- + -- The methods appear after the comment: ' -- General methods.' + -- They have the following format: + -- -- Field: FIELD (CONV) + -- function Get_NAME (PNAME : PTYPE) return RTYPE; + -- procedure Set_NAME (PNAME : PTYPE; RNAME : RTYPE); + -- 'FIELD' indicate which field of the node is used to store the value. + -- ' (CONV)' is required if the type of the value (indicated by RTYPE) is + -- different from the type of the field. CONV can be either 'uc' or 'pos'. + -- 'uc' indicates an unchecked conversion while 'pos' a pos/val conversion. + -- + -- Nodes content is described between ' -- Start of Iir_Kind.' and + -- ' -- End of Iir_Kind.' like this: + -- -- Iir_Kind_NODE1 (FORMAT1) + -- -- Iir_Kind_NODE2 (FORMAT2) + -- -- + -- -- Get/Set_NAME1 (FIELD1) + -- -- + -- -- Get/Set_NAME2 (FIELD2) + -- -- Get/Set_NAME3 (Alias FIELD2) + -- -- + -- -- Only for Iir_Kind_NODE1: + -- -- Get/Set_NAME4 (FIELD3) + -- Severals nodes can be described at once; at least one must be described. + -- Fields FIELD1, FIELD2, FIELD3 must be different, unless 'Alias ' is + -- present. The number of spaces is significant. The 'Only for ' lines + -- are optionnal and there may be severals of them. + ------------------------------------------------- -- General methods (can be used on all nodes): -- ------------------------------------------------- @@ -95,7 +145,6 @@ package Iirs is -- Copy a location from a node to another one. -- procedure Location_Copy (Target: in out Iir; Src: in Iir); - -- The next line marks the start of the node description. -- Start of Iir_Kind. @@ -141,7 +190,7 @@ package Iirs is -- Get/Set_Parent (Alias Field0) -- -- Get the chain of context clause. - -- Get_Context_Items (Field1) + -- Get/Set_Context_Items (Field1) -- -- Get/Set_Chain (Field2) -- @@ -171,7 +220,7 @@ package Iirs is -- Set the line and the offset in the line, only for the library manager. -- This is valid until the file is really loaded in memory. On loading, -- location will contain all this informations. - -- Get/Set_Pos_Line_Off (Field1,Field11,Field12) + -- Get/Set_Pos_Line_Off (Field4,Field11,Field12) -- -- Get/Set the date state, which indicates whether this design unit is in -- memory or not. @@ -223,19 +272,22 @@ package Iirs is -- -- As bit-strings are expanded to '0'/'1' strings, this is the number of -- characters. - -- Get/Set_String_Length (Field0) + -- Get/Set_String_Length (Field4) + -- + -- Same as Type, but marked as property of that node. + -- Get/Set_Literal_Subtype (Field5) -- -- For bit string only: -- Enumeration literal which correspond to '0' and '1'. -- This cannot be defined only in the enumeration type definition, due to -- possible aliases. -- Only for Iir_Kind_Bit_String_Literal: - -- Get/Set_Bit_String_0 (Field4) + -- Get/Set_Bit_String_0 (Field6) -- Only for Iir_Kind_Bit_String_Literal: - -- Get/Set_Bit_String_1 (Field5) + -- Get/Set_Bit_String_1 (Field7) -- -- Only for Iir_Kind_Bit_String_Literal: - -- Get/Set_Bit_String_Base (Field11) + -- Get/Set_Bit_String_Base (Field8) -- -- Get/Set_Expr_Staticness (State1) @@ -301,6 +353,9 @@ package Iirs is -- -- List of elements -- Get/Set_Simple_Aggregate_List (Field3) + -- + -- Same as Type, but marked as property of that node. + -- Get/Set_Literal_Subtype (Field5) -- Iir_Kind_Overflow_Literal (Short) -- This node can only be generated by evaluation to represent an error: out @@ -377,28 +432,36 @@ package Iirs is -- -- Get/Set_Parent (Field0) -- + -- For a list of choices, only the first one is associated, the following + -- associations have the same_alternative_flag set. + -- Get/Set_Chain (Field2) + -- -- These are elements of an choice chain, which is used for -- case_statement, concurrent_select_signal_assignment, aggregates. -- - -- Get/Set what is associated with the choice. This can be: - -- * a waveform_chain for a concurrent_select_signal_assignment, - -- * an expression for an aggregate, - -- * a sequential statement list for a case_statement. - -- For a list of choices, only the first one is associated, the following - -- associations have the same_alternative_flag set. - -- Get/Set_Associated (Field1) + -- Get/Set what is associated with the choice. There are two different + -- nodes, one for simple association and the other for chain association. + -- This simplifies walkers. But both nodes are never used at the same + -- time. -- - -- Get/Set_Chain (Field2) + -- For: + -- * an expression for an aggregate + -- * an individual association + -- Get/Set_Associated_Expr (Field3) + -- + -- For + -- * a waveform_chain for a concurrent_select_signal_assignment, + -- * a sequential statement chain for a case_statement. + -- Get/Set_Associated_Chain (Field4) -- -- Only for Iir_Kind_Choice_By_Name: - -- Get/Set_Name (Field4) + -- Get/Set_Choice_Name (Field5) -- -- Only for Iir_Kind_Choice_By_Expression: - -- Get/Set_Expression (Field5) + -- Get/Set_Choice_Expression (Field5) -- -- Only for Iir_Kind_Choice_By_Range: - -- Get/Set the range. - -- Get/Set_Expression (Field5) + -- Get/Set_Choice_Range (Field5) -- -- Get/Set_Same_Alternative_Flag (Flag1) -- @@ -612,13 +675,17 @@ package Iirs is -- -- Get/Set_Psl_Expression (Field3) - -- Iir_Kind_Signature (Short) + -- Iir_Kind_Signature (Medium) -- - -- Get/Set_Prefix (Field0) + -- LRM08 4.5.3 Signatures -- - -- Get/Set_Return_Type (Field1) + -- signature ::= '[' [ type_mark { , type_mark } ] [ RETURN type_mark ] ']' + -- + -- Get/Set_Prefix (Field0) -- -- Get/Set_Type_Marks_List (Field2) + -- + -- Get/Set_Return_Type_Mark (Field8) -- Iir_Kind_Overload_List (Short) -- @@ -633,7 +700,7 @@ package Iirs is -- Get/Set_Parent (Field0) -- Get/Set_Design_Unit (Alias Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Identifier (Field3) -- @@ -660,7 +727,7 @@ package Iirs is -- Get/Set_Parent (Field0) -- Get/Set_Design_Unit (Alias Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Name of the entity declaration for the architecture. -- Get/Set_Entity_Name (Field2) @@ -689,7 +756,7 @@ package Iirs is -- Get/Set_Parent (Field0) -- Get/Set_Design_Unit (Alias Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Name of the entity of a configuration. -- Get/Set_Entity_Name (Field2) @@ -717,7 +784,7 @@ package Iirs is -- Get/Set_Parent (Field0) -- Get/Set_Design_Unit (Alias Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Package_Body (Field2) -- @@ -742,7 +809,7 @@ package Iirs is -- Get/Set_Parent (Field0) -- Get/Set_Design_Unit (Alias Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Identifier (Field3) -- @@ -1070,7 +1137,6 @@ package Iirs is -- Get/Set_Parent (Field0) -- -- Only for Iir_Kind_Function_Declaration: - -- FIXME: this is a type_mark. -- Get/Set_Return_Type (Field1) -- -- Only for Iir_Kind_Function_Declaration: @@ -1082,7 +1148,7 @@ package Iirs is -- -- Get/Set_Attribute_Value_Chain (Field4) -- - -- Get_Interface_Declaration_Chain (Field5) + -- Get/Set_Interface_Declaration_Chain (Field5) -- -- Get/Set_Generic_Chain (Field6) -- @@ -1151,7 +1217,7 @@ package Iirs is -- The parse stage always puts a declaration before a body. -- Sem will remove the declaration if there is a forward declaration. -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Chain (Field2) -- @@ -1186,7 +1252,7 @@ package Iirs is -- -- Get/Set_Attribute_Value_Chain (Field4) -- - -- Get_Interface_Declaration_Chain (Field5) + -- Get/Set_Interface_Declaration_Chain (Field5) -- -- Get/Set_Generic_Chain (Field6) -- @@ -1296,11 +1362,11 @@ package Iirs is -- -- Get/Set_Attribute_Value_Chain (Field4) -- - -- Only for Iir_Kind_Constant_Declaration: + -- For iterator, this is the reconstructed subtype indication. -- Get/Set_Subtype_Indication (Field5) -- -- Only for Iir_Kind_Iterator_Declaration: - -- Get/Set_Discrete_Range (Field5) + -- Get/Set_Discrete_Range (Field6) -- -- Only for Iir_Kind_Constant_Declaration: -- Default value of a deferred constant points to the full constant @@ -1618,7 +1684,7 @@ package Iirs is -- type definitions -- ----------------------- - -- For Iir_Kinds_Type_And_Subtype_Definition: + -- For Iir_Kinds_Type_And_Subtype_Definition: -- -- Type_Declarator: -- Points to the type declaration or subtype declaration that has created @@ -1715,7 +1781,7 @@ package Iirs is -- Iir_Kind_Physical_Type_Definition (Short) -- -- Get/Set_Unit_Chain (Field1) - -- Get_Primary_Unit (Alias Field1) + -- Get/Set_Primary_Unit (Alias Field1) -- -- Get/Set_Type_Declarator (Field3) -- @@ -1743,6 +1809,8 @@ package Iirs is -- -- physical_literal ::= [ abstract_literal ] /unit/_name -- + -- Get/Set_Parent (Field0) + -- -- Get/Set_Type (Field1) -- -- Get/Set_Chain (Field2) @@ -2229,14 +2297,14 @@ package Iirs is -- Get/Set_Visible_Flag (Flag4) -- -- True if the target of the assignment is guarded - -- Get_Guarded_Target_State (State3) + -- Get/Set_Guarded_Target_State (State3) -- Iir_Kind_Sensitized_Process_Statement (Medium) -- Iir_Kind_Process_Statement (Medium) -- -- Get/Set_Parent (Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Chain (Field2) -- @@ -2248,7 +2316,7 @@ package Iirs is -- Get/Set_Sequential_Statement_Chain (Field5) -- -- Only for Iir_Kind_Sensitized_Process_Statement: - -- Get_Sensitivity_List (Field6) + -- Get/Set_Sensitivity_List (Field6) -- -- Get/Set_Callees_List (Field7) -- @@ -2385,7 +2453,7 @@ package Iirs is -- -- Get/Set_Parent (Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Chain (Field2) -- @@ -2416,7 +2484,7 @@ package Iirs is -- -- Get/Set_Parent (Field0) -- - -- Get_Declaration_Chain (Field1) + -- Get/Set_Declaration_Chain (Field1) -- -- Get/Set_Chain (Field2) -- @@ -2607,7 +2675,7 @@ package Iirs is -- Get/Set_Visible_Flag (Flag4) -- -- True if the target of the assignment is guarded - -- Get_Guarded_Target_State (State3) + -- Get/Set_Guarded_Target_State (State3) -- Iir_Kind_Variable_Assignment_Statement (Short) -- @@ -2819,6 +2887,9 @@ package Iirs is -- -- Get/Set_Association_Choices_Chain (Field4) -- + -- Same as Type, but marked as property of that node. + -- Get/Set_Literal_Subtype (Field5) + -- -- Get/Set_Expr_Staticness (State1) -- -- Get/Set_Value_Staticness (State2) @@ -2888,6 +2959,12 @@ package Iirs is -- -- Get/Set_Type (Field1) -- + -- If the type mark denotes an unconstrained array and the expression is + -- locally static, the result should be locally static according to vhdl93 + -- (which is not clear on that point). As a subtype is created, it is + -- referenced by this field. + -- Get/Set_Type_Conversion_Subtype (Field3) + -- -- Get/Set_Type_Mark (Field4) -- -- Get/Set_Expression (Field5) @@ -3020,6 +3097,8 @@ package Iirs is -- -- Get/Set_Suffix (Field2) -- + -- Get/Set_Slice_Subtype (Field3) + -- -- Get/Set_Base_Name (Field5) -- -- Get/Set_Expr_Staticness (State1) @@ -3220,6 +3299,9 @@ package Iirs is -- 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_Base_Name (Field5) -- -- Get/Set_Expr_Staticness (State1) @@ -3250,12 +3332,14 @@ package Iirs is -- -- Get/Set_Has_Signal_Flag (Flag3) + -- Iir_Kind_Unused (Short) + -- End of Iir_Kind. type Iir_Kind is ( - -- Erroneous IIR. + Iir_Kind_Unused, Iir_Kind_Error, Iir_Kind_Design_File, @@ -4762,11 +4846,11 @@ package Iirs is procedure Disp_Stats; -- Design units contained in a design file. - -- Field: Field5 + -- Field: Field5 Chain function Get_First_Design_Unit (Design : Iir) return Iir; procedure Set_First_Design_Unit (Design : Iir; Chain : Iir); - -- Field: Field6 + -- Field: Field6 Ref function Get_Last_Design_Unit (Design : Iir) return Iir; procedure Set_Last_Design_Unit (Design : Iir; Chain : Iir); @@ -4786,7 +4870,7 @@ package Iirs is procedure Set_Analysis_Time_Stamp (Design : Iir; Stamp : Time_Stamp_Id); -- The library which FILE belongs to. - -- Field: Field0 + -- Field: Field0 Ref function Get_Library (File : Iir_Design_File) return Iir; procedure Set_Library (File : Iir_Design_File; Lib : Iir); @@ -4806,14 +4890,14 @@ package Iirs is procedure Set_Design_File_Directory (File : Iir_Design_File; Dir : Name_Id); -- The parent of a design unit is a design file. - -- Field: Field0 - function Get_Design_File (Unit : Iir_Design_Unit) return Iir_Design_File; - procedure Set_Design_File (Unit : Iir_Design_Unit; File : Iir_Design_File); + -- Field: Field0 Ref + function Get_Design_File (Unit : Iir_Design_Unit) return Iir; + procedure Set_Design_File (Unit : Iir_Design_Unit; File : Iir); -- Design files of a library. - -- Field: Field1 - function Get_Design_File_Chain (Library : Iir) return Iir_Design_File; - procedure Set_Design_File_Chain (Library : Iir; Chain : Iir_Design_File); + -- Field: Field1 Chain + function Get_Design_File_Chain (Library : Iir) return Iir; + procedure Set_Design_File_Chain (Library : Iir; Chain : Iir); -- System directory where the library is stored. -- Field: Field11 (pos) @@ -4821,12 +4905,13 @@ package Iirs is procedure Set_Library_Directory (Library : Iir; Dir : Name_Id); -- Symbolic date, used to order design units in a library. + -- Display: Image -- Field: Field10 (pos) function Get_Date (Target : Iir) return Date_Type; procedure Set_Date (Target : Iir; Date : Date_Type); -- Chain of context clauses. - -- Field: Field1 + -- Field: Field1 Chain function Get_Context_Items (Design_Unit : Iir) return Iir; procedure Set_Context_Items (Design_Unit : Iir; Items_Chain : Iir); @@ -4834,7 +4919,7 @@ package Iirs is -- exception: the architecture of an entity aspect (of a component -- instantiation) may not have been analyzed. The Entity_Aspect_Entity -- is added to this list (instead of the non-existing design unit). - -- Field: Field8 (uc) + -- Field: Field8 Ref (uc) function Get_Dependence_List (Unit : Iir) return Iir_List; procedure Set_Dependence_List (Unit : Iir; List : Iir_List); @@ -4870,14 +4955,14 @@ 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 + -- Field: Field7 Ref function Get_Hash_Chain (Design_Unit : Iir_Design_Unit) return Iir; procedure Set_Hash_Chain (Design_Unit : Iir_Design_Unit; Chain : Iir); -- Set the line and the offset in the line, only for the library manager. -- This is valid until the file is really loaded in memory. On loading, -- location will contain all this informations. - -- Field: Field1 + -- Field: Field4 -- Field: Field6 -- Field: Field7 procedure Set_Pos_Line_Off (Design_Unit: Iir_Design_Unit; @@ -4889,11 +4974,13 @@ package Iirs is -- literals. -- Value of an integer/physical literal. + -- Display: Image -- Field: Int64 function Get_Value (Lit : Iir) return Iir_Int64; procedure Set_Value (Lit : Iir; Val : Iir_Int64); -- Position (same as lit_type'pos) of an enumeration literal. + -- Display: Image -- Field: Field10 (pos) function Get_Enum_Pos (Lit : Iir) return Iir_Int32; procedure Set_Enum_Pos (Lit : Iir; Val : Iir_Int32); @@ -4908,6 +4995,7 @@ package Iirs is procedure Set_Physical_Unit_Value (Unit : Iir; Lit : Iir); -- Value of a floating point literal. + -- Display: Image -- Field: Fp64 function Get_Fp_Value (Lit : Iir) return Iir_Fp64; procedure Set_Fp_Value (Lit : Iir; Val : Iir_Fp64); @@ -4915,7 +5003,7 @@ package Iirs is -- Declaration of the literal. -- This is used to retrieve the genuine enumeration literal for literals -- created from static expression. - -- Field: Field6 + -- Field: Field6 Ref function Get_Enumeration_Decl (Target : Iir) return Iir; procedure Set_Enumeration_Decl (Target : Iir; Lit : Iir); @@ -4925,18 +5013,19 @@ package Iirs is procedure Set_Simple_Aggregate_List (Target : Iir; List : Iir_List); -- The logarithm of the base (1, 3 or 4) of a bit string. - -- Field: Field11 (pos) + -- Display: Image + -- Field: Field8 (pos) function Get_Bit_String_Base (Lit : Iir) return Base_Type; procedure Set_Bit_String_Base (Lit : Iir; Base : Base_Type); -- The enumeration literal which defines the '0' and '1' value. - -- Field: Field4 - function Get_Bit_String_0 (Lit : Iir) return Iir_Enumeration_Literal; - procedure Set_Bit_String_0 (Lit : Iir; El : Iir_Enumeration_Literal); + -- Field: Field6 + function Get_Bit_String_0 (Lit : Iir) return Iir; + procedure Set_Bit_String_0 (Lit : Iir; El : Iir); - -- Field: Field5 - function Get_Bit_String_1 (Lit : Iir) return Iir_Enumeration_Literal; - procedure Set_Bit_String_1 (Lit : Iir; El : Iir_Enumeration_Literal); + -- Field: Field7 + function Get_Bit_String_1 (Lit : Iir) return Iir; + procedure Set_Bit_String_1 (Lit : Iir; El : Iir); -- The origin of a literal can be null_iir for a literal generated by the -- parser, or a node which was statically evaluated to this literal. @@ -4949,6 +5038,13 @@ package Iirs is function Get_Range_Origin (Lit : Iir) return Iir; procedure Set_Range_Origin (Lit : Iir; Orig : Iir); + -- Same as Type, but not marked as Ref. This is when a literal has a + -- subtype (such as string or bit_string) created specially for the + -- literal. + -- Field: Field5 + function Get_Literal_Subtype (Lit : Iir) return Iir; + procedure Set_Literal_Subtype (Lit : Iir; Atype : Iir); + -- Field: Field3 (uc) function Get_Entity_Class (Target : Iir) return Token_Type; procedure Set_Entity_Class (Target : Iir; Kind : Token_Type); @@ -4968,7 +5064,7 @@ package Iirs is function Get_Attribute_Specification_Chain (Target : Iir) return Iir; procedure Set_Attribute_Specification_Chain (Target : Iir; Chain : Iir); - -- Field: Field4 + -- Field: Field4 Ref function Get_Attribute_Specification (Val : Iir) return Iir; procedure Set_Attribute_Specification (Val : Iir; Attr : Iir); @@ -4976,7 +5072,7 @@ package Iirs is function Get_Signal_List (Target : Iir) return Iir_List; procedure Set_Signal_List (Target : Iir; List : Iir_List); - -- Field: Field3 + -- Field: Field3 Ref function Get_Designated_Entity (Val : Iir_Attribute_Value) return Iir; procedure Set_Designated_Entity (Val : Iir_Attribute_Value; Entity : Iir); @@ -5036,9 +5132,26 @@ package Iirs is procedure Set_Time (We : Iir_Waveform_Element; An_Iir : Iir); -- Node associated with a choice. - -- Field: Field1 - function Get_Associated (Target : Iir) return Iir; - procedure Set_Associated (Target : Iir; Associated : Iir); + -- Field: Field3 + function Get_Associated_Expr (Target : Iir) return Iir; + procedure Set_Associated_Expr (Target : Iir; Associated : Iir); + + -- Chain associated with a choice. + -- Field: Field4 Chain + function Get_Associated_Chain (Target : Iir) return Iir; + procedure Set_Associated_Chain (Target : Iir; Associated : Iir); + + -- Field: Field5 + function Get_Choice_Name (Choice : Iir) return Iir; + procedure Set_Choice_Name (Choice : Iir; Name : Iir); + + -- Field: Field5 + function Get_Choice_Expression (Choice : Iir) return Iir; + procedure Set_Choice_Expression (Choice : Iir; Name : Iir); + + -- Field: Field5 + function Get_Choice_Range (Choice : Iir) return Iir; + procedure Set_Choice_Range (Choice : Iir; Name : Iir); -- Set when a choice belongs to the same alternative as the previous one. -- Field: Flag1 @@ -5060,7 +5173,7 @@ package Iirs is -- statement). -- All elements of this list must belong to the same block configuration. -- The order is not important. - -- Field: Field4 + -- Field: Field4 Ref function Get_Prev_Block_Configuration (Target : Iir) return Iir; procedure Set_Prev_Block_Configuration (Target : Iir; Block : Iir); @@ -5095,13 +5208,13 @@ package Iirs is -- The package declaration corresponding to the body. -- Field: Field4 - function Get_Package (Package_Body : Iir) return Iir_Package_Declaration; - procedure Set_Package (Package_Body : Iir; Decl : Iir_Package_Declaration); + function Get_Package (Package_Body : Iir) return Iir; + procedure Set_Package (Package_Body : Iir; Decl : Iir); -- The package body corresponding to the package declaration. -- Field: Field2 - function Get_Package_Body (Pkg : Iir) return Iir_Package_Body; - procedure Set_Package_Body (Pkg : Iir; Decl : Iir_Package_Body); + function Get_Package_Body (Pkg : Iir) return Iir; + procedure Set_Package_Body (Pkg : Iir; Decl : Iir); -- If true, the package need a body. -- Field: Flag1 @@ -5112,24 +5225,24 @@ package Iirs is function Get_Block_Configuration (Target : Iir) return Iir; procedure Set_Block_Configuration (Target : Iir; Block : Iir); - -- Field: Field5 + -- Field: Field5 Chain function Get_Concurrent_Statement_Chain (Target : Iir) return Iir; procedure Set_Concurrent_Statement_Chain (Target : Iir; First : Iir); - -- Field: Field2 + -- Field: Field2 Chain_Next function Get_Chain (Target : Iir) return Iir; procedure Set_Chain (Target : Iir; Chain : Iir); pragma Inline (Get_Chain); - -- Field: Field7 + -- Field: Field7 Chain function Get_Port_Chain (Target : Iir) return Iir; procedure Set_Port_Chain (Target : Iir; Chain : Iir); - -- Field: Field6 + -- Field: Field6 Chain function Get_Generic_Chain (Target : Iir) return Iir; procedure Set_Generic_Chain (Target : Iir; Generics : Iir); - -- Field: Field1 + -- Field: Field1 Ref function Get_Type (Target : Iir) return Iir; procedure Set_Type (Target : Iir; Atype : Iir); pragma Inline (Get_Type); @@ -5138,7 +5251,7 @@ package Iirs is function Get_Subtype_Indication (Target : Iir) return Iir; procedure Set_Subtype_Indication (Target : Iir; Atype : Iir); - -- Field: Field5 + -- Field: Field6 function Get_Discrete_Range (Target : Iir) return Iir; procedure Set_Discrete_Range (Target : Iir; Rng : Iir); @@ -5167,12 +5280,12 @@ package Iirs is -- The base name of a name is the node at the origin of the name. -- The base name is a declaration (signal, object, constant or interface), -- a selected_by_all name, an implicit_dereference name. - -- Field: Field5 + -- Field: Field5 Ref function Get_Base_Name (Target : Iir) return Iir; procedure Set_Base_Name (Target : Iir; Name : Iir); pragma Inline (Get_Base_Name); - -- Field: Field5 + -- Field: Field5 Chain function Get_Interface_Declaration_Chain (Target : Iir) return Iir; procedure Set_Interface_Declaration_Chain (Target : Iir; Chain : Iir); pragma Inline (Get_Interface_Declaration_Chain); @@ -5181,7 +5294,7 @@ package Iirs is function Get_Subprogram_Specification (Target : Iir) return Iir; procedure Set_Subprogram_Specification (Target : Iir; Spec : Iir); - -- Field: Field5 + -- Field: Field5 Chain function Get_Sequential_Statement_Chain (Target : Iir) return Iir; procedure Set_Sequential_Statement_Chain (Target : Iir; Chain : Iir); @@ -5193,6 +5306,7 @@ package Iirs is -- identifier. If the overload number is not 0, it is the rank of the -- subprogram. If the overload number is 0, then the identifier is not -- overloaded in the declarative region. + -- Display: Image -- Field: Field12 (pos) function Get_Overload_Number (Target : Iir) return Iir_Int32; procedure Set_Overload_Number (Target : Iir; Val : Iir_Int32); @@ -5203,6 +5317,7 @@ package Iirs is -- For a subprogram declared immediatly within a subprogram of level N, -- the depth is N + 1. -- Depth is used with depth of impure objects to check purity rules. + -- Display: Image -- Field: Field10 (pos) function Get_Subprogram_Depth (Target : Iir) return Iir_Int32; procedure Set_Subprogram_Depth (Target : Iir; Depth : Iir_Int32); @@ -5210,17 +5325,19 @@ package Iirs is -- Hash of a subprogram profile. -- This is used to speed up subprogram profile comparaison, which is very -- often used by overload. + -- Display: Image -- Field: Field11 (pos) function Get_Subprogram_Hash (Target : Iir) return Iir_Int32; procedure Set_Subprogram_Hash (Target : Iir; Val : Iir_Int32); pragma Inline (Get_Subprogram_Hash); -- Depth of the deepest impure object. + -- Display: Image -- Field: Field3 (uc) function Get_Impure_Depth (Target : Iir) return Iir_Int32; procedure Set_Impure_Depth (Target : Iir; Depth : Iir_Int32); - -- Field: Field1 + -- Field: Field1 Ref function Get_Return_Type (Target : Iir) return Iir; procedure Set_Return_Type (Target : Iir; Decl : Iir); pragma Inline (Get_Return_Type); @@ -5232,7 +5349,7 @@ package Iirs is -- For an implicit subprogram, the type_reference is the type declaration -- for which the implicit subprogram was defined. - -- Field: Field10 + -- Field: Field10 Ref function Get_Type_Reference (Target : Iir) return Iir; procedure Set_Type_Reference (Target : Iir; Decl : Iir); @@ -5269,8 +5386,8 @@ package Iirs is procedure Set_Design_Unit (Target : Iir; Unit : Iir_Design_Unit); -- Field: Field7 - function Get_Block_Statement (Target : Iir) return Iir_Block_Statement; - procedure Set_Block_Statement (Target : Iir; Block : Iir_Block_Statement); + function Get_Block_Statement (Target : Iir) return Iir; + procedure Set_Block_Statement (Target : Iir; Block : Iir); -- 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 @@ -5280,7 +5397,7 @@ package Iirs is function Get_Signal_Driver (Target : Iir_Signal_Declaration) return Iir; procedure Set_Signal_Driver (Target : Iir_Signal_Declaration; Driver : Iir); - -- Field: Field1 + -- Field: Field1 Chain function Get_Declaration_Chain (Target : Iir) return Iir; procedure Set_Declaration_Chain (Target : Iir; Decls : Iir); @@ -5292,6 +5409,7 @@ package Iirs is function Get_File_Open_Kind (Target : Iir_File_Declaration) return Iir; procedure Set_File_Open_Kind (Target : Iir_File_Declaration; Kind : Iir); + -- Display: Image -- Field: Field4 (pos) function Get_Element_Position (Target : Iir) return Iir_Index32; procedure Set_Element_Position (Target : Iir; Pos : Iir_Index32); @@ -5315,7 +5433,7 @@ package Iirs is procedure Set_Selected_Name (Target : Iir_Use_Clause; Name : Iir); -- The type declarator which declares the type definition DEF. - -- Field: Field3 + -- Field: Field3 Ref function Get_Type_Declarator (Def : Iir) return Iir; procedure Set_Type_Declarator (Def : Iir; Decl : Iir); @@ -5323,7 +5441,7 @@ package Iirs is function Get_Enumeration_Literal_List (Target : Iir) return Iir_List; procedure Set_Enumeration_Literal_List (Target : Iir; List : Iir_List); - -- Field: Field1 + -- Field: Field1 Chain function Get_Entity_Class_Entry_Chain (Target : Iir) return Iir; procedure Set_Entity_Class_Entry_Chain (Target : Iir; Chain : Iir); @@ -5334,17 +5452,19 @@ package Iirs is -- Chain of physical type units. -- The first unit is the primary unit. If you really need the primary -- unit (and not the chain), you'd better to use Get_Primary_Unit. - -- Field: Field1 + -- Field: Field1 Chain function Get_Unit_Chain (Target : Iir) return Iir; procedure Set_Unit_Chain (Target : Iir; Chain : Iir); -- Alias of Get_Unit_Chain. -- Return the primary unit of a physical type. - -- Field: Field1 + -- Field: Field1 Ref function Get_Primary_Unit (Target : Iir) return Iir; + procedure Set_Primary_Unit (Target : Iir; Unit : Iir); -- Get/Set the identifier of a declaration. -- Can also be used instead of get/set_label. + -- Display: Inline -- Field: Field3 (uc) function Get_Identifier (Target : Iir) return Name_Id; procedure Set_Identifier (Target : Iir; Identifier : Name_Id); @@ -5378,7 +5498,7 @@ package Iirs is function Get_Right_Limit (Decl : Iir_Range_Expression) return Iir; procedure Set_Right_Limit (Decl : Iir_Range_Expression; Limit : Iir); - -- Field: Field4 + -- Field: Field4 Ref function Get_Base_Type (Decl : Iir) return Iir; procedure Set_Base_Type (Decl : Iir; Base_Type : Iir); pragma Inline (Get_Base_Type); @@ -5442,7 +5562,7 @@ package Iirs is function Get_Elements_Declaration_List (Decl : Iir) return Iir_List; procedure Set_Elements_Declaration_List (Decl : Iir; List : Iir_List); - -- Field: Field1 + -- Field: Field1 Ref function Get_Designated_Type (Target : Iir) return Iir; procedure Set_Designated_Type (Target : Iir; Dtype : Iir); @@ -5471,9 +5591,9 @@ package Iirs is function Get_Target (Target : Iir) return Iir; procedure Set_Target (Target : Iir; Atarget : Iir); - -- Field: Field5 - function Get_Waveform_Chain (Target : Iir) return Iir_Waveform_Element; - procedure Set_Waveform_Chain (Target : Iir; Chain : Iir_Waveform_Element); + -- Field: Field5 Chain + function Get_Waveform_Chain (Target : Iir) return Iir; + procedure Set_Waveform_Chain (Target : Iir; Chain : Iir); -- Field: Field8 function Get_Guard (Target : Iir) return Iir; @@ -5630,12 +5750,12 @@ package Iirs is procedure Set_Instantiated_Unit (Target : Iir; Unit : Iir); -- Generic map aspect list. - -- Field: Field8 + -- Field: Field8 Chain function Get_Generic_Map_Aspect_Chain (Target : Iir) return Iir; procedure Set_Generic_Map_Aspect_Chain (Target : Iir; Generics : Iir); -- Port map aspect list. - -- Field: Field9 + -- Field: Field9 Chain function Get_Port_Map_Aspect_Chain (Target : Iir) return Iir; procedure Set_Port_Map_Aspect_Chain (Target : Iir; Port : Iir); @@ -5672,15 +5792,15 @@ package Iirs is -- Set to the designated type (either the type of the expression or the -- subtype) when the expression is analyzed. - -- Field: Field2 + -- Field: Field2 Ref function Get_Allocator_Designated_Type (Target : Iir) return Iir; procedure Set_Allocator_Designated_Type (Target : Iir; A_Type : Iir); - -- Field: Field7 + -- Field: Field7 Chain function Get_Selected_Waveform_Chain (Target : Iir) return Iir; procedure Set_Selected_Waveform_Chain (Target : Iir; Chain : Iir); - -- Field: Field7 + -- Field: Field7 Chain function Get_Conditional_Waveform_Chain (Target : Iir) return Iir; procedure Set_Conditional_Waveform_Chain (Target : Iir; Chain : Iir); @@ -5706,8 +5826,8 @@ package Iirs is procedure Set_Block_Block_Configuration (Block : Iir; Conf : Iir); -- Field: Field5 - function Get_Package_Header (Pkg : Iir) return Iir_Package_Body; - procedure Set_Package_Header (Pkg : Iir; Header : Iir_Package_Body); + function Get_Package_Header (Pkg : Iir) return Iir; + procedure Set_Package_Header (Pkg : Iir; Header : Iir); -- Field: Field7 function Get_Block_Header (Target : Iir) return Iir; @@ -5735,8 +5855,8 @@ package Iirs is procedure Set_Condition (Target : Iir; Condition : Iir); -- Field: Field6 - function Get_Else_Clause (Target : Iir) return Iir_Elsif; - procedure Set_Else_Clause (Target : Iir; Clause : Iir_Elsif); + function Get_Else_Clause (Target : Iir) return Iir; + procedure Set_Else_Clause (Target : Iir; Clause : Iir); -- Iterator of a for_loop_statement. -- Field: Field1 @@ -5745,7 +5865,7 @@ package Iirs is -- Get/Set the statement in which TARGET appears. This is used to check -- if next/exit is in a loop. - -- Field: Field0 + -- Field: Field0 Ref function Get_Parent (Target : Iir) return Iir; procedure Set_Parent (Target : Iir; Parent : Iir); @@ -5772,11 +5892,11 @@ package Iirs is function Get_Default_Entity_Aspect (Target : Iir) return Iir; procedure Set_Default_Entity_Aspect (Target : Iir; Aspect : Iir); - -- Field: Field6 + -- Field: Field6 Chain function Get_Default_Generic_Map_Aspect_Chain (Target : Iir) return Iir; procedure Set_Default_Generic_Map_Aspect_Chain (Target : Iir; Chain : Iir); - -- Field: Field7 + -- Field: Field7 Chain function Get_Default_Port_Map_Aspect_Chain (Target : Iir) return Iir; procedure Set_Default_Port_Map_Aspect_Chain (Target : Iir; Chain : Iir); @@ -5785,7 +5905,7 @@ package Iirs is procedure Set_Binding_Indication (Target : Iir; Binding : Iir); -- The named entity designated by a name. - -- Field: Field4 + -- Field: Field4 Ref function Get_Named_Entity (Name : Iir) return Iir; procedure Set_Named_Entity (Name : Iir; Val : Iir); @@ -5842,6 +5962,12 @@ package Iirs is function Get_Prefix (Target : Iir) return Iir; procedure Set_Prefix (Target : Iir; Prefix : Iir); + -- The subtype of a slice. Contrary to the Type field, this is not a + -- reference. + -- Field: Field3 + function Get_Slice_Subtype (Slice : Iir) return Iir; + procedure Set_Slice_Subtype (Slice : Iir; Atype : Iir); + -- Suffix of a slice or attribute. -- Field: Field2 function Get_Suffix (Target : Iir) return Iir; @@ -5866,25 +5992,25 @@ package Iirs is -- List of individual associations for association_element_by_individual. -- Associations for parenthesis_name. - -- Field: Field2 + -- 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. - -- Field: Field4 + -- Field: Field4 Chain function Get_Individual_Association_Chain (Target : Iir) return Iir; procedure Set_Individual_Association_Chain (Target : Iir; Chain : Iir); -- Get/Set info for the aggregate. -- There is one aggregate_info for for each dimension. -- Field: Field2 - function Get_Aggregate_Info (Target : Iir) return Iir_Aggregate_Info; - procedure Set_Aggregate_Info (Target : Iir; Info : Iir_Aggregate_Info); + function Get_Aggregate_Info (Target : Iir) return Iir; + procedure Set_Aggregate_Info (Target : Iir; Info : Iir); -- Get/Set the info node for the next dimension. -- Field: Field1 - function Get_Sub_Aggregate_Info (Target : Iir) return Iir_Aggregate_Info; - procedure Set_Sub_Aggregate_Info (Target : Iir; Info : Iir_Aggregate_Info); + function Get_Sub_Aggregate_Info (Target : Iir) return Iir; + procedure Set_Sub_Aggregate_Info (Target : Iir; Info : Iir); -- TRUE when the length of the aggregate is not locally static. -- Field: Flag3 @@ -5895,6 +6021,7 @@ package Iirs is -- the aggregate or for the current dimension of a sub-aggregate. -- The real number of elements may be greater than this number if there -- is an 'other' choice. + -- Display: Image -- Field: Field4 (uc) function Get_Aggr_Min_Length (Info : Iir_Aggregate_Info) return Iir_Int32; procedure Set_Aggr_Min_Length (Info : Iir_Aggregate_Info; Nbr : Iir_Int32); @@ -5927,12 +6054,12 @@ package Iirs is procedure Set_Value_Staticness (Target : Iir; Staticness : Iir_Staticness); -- Chain of choices. - -- Field: Field4 + -- Field: Field4 Chain function Get_Association_Choices_Chain (Target : Iir) return Iir; procedure Set_Association_Choices_Chain (Target : Iir; Chain : Iir); -- Chain of choices. - -- Field: Field1 + -- Field: Field1 Chain function Get_Case_Statement_Alternative_Chain (Target : Iir) return Iir; procedure Set_Case_Statement_Alternative_Chain (Target : Iir; Chain : Iir); @@ -5946,12 +6073,12 @@ package Iirs is procedure Set_Procedure_Call (Stmt : Iir; Call : Iir); -- Subprogram to be called by a procedure, function call or operator. - -- Field: Field3 + -- Field: Field3 Ref function Get_Implementation (Target : Iir) return Iir; procedure Set_Implementation (Target : Iir; Decl : Iir); -- Paramater associations for procedure and function call. - -- Field: Field2 + -- Field: Field2 Chain function Get_Parameter_Association_Chain (Target : Iir) return Iir; procedure Set_Parameter_Association_Chain (Target : Iir; Chain : Iir); @@ -5966,6 +6093,10 @@ package Iirs is function Get_Subtype_Type_Mark (Target : Iir) return Iir; procedure Set_Subtype_Type_Mark (Target : Iir; Mark : Iir); + -- Field: Field3 + function Get_Type_Conversion_Subtype (Target : Iir) return Iir; + procedure Set_Type_Conversion_Subtype (Target : Iir; Atype : Iir); + -- The type_mark that appeared in qualified expressions or type -- conversions. -- Field: Field4 @@ -6029,7 +6160,7 @@ package Iirs is function Get_Attribute_Signature (Attr : Iir) return Iir; procedure Set_Attribute_Signature (Attr : Iir; Signature : Iir); - -- Field: Field1 (uc) + -- Field: Field1 Ref (uc) function Get_Overload_List (Target : Iir) return Iir_List; procedure Set_Overload_List (Target : Iir; List : Iir_List); @@ -6038,6 +6169,11 @@ package Iirs is function Get_Simple_Name_Identifier (Target : Iir) return Name_Id; procedure Set_Simple_Name_Identifier (Target : Iir; Ident : Name_Id); + -- Subtype for Simple_Name attribute. + -- Field: Field4 + function Get_Simple_Name_Subtype (Target : Iir) return Iir; + procedure Set_Simple_Name_Subtype (Target : Iir; Atype : Iir); + -- Body of a protected type declaration. -- Field: Field2 function Get_Protected_Type_Body (Target : Iir) return Iir; @@ -6059,7 +6195,8 @@ package Iirs is procedure Set_String_Id (Lit : Iir; Id : String_Id); -- For a string literal: the string length. - -- Field: Field0 (uc) + -- Display: Image + -- Field: Field4 (uc) function Get_String_Length (Lit : Iir) return Int32; procedure Set_String_Length (Lit : Iir; Len : Int32); |