diff options
-rw-r--r-- | src/vhdl/iirs.adb | 16 | ||||
-rw-r--r-- | src/vhdl/iirs.ads | 11 | ||||
-rw-r--r-- | src/vhdl/iirs_utils.adb | 10 | ||||
-rw-r--r-- | src/vhdl/iirs_utils.ads | 4 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.adb | 476 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.ads | 2 | ||||
-rw-r--r-- | src/vhdl/sem_assocs.adb | 2 | ||||
-rw-r--r-- | src/vhdl/sem_types.adb | 7 |
8 files changed, 241 insertions, 287 deletions
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb index b1fe4f277..6169df39a 100644 --- a/src/vhdl/iirs.adb +++ b/src/vhdl/iirs.adb @@ -2509,22 +2509,6 @@ package body Iirs is Set_Field4 (Target, Iir_Index32'Pos (Pos)); end Set_Element_Position; - function Get_Base_Element_Declaration (Target : Iir) return Iir is - begin - pragma Assert (Target /= Null_Iir); - pragma Assert (Has_Base_Element_Declaration (Get_Kind (Target)), - "no field Base_Element_Declaration"); - return Get_Field2 (Target); - end Get_Base_Element_Declaration; - - procedure Set_Base_Element_Declaration (Target : Iir; El : Iir) is - begin - pragma Assert (Target /= Null_Iir); - pragma Assert (Has_Base_Element_Declaration (Get_Kind (Target)), - "no field Base_Element_Declaration"); - Set_Field2 (Target, El); - end Set_Base_Element_Declaration; - function Get_Selected_Element (Target : Iir) return Iir is begin pragma Assert (Target /= Null_Iir); diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads index 19a14a682..471af7952 100644 --- a/src/vhdl/iirs.ads +++ b/src/vhdl/iirs.ads @@ -1786,11 +1786,6 @@ package Iirs 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) -- -- Get/Set_Visible_Flag (Flag4) @@ -1808,8 +1803,6 @@ package Iirs is -- the first record element, increasing by one for each successive element. -- Get/Set_Element_Position (Field4) -- - -- Get/Set_Base_Element_Declaration (Field2) - -- -- Get/Set_Visible_Flag (Flag4) -- Iir_Kind_Attribute_Declaration (Short) @@ -6475,10 +6468,6 @@ package Iirs is 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 Ref function Get_Selected_Element (Target : Iir) return Iir; procedure Set_Selected_Element (Target : Iir; El : Iir); diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb index 046e52b09..110300487 100644 --- a/src/vhdl/iirs_utils.adb +++ b/src/vhdl/iirs_utils.adb @@ -1179,6 +1179,16 @@ package body Iirs_Utils is end if; end Get_Denoted_Type_Mark; + function Get_Base_Element_Declaration (El : Iir) return Iir + is + Rec_Type : constant Iir := Get_Base_Type (Get_Parent (El)); + Els_List : constant Iir_Flist := + Get_Elements_Declaration_List (Rec_Type); + begin + return Get_Nth_Element + (Els_List, Natural (Get_Element_Position (El))); + end Get_Base_Element_Declaration; + function Is_Second_Subprogram_Specification (Spec : Iir) return Boolean is Bod : constant Iir := Get_Chain (Spec); diff --git a/src/vhdl/iirs_utils.ads b/src/vhdl/iirs_utils.ads index ad1a58f84..170452925 100644 --- a/src/vhdl/iirs_utils.ads +++ b/src/vhdl/iirs_utils.ads @@ -244,6 +244,10 @@ package Iirs_Utils is -- Return the type or subtype definition of the SUBTYP type mark. function Get_Denoted_Type_Mark (Subtyp : Iir) return Iir; + -- From element declaration or element constraint EL, get the corresponding + -- element declaration in the base record type. + function Get_Base_Element_Declaration (El : Iir) return Iir; + -- Return true iff L and R have the same profile. -- L and R must be subprograms specification (or spec_body). function Is_Same_Profile (L, R: Iir) return Boolean; diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb index b87030ba0..78513d284 100644 --- a/src/vhdl/nodes_meta.adb +++ b/src/vhdl/nodes_meta.adb @@ -137,7 +137,6 @@ package body Nodes_Meta is Field_File_Logical_Name => Type_Iir, Field_File_Open_Kind => Type_Iir, Field_Element_Position => Type_Iir_Index32, - Field_Base_Element_Declaration => Type_Iir, Field_Selected_Element => Type_Iir, Field_Use_Clause_Chain => Type_Iir, Field_Context_Reference_Chain => Type_Iir, @@ -592,8 +591,6 @@ package body Nodes_Meta is return "file_open_kind"; when Field_Element_Position => return "element_position"; - when Field_Base_Element_Declaration => - return "base_element_declaration"; when Field_Selected_Element => return "selected_element"; when Field_Use_Clause_Chain => @@ -1796,8 +1793,6 @@ package body Nodes_Meta is return Attr_None; when Field_Element_Position => return Attr_None; - when Field_Base_Element_Declaration => - return Attr_Ref; when Field_Selected_Element => return Attr_Ref; when Field_Use_Clause_Chain => @@ -2503,7 +2498,6 @@ package body Nodes_Meta is Field_Visible_Flag, Field_Parent, Field_Type, - Field_Base_Element_Declaration, -- Iir_Kind_Array_Element_Resolution Field_Resolution_Indication, Field_Element_Subtype_Indication, @@ -2947,7 +2941,6 @@ package body Nodes_Meta is Field_Parent, Field_Subtype_Indication, Field_Type, - Field_Base_Element_Declaration, -- Iir_Kind_Non_Object_Alias_Declaration Field_Identifier, Field_Implicit_Alias_Flag, @@ -4465,233 +4458,233 @@ package body Nodes_Meta is Iir_Kind_Signature => 224, Iir_Kind_Aggregate_Info => 231, Iir_Kind_Procedure_Call => 235, - Iir_Kind_Record_Element_Constraint => 241, - Iir_Kind_Array_Element_Resolution => 243, - Iir_Kind_Record_Resolution => 244, - Iir_Kind_Record_Element_Resolution => 247, - Iir_Kind_Attribute_Specification => 255, - Iir_Kind_Disconnection_Specification => 261, - Iir_Kind_Configuration_Specification => 267, - Iir_Kind_Access_Type_Definition => 275, - Iir_Kind_Incomplete_Type_Definition => 283, - Iir_Kind_Interface_Type_Definition => 290, - Iir_Kind_File_Type_Definition => 297, - Iir_Kind_Protected_Type_Declaration => 306, - Iir_Kind_Record_Type_Definition => 316, - Iir_Kind_Array_Type_Definition => 328, - Iir_Kind_Array_Subtype_Definition => 343, - Iir_Kind_Record_Subtype_Definition => 354, - Iir_Kind_Access_Subtype_Definition => 362, - Iir_Kind_Physical_Subtype_Definition => 372, - Iir_Kind_Floating_Subtype_Definition => 383, - Iir_Kind_Integer_Subtype_Definition => 393, - Iir_Kind_Enumeration_Subtype_Definition => 403, - Iir_Kind_Enumeration_Type_Definition => 414, - Iir_Kind_Integer_Type_Definition => 422, - Iir_Kind_Floating_Type_Definition => 430, - Iir_Kind_Physical_Type_Definition => 441, - Iir_Kind_Range_Expression => 449, - Iir_Kind_Protected_Type_Body => 456, - Iir_Kind_Wildcard_Type_Definition => 461, - Iir_Kind_Subtype_Definition => 466, - Iir_Kind_Scalar_Nature_Definition => 470, - Iir_Kind_Overload_List => 471, - Iir_Kind_Type_Declaration => 478, - Iir_Kind_Anonymous_Type_Declaration => 484, - Iir_Kind_Subtype_Declaration => 491, - Iir_Kind_Nature_Declaration => 497, - Iir_Kind_Subnature_Declaration => 503, - Iir_Kind_Entity_Declaration => 515, - Iir_Kind_Configuration_Declaration => 524, - Iir_Kind_Context_Declaration => 530, - Iir_Kind_Package_Declaration => 545, - Iir_Kind_Package_Instantiation_Declaration => 559, - Iir_Kind_Package_Body => 567, - Iir_Kind_Architecture_Body => 579, - Iir_Kind_Package_Header => 581, - Iir_Kind_Unit_Declaration => 590, - Iir_Kind_Library_Declaration => 597, - Iir_Kind_Component_Declaration => 607, - Iir_Kind_Attribute_Declaration => 614, - Iir_Kind_Group_Template_Declaration => 620, - Iir_Kind_Group_Declaration => 627, - Iir_Kind_Element_Declaration => 635, - Iir_Kind_Non_Object_Alias_Declaration => 643, - Iir_Kind_Psl_Declaration => 651, - Iir_Kind_Psl_Endpoint_Declaration => 665, - Iir_Kind_Terminal_Declaration => 671, - Iir_Kind_Free_Quantity_Declaration => 680, - Iir_Kind_Across_Quantity_Declaration => 692, - Iir_Kind_Through_Quantity_Declaration => 704, - Iir_Kind_Enumeration_Literal => 715, - Iir_Kind_Function_Declaration => 740, - Iir_Kind_Procedure_Declaration => 764, - Iir_Kind_Function_Body => 774, - Iir_Kind_Procedure_Body => 785, - Iir_Kind_Object_Alias_Declaration => 796, - Iir_Kind_File_Declaration => 810, - Iir_Kind_Guard_Signal_Declaration => 823, - Iir_Kind_Signal_Declaration => 840, - Iir_Kind_Variable_Declaration => 853, - Iir_Kind_Constant_Declaration => 867, - Iir_Kind_Iterator_Declaration => 878, - Iir_Kind_Interface_Constant_Declaration => 894, - Iir_Kind_Interface_Variable_Declaration => 910, - Iir_Kind_Interface_Signal_Declaration => 931, - Iir_Kind_Interface_File_Declaration => 947, - Iir_Kind_Interface_Type_Declaration => 957, - Iir_Kind_Interface_Package_Declaration => 969, - Iir_Kind_Interface_Function_Declaration => 986, - Iir_Kind_Interface_Procedure_Declaration => 999, - Iir_Kind_Signal_Attribute_Declaration => 1002, - Iir_Kind_Identity_Operator => 1006, - Iir_Kind_Negation_Operator => 1010, - Iir_Kind_Absolute_Operator => 1014, - Iir_Kind_Not_Operator => 1018, - Iir_Kind_Implicit_Condition_Operator => 1022, - Iir_Kind_Condition_Operator => 1026, - Iir_Kind_Reduction_And_Operator => 1030, - Iir_Kind_Reduction_Or_Operator => 1034, - Iir_Kind_Reduction_Nand_Operator => 1038, - Iir_Kind_Reduction_Nor_Operator => 1042, - Iir_Kind_Reduction_Xor_Operator => 1046, - Iir_Kind_Reduction_Xnor_Operator => 1050, - Iir_Kind_And_Operator => 1055, - Iir_Kind_Or_Operator => 1060, - Iir_Kind_Nand_Operator => 1065, - Iir_Kind_Nor_Operator => 1070, - Iir_Kind_Xor_Operator => 1075, - Iir_Kind_Xnor_Operator => 1080, - Iir_Kind_Equality_Operator => 1085, - Iir_Kind_Inequality_Operator => 1090, - Iir_Kind_Less_Than_Operator => 1095, - Iir_Kind_Less_Than_Or_Equal_Operator => 1100, - Iir_Kind_Greater_Than_Operator => 1105, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1110, - Iir_Kind_Match_Equality_Operator => 1115, - Iir_Kind_Match_Inequality_Operator => 1120, - Iir_Kind_Match_Less_Than_Operator => 1125, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1130, - Iir_Kind_Match_Greater_Than_Operator => 1135, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1140, - Iir_Kind_Sll_Operator => 1145, - Iir_Kind_Sla_Operator => 1150, - Iir_Kind_Srl_Operator => 1155, - Iir_Kind_Sra_Operator => 1160, - Iir_Kind_Rol_Operator => 1165, - Iir_Kind_Ror_Operator => 1170, - Iir_Kind_Addition_Operator => 1175, - Iir_Kind_Substraction_Operator => 1180, - Iir_Kind_Concatenation_Operator => 1185, - Iir_Kind_Multiplication_Operator => 1190, - Iir_Kind_Division_Operator => 1195, - Iir_Kind_Modulus_Operator => 1200, - Iir_Kind_Remainder_Operator => 1205, - Iir_Kind_Exponentiation_Operator => 1210, - Iir_Kind_Function_Call => 1218, - Iir_Kind_Aggregate => 1225, - Iir_Kind_Parenthesis_Expression => 1228, - Iir_Kind_Qualified_Expression => 1232, - Iir_Kind_Type_Conversion => 1237, - Iir_Kind_Allocator_By_Expression => 1241, - Iir_Kind_Allocator_By_Subtype => 1246, - Iir_Kind_Selected_Element => 1253, - Iir_Kind_Dereference => 1258, - Iir_Kind_Implicit_Dereference => 1263, - Iir_Kind_Slice_Name => 1270, - Iir_Kind_Indexed_Name => 1276, - Iir_Kind_Psl_Expression => 1278, - Iir_Kind_Sensitized_Process_Statement => 1299, - Iir_Kind_Process_Statement => 1319, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1331, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1343, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1356, - Iir_Kind_Concurrent_Assertion_Statement => 1364, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1371, - Iir_Kind_Psl_Assert_Statement => 1384, - Iir_Kind_Psl_Cover_Statement => 1397, - Iir_Kind_Block_Statement => 1410, - Iir_Kind_If_Generate_Statement => 1421, - Iir_Kind_Case_Generate_Statement => 1430, - Iir_Kind_For_Generate_Statement => 1439, - Iir_Kind_Component_Instantiation_Statement => 1450, - Iir_Kind_Psl_Default_Clock => 1454, - Iir_Kind_Simple_Simultaneous_Statement => 1461, - Iir_Kind_Generate_Statement_Body => 1472, - Iir_Kind_If_Generate_Else_Clause => 1478, - Iir_Kind_Simple_Signal_Assignment_Statement => 1488, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1498, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1509, - Iir_Kind_Null_Statement => 1513, - Iir_Kind_Assertion_Statement => 1520, - Iir_Kind_Report_Statement => 1526, - Iir_Kind_Wait_Statement => 1534, - Iir_Kind_Variable_Assignment_Statement => 1541, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1548, - Iir_Kind_Return_Statement => 1554, - Iir_Kind_For_Loop_Statement => 1563, - Iir_Kind_While_Loop_Statement => 1572, - Iir_Kind_Next_Statement => 1579, - Iir_Kind_Exit_Statement => 1586, - Iir_Kind_Case_Statement => 1594, - Iir_Kind_Procedure_Call_Statement => 1600, - Iir_Kind_If_Statement => 1610, - Iir_Kind_Elsif => 1616, - Iir_Kind_Character_Literal => 1624, - Iir_Kind_Simple_Name => 1632, - Iir_Kind_Selected_Name => 1641, - Iir_Kind_Operator_Symbol => 1647, - Iir_Kind_Reference_Name => 1650, - Iir_Kind_External_Constant_Name => 1659, - Iir_Kind_External_Signal_Name => 1668, - Iir_Kind_External_Variable_Name => 1677, - Iir_Kind_Selected_By_All_Name => 1683, - Iir_Kind_Parenthesis_Name => 1688, - Iir_Kind_Package_Pathname => 1692, - Iir_Kind_Absolute_Pathname => 1693, - Iir_Kind_Relative_Pathname => 1694, - Iir_Kind_Pathname_Element => 1699, - Iir_Kind_Base_Attribute => 1701, - Iir_Kind_Subtype_Attribute => 1706, - Iir_Kind_Element_Attribute => 1711, - Iir_Kind_Left_Type_Attribute => 1716, - Iir_Kind_Right_Type_Attribute => 1721, - Iir_Kind_High_Type_Attribute => 1726, - Iir_Kind_Low_Type_Attribute => 1731, - Iir_Kind_Ascending_Type_Attribute => 1736, - Iir_Kind_Image_Attribute => 1742, - Iir_Kind_Value_Attribute => 1748, - Iir_Kind_Pos_Attribute => 1754, - Iir_Kind_Val_Attribute => 1760, - Iir_Kind_Succ_Attribute => 1766, - Iir_Kind_Pred_Attribute => 1772, - Iir_Kind_Leftof_Attribute => 1778, - Iir_Kind_Rightof_Attribute => 1784, - Iir_Kind_Delayed_Attribute => 1793, - Iir_Kind_Stable_Attribute => 1802, - Iir_Kind_Quiet_Attribute => 1811, - Iir_Kind_Transaction_Attribute => 1820, - Iir_Kind_Event_Attribute => 1824, - Iir_Kind_Active_Attribute => 1828, - Iir_Kind_Last_Event_Attribute => 1832, - Iir_Kind_Last_Active_Attribute => 1836, - Iir_Kind_Last_Value_Attribute => 1840, - Iir_Kind_Driving_Attribute => 1844, - Iir_Kind_Driving_Value_Attribute => 1848, - Iir_Kind_Behavior_Attribute => 1848, - Iir_Kind_Structure_Attribute => 1848, - Iir_Kind_Simple_Name_Attribute => 1855, - Iir_Kind_Instance_Name_Attribute => 1860, - Iir_Kind_Path_Name_Attribute => 1865, - Iir_Kind_Left_Array_Attribute => 1872, - Iir_Kind_Right_Array_Attribute => 1879, - Iir_Kind_High_Array_Attribute => 1886, - Iir_Kind_Low_Array_Attribute => 1893, - Iir_Kind_Length_Array_Attribute => 1900, - Iir_Kind_Ascending_Array_Attribute => 1907, - Iir_Kind_Range_Array_Attribute => 1914, - Iir_Kind_Reverse_Range_Array_Attribute => 1921, - Iir_Kind_Attribute_Name => 1930 + Iir_Kind_Record_Element_Constraint => 240, + Iir_Kind_Array_Element_Resolution => 242, + Iir_Kind_Record_Resolution => 243, + Iir_Kind_Record_Element_Resolution => 246, + Iir_Kind_Attribute_Specification => 254, + Iir_Kind_Disconnection_Specification => 260, + Iir_Kind_Configuration_Specification => 266, + Iir_Kind_Access_Type_Definition => 274, + Iir_Kind_Incomplete_Type_Definition => 282, + Iir_Kind_Interface_Type_Definition => 289, + Iir_Kind_File_Type_Definition => 296, + Iir_Kind_Protected_Type_Declaration => 305, + Iir_Kind_Record_Type_Definition => 315, + Iir_Kind_Array_Type_Definition => 327, + Iir_Kind_Array_Subtype_Definition => 342, + Iir_Kind_Record_Subtype_Definition => 353, + Iir_Kind_Access_Subtype_Definition => 361, + Iir_Kind_Physical_Subtype_Definition => 371, + Iir_Kind_Floating_Subtype_Definition => 382, + Iir_Kind_Integer_Subtype_Definition => 392, + Iir_Kind_Enumeration_Subtype_Definition => 402, + Iir_Kind_Enumeration_Type_Definition => 413, + Iir_Kind_Integer_Type_Definition => 421, + Iir_Kind_Floating_Type_Definition => 429, + Iir_Kind_Physical_Type_Definition => 440, + Iir_Kind_Range_Expression => 448, + Iir_Kind_Protected_Type_Body => 455, + Iir_Kind_Wildcard_Type_Definition => 460, + Iir_Kind_Subtype_Definition => 465, + Iir_Kind_Scalar_Nature_Definition => 469, + Iir_Kind_Overload_List => 470, + Iir_Kind_Type_Declaration => 477, + Iir_Kind_Anonymous_Type_Declaration => 483, + Iir_Kind_Subtype_Declaration => 490, + Iir_Kind_Nature_Declaration => 496, + Iir_Kind_Subnature_Declaration => 502, + Iir_Kind_Entity_Declaration => 514, + Iir_Kind_Configuration_Declaration => 523, + Iir_Kind_Context_Declaration => 529, + Iir_Kind_Package_Declaration => 544, + Iir_Kind_Package_Instantiation_Declaration => 558, + Iir_Kind_Package_Body => 566, + Iir_Kind_Architecture_Body => 578, + Iir_Kind_Package_Header => 580, + Iir_Kind_Unit_Declaration => 589, + Iir_Kind_Library_Declaration => 596, + Iir_Kind_Component_Declaration => 606, + Iir_Kind_Attribute_Declaration => 613, + Iir_Kind_Group_Template_Declaration => 619, + Iir_Kind_Group_Declaration => 626, + Iir_Kind_Element_Declaration => 633, + Iir_Kind_Non_Object_Alias_Declaration => 641, + Iir_Kind_Psl_Declaration => 649, + Iir_Kind_Psl_Endpoint_Declaration => 663, + Iir_Kind_Terminal_Declaration => 669, + Iir_Kind_Free_Quantity_Declaration => 678, + Iir_Kind_Across_Quantity_Declaration => 690, + Iir_Kind_Through_Quantity_Declaration => 702, + Iir_Kind_Enumeration_Literal => 713, + Iir_Kind_Function_Declaration => 738, + Iir_Kind_Procedure_Declaration => 762, + Iir_Kind_Function_Body => 772, + Iir_Kind_Procedure_Body => 783, + Iir_Kind_Object_Alias_Declaration => 794, + Iir_Kind_File_Declaration => 808, + Iir_Kind_Guard_Signal_Declaration => 821, + Iir_Kind_Signal_Declaration => 838, + Iir_Kind_Variable_Declaration => 851, + Iir_Kind_Constant_Declaration => 865, + Iir_Kind_Iterator_Declaration => 876, + Iir_Kind_Interface_Constant_Declaration => 892, + Iir_Kind_Interface_Variable_Declaration => 908, + Iir_Kind_Interface_Signal_Declaration => 929, + Iir_Kind_Interface_File_Declaration => 945, + Iir_Kind_Interface_Type_Declaration => 955, + Iir_Kind_Interface_Package_Declaration => 967, + Iir_Kind_Interface_Function_Declaration => 984, + Iir_Kind_Interface_Procedure_Declaration => 997, + Iir_Kind_Signal_Attribute_Declaration => 1000, + Iir_Kind_Identity_Operator => 1004, + Iir_Kind_Negation_Operator => 1008, + Iir_Kind_Absolute_Operator => 1012, + Iir_Kind_Not_Operator => 1016, + Iir_Kind_Implicit_Condition_Operator => 1020, + Iir_Kind_Condition_Operator => 1024, + Iir_Kind_Reduction_And_Operator => 1028, + Iir_Kind_Reduction_Or_Operator => 1032, + Iir_Kind_Reduction_Nand_Operator => 1036, + Iir_Kind_Reduction_Nor_Operator => 1040, + Iir_Kind_Reduction_Xor_Operator => 1044, + Iir_Kind_Reduction_Xnor_Operator => 1048, + Iir_Kind_And_Operator => 1053, + Iir_Kind_Or_Operator => 1058, + Iir_Kind_Nand_Operator => 1063, + Iir_Kind_Nor_Operator => 1068, + Iir_Kind_Xor_Operator => 1073, + Iir_Kind_Xnor_Operator => 1078, + Iir_Kind_Equality_Operator => 1083, + Iir_Kind_Inequality_Operator => 1088, + Iir_Kind_Less_Than_Operator => 1093, + Iir_Kind_Less_Than_Or_Equal_Operator => 1098, + Iir_Kind_Greater_Than_Operator => 1103, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1108, + Iir_Kind_Match_Equality_Operator => 1113, + Iir_Kind_Match_Inequality_Operator => 1118, + Iir_Kind_Match_Less_Than_Operator => 1123, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1128, + Iir_Kind_Match_Greater_Than_Operator => 1133, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1138, + Iir_Kind_Sll_Operator => 1143, + Iir_Kind_Sla_Operator => 1148, + Iir_Kind_Srl_Operator => 1153, + Iir_Kind_Sra_Operator => 1158, + Iir_Kind_Rol_Operator => 1163, + Iir_Kind_Ror_Operator => 1168, + Iir_Kind_Addition_Operator => 1173, + Iir_Kind_Substraction_Operator => 1178, + Iir_Kind_Concatenation_Operator => 1183, + Iir_Kind_Multiplication_Operator => 1188, + Iir_Kind_Division_Operator => 1193, + Iir_Kind_Modulus_Operator => 1198, + Iir_Kind_Remainder_Operator => 1203, + Iir_Kind_Exponentiation_Operator => 1208, + Iir_Kind_Function_Call => 1216, + Iir_Kind_Aggregate => 1223, + Iir_Kind_Parenthesis_Expression => 1226, + Iir_Kind_Qualified_Expression => 1230, + Iir_Kind_Type_Conversion => 1235, + Iir_Kind_Allocator_By_Expression => 1239, + Iir_Kind_Allocator_By_Subtype => 1244, + Iir_Kind_Selected_Element => 1251, + Iir_Kind_Dereference => 1256, + Iir_Kind_Implicit_Dereference => 1261, + Iir_Kind_Slice_Name => 1268, + Iir_Kind_Indexed_Name => 1274, + Iir_Kind_Psl_Expression => 1276, + Iir_Kind_Sensitized_Process_Statement => 1297, + Iir_Kind_Process_Statement => 1317, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1329, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1341, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1354, + Iir_Kind_Concurrent_Assertion_Statement => 1362, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1369, + Iir_Kind_Psl_Assert_Statement => 1382, + Iir_Kind_Psl_Cover_Statement => 1395, + Iir_Kind_Block_Statement => 1408, + Iir_Kind_If_Generate_Statement => 1419, + Iir_Kind_Case_Generate_Statement => 1428, + Iir_Kind_For_Generate_Statement => 1437, + Iir_Kind_Component_Instantiation_Statement => 1448, + Iir_Kind_Psl_Default_Clock => 1452, + Iir_Kind_Simple_Simultaneous_Statement => 1459, + Iir_Kind_Generate_Statement_Body => 1470, + Iir_Kind_If_Generate_Else_Clause => 1476, + Iir_Kind_Simple_Signal_Assignment_Statement => 1486, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1496, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1507, + Iir_Kind_Null_Statement => 1511, + Iir_Kind_Assertion_Statement => 1518, + Iir_Kind_Report_Statement => 1524, + Iir_Kind_Wait_Statement => 1532, + Iir_Kind_Variable_Assignment_Statement => 1539, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1546, + Iir_Kind_Return_Statement => 1552, + Iir_Kind_For_Loop_Statement => 1561, + Iir_Kind_While_Loop_Statement => 1570, + Iir_Kind_Next_Statement => 1577, + Iir_Kind_Exit_Statement => 1584, + Iir_Kind_Case_Statement => 1592, + Iir_Kind_Procedure_Call_Statement => 1598, + Iir_Kind_If_Statement => 1608, + Iir_Kind_Elsif => 1614, + Iir_Kind_Character_Literal => 1622, + Iir_Kind_Simple_Name => 1630, + Iir_Kind_Selected_Name => 1639, + Iir_Kind_Operator_Symbol => 1645, + Iir_Kind_Reference_Name => 1648, + Iir_Kind_External_Constant_Name => 1657, + Iir_Kind_External_Signal_Name => 1666, + Iir_Kind_External_Variable_Name => 1675, + Iir_Kind_Selected_By_All_Name => 1681, + Iir_Kind_Parenthesis_Name => 1686, + Iir_Kind_Package_Pathname => 1690, + Iir_Kind_Absolute_Pathname => 1691, + Iir_Kind_Relative_Pathname => 1692, + Iir_Kind_Pathname_Element => 1697, + Iir_Kind_Base_Attribute => 1699, + Iir_Kind_Subtype_Attribute => 1704, + Iir_Kind_Element_Attribute => 1709, + Iir_Kind_Left_Type_Attribute => 1714, + Iir_Kind_Right_Type_Attribute => 1719, + Iir_Kind_High_Type_Attribute => 1724, + Iir_Kind_Low_Type_Attribute => 1729, + Iir_Kind_Ascending_Type_Attribute => 1734, + Iir_Kind_Image_Attribute => 1740, + Iir_Kind_Value_Attribute => 1746, + Iir_Kind_Pos_Attribute => 1752, + Iir_Kind_Val_Attribute => 1758, + Iir_Kind_Succ_Attribute => 1764, + Iir_Kind_Pred_Attribute => 1770, + Iir_Kind_Leftof_Attribute => 1776, + Iir_Kind_Rightof_Attribute => 1782, + Iir_Kind_Delayed_Attribute => 1791, + Iir_Kind_Stable_Attribute => 1800, + Iir_Kind_Quiet_Attribute => 1809, + Iir_Kind_Transaction_Attribute => 1818, + Iir_Kind_Event_Attribute => 1822, + Iir_Kind_Active_Attribute => 1826, + Iir_Kind_Last_Event_Attribute => 1830, + Iir_Kind_Last_Active_Attribute => 1834, + Iir_Kind_Last_Value_Attribute => 1838, + Iir_Kind_Driving_Attribute => 1842, + Iir_Kind_Driving_Value_Attribute => 1846, + Iir_Kind_Behavior_Attribute => 1846, + Iir_Kind_Structure_Attribute => 1846, + Iir_Kind_Simple_Name_Attribute => 1853, + Iir_Kind_Instance_Name_Attribute => 1858, + Iir_Kind_Path_Name_Attribute => 1863, + Iir_Kind_Left_Array_Attribute => 1870, + Iir_Kind_Right_Array_Attribute => 1877, + Iir_Kind_High_Array_Attribute => 1884, + Iir_Kind_Low_Array_Attribute => 1891, + Iir_Kind_Length_Array_Attribute => 1898, + Iir_Kind_Ascending_Array_Attribute => 1905, + Iir_Kind_Range_Array_Attribute => 1912, + Iir_Kind_Reverse_Range_Array_Attribute => 1919, + Iir_Kind_Attribute_Name => 1928 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -5202,8 +5195,6 @@ package body Nodes_Meta is return Get_File_Logical_Name (N); when Field_File_Open_Kind => return Get_File_Open_Kind (N); - when Field_Base_Element_Declaration => - return Get_Base_Element_Declaration (N); when Field_Selected_Element => return Get_Selected_Element (N); when Field_Use_Clause_Chain => @@ -5598,8 +5589,6 @@ package body Nodes_Meta is Set_File_Logical_Name (N, V); when Field_File_Open_Kind => Set_File_Open_Kind (N, V); - when Field_Base_Element_Declaration => - Set_Base_Element_Declaration (N, V); when Field_Selected_Element => Set_Selected_Element (N, V); when Field_Use_Clause_Chain => @@ -7962,17 +7951,6 @@ package body Nodes_Meta is end case; end Has_Element_Position; - function Has_Base_Element_Declaration (K : Iir_Kind) return Boolean is - begin - case K is - when Iir_Kind_Record_Element_Constraint - | Iir_Kind_Element_Declaration => - return True; - when others => - return False; - end case; - end Has_Base_Element_Declaration; - function Has_Selected_Element (K : Iir_Kind) return Boolean is begin return K = Iir_Kind_Selected_Element; diff --git a/src/vhdl/nodes_meta.ads b/src/vhdl/nodes_meta.ads index 227bffc91..db47be7f5 100644 --- a/src/vhdl/nodes_meta.ads +++ b/src/vhdl/nodes_meta.ads @@ -178,7 +178,6 @@ package Nodes_Meta is Field_File_Logical_Name, Field_File_Open_Kind, Field_Element_Position, - Field_Base_Element_Declaration, Field_Selected_Element, Field_Use_Clause_Chain, Field_Context_Reference_Chain, @@ -708,7 +707,6 @@ package Nodes_Meta is function Has_File_Logical_Name (K : Iir_Kind) return Boolean; function Has_File_Open_Kind (K : Iir_Kind) return Boolean; function Has_Element_Position (K : Iir_Kind) return Boolean; - function Has_Base_Element_Declaration (K : Iir_Kind) return Boolean; function Has_Selected_Element (K : Iir_Kind) return Boolean; function Has_Use_Clause_Chain (K : Iir_Kind) return Boolean; function Has_Context_Reference_Chain (K : Iir_Kind) return Boolean; diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb index cb9118750..322e0c420 100644 --- a/src/vhdl/sem_assocs.adb +++ b/src/vhdl/sem_assocs.adb @@ -1055,8 +1055,6 @@ package body Sem_Assocs is Location_Copy (Nrec_El, Ch); Set_Parent (Nrec_El, Ntype); Set_Identifier (Nrec_El, Get_Identifier (Rec_El)); - Set_Base_Element_Declaration - (Nrec_El, Get_Base_Element_Declaration (Rec_El)); Set_Element_Position (Nrec_El, Get_Element_Position (Rec_El)); Ch := Get_Associated_Expr (Ch); diff --git a/src/vhdl/sem_types.adb b/src/vhdl/sem_types.adb index 519154bf1..8ea3a4c08 100644 --- a/src/vhdl/sem_types.adb +++ b/src/vhdl/sem_types.adb @@ -907,7 +907,6 @@ package body Sem_Types is else Type_Staticness := None; end if; - Set_Base_Element_Declaration (El, El); Sem_Scopes.Add_Name (El); Name_Visible (El); Xref_Decl (El); @@ -1431,8 +1430,6 @@ package body Sem_Types is Set_Parent (New_El, Parent); Set_Identifier (New_El, Get_Identifier (El)); Set_Type (New_El, Get_Type (El)); - Set_Base_Element_Declaration - (New_El, Get_Base_Element_Declaration (El)); Set_Element_Position (New_El, Get_Element_Position (El)); return New_El; end Copy_Record_Element_Declaration; @@ -1994,8 +1991,6 @@ package body Sem_Types is -- doesn't exist. Error_Msg_Sem (+El, "%n has no %n", (+Type_Mark, +El)); else - Set_Base_Element_Declaration - (El, Get_Base_Element_Declaration (Tm_El)); Pos := Natural (Get_Element_Position (Tm_El)); if Els (Pos) /= Null_Iir then Error_Msg_Sem @@ -2076,8 +2071,6 @@ package body Sem_Types is -- Only a resolution constraint. El := Create_Iir (Iir_Kind_Record_Element_Constraint); Location_Copy (El, Tm_El); - Set_Base_Element_Declaration - (El, Get_Base_Element_Declaration (Tm_El)); El_Type := Null_Iir; else El := Els (I); |