diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 10 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 542 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_assocs.adb | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_types.adb | 6 |
4 files changed, 288 insertions, 273 deletions
diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 5c2ed4886..629f4671e 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -2000,8 +2000,6 @@ package Vhdl.Nodes is -- Record subtype definition which defines this constraint. -- Get/Set_Parent (Field0) -- - -- Get/Set_Type (Field1) - -- -- For Owned_Elements_Chain, so that the node has an owner. -- Get/Set_Chain (Field2) -- @@ -2011,7 +2009,13 @@ package Vhdl.Nodes is -- the first record element, increasing by one for each successive element. -- Get/Set_Element_Position (Field4) -- + -- Get/Set_Subtype_Indication (Field5) + -- + -- Get/Set_Type (Field1) + -- -- Get/Set_Visible_Flag (Flag4) + -- + -- Get/Set_Is_Ref (Flag12) -- Iir_Kind_Attribute_Declaration (Short) -- @@ -2912,7 +2916,7 @@ package Vhdl.Nodes is -- -- Get/Set_Constraint_State (State2) -- - -- Always false for record type: elements are owned through + -- Always true for record subtype: elements are owned through -- Owned_Elements_Chain -- Get/Set_Is_Ref (Flag12) diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 881859b1c..20f40cfe4 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -2772,10 +2772,12 @@ package body Vhdl.Nodes_Meta is -- Iir_Kind_Record_Element_Constraint Field_Identifier, Field_Element_Position, + Field_Is_Ref, Field_Visible_Flag, Field_Parent, - Field_Type, Field_Chain, + Field_Subtype_Indication, + Field_Type, -- Iir_Kind_Array_Element_Resolution Field_Resolution_Indication, Field_Element_Subtype_Indication, @@ -5186,273 +5188,273 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Signature => 225, Iir_Kind_Aggregate_Info => 232, Iir_Kind_Procedure_Call => 236, - Iir_Kind_Record_Element_Constraint => 242, - Iir_Kind_Array_Element_Resolution => 244, - Iir_Kind_Record_Resolution => 245, - Iir_Kind_Record_Element_Resolution => 248, - Iir_Kind_Break_Element => 252, - Iir_Kind_Attribute_Specification => 260, - Iir_Kind_Disconnection_Specification => 266, - Iir_Kind_Step_Limit_Specification => 272, - Iir_Kind_Configuration_Specification => 278, - Iir_Kind_Access_Type_Definition => 286, - Iir_Kind_Incomplete_Type_Definition => 294, - Iir_Kind_Interface_Type_Definition => 301, - Iir_Kind_File_Type_Definition => 308, - Iir_Kind_Protected_Type_Declaration => 318, - Iir_Kind_Record_Type_Definition => 329, - Iir_Kind_Array_Type_Definition => 341, - Iir_Kind_Array_Subtype_Definition => 356, - Iir_Kind_Record_Subtype_Definition => 369, - Iir_Kind_Access_Subtype_Definition => 377, - Iir_Kind_Physical_Subtype_Definition => 387, - Iir_Kind_Floating_Subtype_Definition => 398, - Iir_Kind_Integer_Subtype_Definition => 408, - Iir_Kind_Enumeration_Subtype_Definition => 418, - Iir_Kind_Enumeration_Type_Definition => 430, - Iir_Kind_Integer_Type_Definition => 439, - Iir_Kind_Floating_Type_Definition => 448, - Iir_Kind_Physical_Type_Definition => 460, - Iir_Kind_Range_Expression => 468, - Iir_Kind_Protected_Type_Body => 476, - Iir_Kind_Wildcard_Type_Definition => 481, - Iir_Kind_Subtype_Definition => 488, - Iir_Kind_Scalar_Nature_Definition => 496, - Iir_Kind_Record_Nature_Definition => 509, - Iir_Kind_Array_Nature_Definition => 523, - Iir_Kind_Array_Subnature_Definition => 538, - Iir_Kind_Overload_List => 539, - Iir_Kind_Entity_Declaration => 552, - Iir_Kind_Configuration_Declaration => 561, - Iir_Kind_Context_Declaration => 567, - Iir_Kind_Package_Declaration => 582, - Iir_Kind_Package_Instantiation_Declaration => 596, - Iir_Kind_Vmode_Declaration => 608, - Iir_Kind_Vprop_Declaration => 620, - Iir_Kind_Vunit_Declaration => 633, - Iir_Kind_Package_Body => 641, - Iir_Kind_Architecture_Body => 654, - Iir_Kind_Type_Declaration => 661, - Iir_Kind_Anonymous_Type_Declaration => 667, - Iir_Kind_Subtype_Declaration => 675, - Iir_Kind_Nature_Declaration => 681, - Iir_Kind_Subnature_Declaration => 688, - Iir_Kind_Package_Header => 690, - Iir_Kind_Unit_Declaration => 699, - Iir_Kind_Library_Declaration => 707, - Iir_Kind_Component_Declaration => 717, - Iir_Kind_Attribute_Declaration => 724, - Iir_Kind_Group_Template_Declaration => 730, - Iir_Kind_Group_Declaration => 737, - Iir_Kind_Element_Declaration => 745, - Iir_Kind_Nature_Element_Declaration => 752, - Iir_Kind_Non_Object_Alias_Declaration => 760, - Iir_Kind_Psl_Declaration => 768, - Iir_Kind_Psl_Endpoint_Declaration => 782, - Iir_Kind_Enumeration_Literal => 793, - Iir_Kind_Function_Declaration => 818, - Iir_Kind_Procedure_Declaration => 842, - Iir_Kind_Function_Body => 852, - Iir_Kind_Procedure_Body => 863, - Iir_Kind_Terminal_Declaration => 872, - Iir_Kind_Object_Alias_Declaration => 884, - Iir_Kind_Free_Quantity_Declaration => 896, - Iir_Kind_Spectrum_Quantity_Declaration => 909, - Iir_Kind_Noise_Quantity_Declaration => 921, - Iir_Kind_Across_Quantity_Declaration => 937, - Iir_Kind_Through_Quantity_Declaration => 953, - Iir_Kind_File_Declaration => 968, - Iir_Kind_Guard_Signal_Declaration => 981, - Iir_Kind_Signal_Declaration => 998, - Iir_Kind_Variable_Declaration => 1011, - Iir_Kind_Constant_Declaration => 1025, - Iir_Kind_Iterator_Declaration => 1037, - Iir_Kind_Interface_Constant_Declaration => 1054, - Iir_Kind_Interface_Variable_Declaration => 1070, - Iir_Kind_Interface_Signal_Declaration => 1091, - Iir_Kind_Interface_File_Declaration => 1107, - Iir_Kind_Interface_Quantity_Declaration => 1123, - Iir_Kind_Interface_Terminal_Declaration => 1135, - Iir_Kind_Interface_Type_Declaration => 1146, - Iir_Kind_Interface_Package_Declaration => 1159, - Iir_Kind_Interface_Function_Declaration => 1177, - Iir_Kind_Interface_Procedure_Declaration => 1191, - Iir_Kind_Anonymous_Signal_Declaration => 1200, - Iir_Kind_Signal_Attribute_Declaration => 1203, - Iir_Kind_Identity_Operator => 1207, - Iir_Kind_Negation_Operator => 1211, - Iir_Kind_Absolute_Operator => 1215, - Iir_Kind_Not_Operator => 1219, - Iir_Kind_Implicit_Condition_Operator => 1223, - Iir_Kind_Condition_Operator => 1227, - Iir_Kind_Reduction_And_Operator => 1231, - Iir_Kind_Reduction_Or_Operator => 1235, - Iir_Kind_Reduction_Nand_Operator => 1239, - Iir_Kind_Reduction_Nor_Operator => 1243, - Iir_Kind_Reduction_Xor_Operator => 1247, - Iir_Kind_Reduction_Xnor_Operator => 1251, - Iir_Kind_And_Operator => 1256, - Iir_Kind_Or_Operator => 1261, - Iir_Kind_Nand_Operator => 1266, - Iir_Kind_Nor_Operator => 1271, - Iir_Kind_Xor_Operator => 1276, - Iir_Kind_Xnor_Operator => 1281, - Iir_Kind_Equality_Operator => 1286, - Iir_Kind_Inequality_Operator => 1291, - Iir_Kind_Less_Than_Operator => 1296, - Iir_Kind_Less_Than_Or_Equal_Operator => 1301, - Iir_Kind_Greater_Than_Operator => 1306, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1311, - Iir_Kind_Match_Equality_Operator => 1316, - Iir_Kind_Match_Inequality_Operator => 1321, - Iir_Kind_Match_Less_Than_Operator => 1326, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1331, - Iir_Kind_Match_Greater_Than_Operator => 1336, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1341, - Iir_Kind_Sll_Operator => 1346, - Iir_Kind_Sla_Operator => 1351, - Iir_Kind_Srl_Operator => 1356, - Iir_Kind_Sra_Operator => 1361, - Iir_Kind_Rol_Operator => 1366, - Iir_Kind_Ror_Operator => 1371, - Iir_Kind_Addition_Operator => 1376, - Iir_Kind_Substraction_Operator => 1381, - Iir_Kind_Concatenation_Operator => 1386, - Iir_Kind_Multiplication_Operator => 1391, - Iir_Kind_Division_Operator => 1396, - Iir_Kind_Modulus_Operator => 1401, - Iir_Kind_Remainder_Operator => 1406, - Iir_Kind_Exponentiation_Operator => 1411, - Iir_Kind_Function_Call => 1419, - Iir_Kind_Aggregate => 1426, - Iir_Kind_Parenthesis_Expression => 1429, - Iir_Kind_Qualified_Expression => 1433, - Iir_Kind_Type_Conversion => 1438, - Iir_Kind_Allocator_By_Expression => 1443, - Iir_Kind_Allocator_By_Subtype => 1449, - Iir_Kind_Selected_Element => 1457, - Iir_Kind_Dereference => 1462, - Iir_Kind_Implicit_Dereference => 1467, - Iir_Kind_Slice_Name => 1474, - Iir_Kind_Indexed_Name => 1480, - Iir_Kind_Psl_Prev => 1486, - Iir_Kind_Psl_Stable => 1491, - Iir_Kind_Psl_Rose => 1496, - Iir_Kind_Psl_Fell => 1501, - Iir_Kind_Psl_Expression => 1503, - Iir_Kind_Sensitized_Process_Statement => 1524, - Iir_Kind_Process_Statement => 1544, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1557, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1570, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1584, - Iir_Kind_Concurrent_Assertion_Statement => 1592, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1599, - Iir_Kind_Concurrent_Break_Statement => 1607, - Iir_Kind_Psl_Assert_Directive => 1620, - Iir_Kind_Psl_Assume_Directive => 1631, - Iir_Kind_Psl_Cover_Directive => 1643, - Iir_Kind_Psl_Restrict_Directive => 1654, - Iir_Kind_Block_Statement => 1668, - Iir_Kind_If_Generate_Statement => 1679, - Iir_Kind_Case_Generate_Statement => 1688, - Iir_Kind_For_Generate_Statement => 1697, - Iir_Kind_Component_Instantiation_Statement => 1708, - Iir_Kind_Psl_Default_Clock => 1712, - Iir_Kind_Generate_Statement_Body => 1723, - Iir_Kind_If_Generate_Else_Clause => 1729, - Iir_Kind_Simple_Simultaneous_Statement => 1736, - Iir_Kind_Simultaneous_Null_Statement => 1740, - Iir_Kind_Simultaneous_Procedural_Statement => 1751, - Iir_Kind_Simultaneous_Case_Statement => 1760, - Iir_Kind_Simultaneous_If_Statement => 1769, - Iir_Kind_Simultaneous_Elsif => 1775, - Iir_Kind_Simple_Signal_Assignment_Statement => 1786, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1797, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1809, - Iir_Kind_Null_Statement => 1813, - Iir_Kind_Assertion_Statement => 1820, - Iir_Kind_Report_Statement => 1826, - Iir_Kind_Wait_Statement => 1834, - Iir_Kind_Variable_Assignment_Statement => 1841, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1848, - Iir_Kind_Return_Statement => 1854, - Iir_Kind_For_Loop_Statement => 1865, - Iir_Kind_While_Loop_Statement => 1876, - Iir_Kind_Next_Statement => 1883, - Iir_Kind_Exit_Statement => 1890, - Iir_Kind_Case_Statement => 1898, - Iir_Kind_Procedure_Call_Statement => 1904, - Iir_Kind_Break_Statement => 1911, - Iir_Kind_If_Statement => 1921, - Iir_Kind_Elsif => 1927, - Iir_Kind_Character_Literal => 1935, - Iir_Kind_Simple_Name => 1943, - Iir_Kind_Selected_Name => 1952, - Iir_Kind_Operator_Symbol => 1958, - Iir_Kind_Reference_Name => 1963, - Iir_Kind_External_Constant_Name => 1972, - Iir_Kind_External_Signal_Name => 1981, - Iir_Kind_External_Variable_Name => 1991, - Iir_Kind_Selected_By_All_Name => 1997, - Iir_Kind_Parenthesis_Name => 2002, - Iir_Kind_Package_Pathname => 2006, - Iir_Kind_Absolute_Pathname => 2007, - Iir_Kind_Relative_Pathname => 2008, - Iir_Kind_Pathname_Element => 2013, - Iir_Kind_Base_Attribute => 2015, - Iir_Kind_Subtype_Attribute => 2020, - Iir_Kind_Element_Attribute => 2025, - Iir_Kind_Across_Attribute => 2030, - Iir_Kind_Through_Attribute => 2035, - Iir_Kind_Nature_Reference_Attribute => 2039, - Iir_Kind_Left_Type_Attribute => 2044, - Iir_Kind_Right_Type_Attribute => 2049, - Iir_Kind_High_Type_Attribute => 2054, - Iir_Kind_Low_Type_Attribute => 2059, - Iir_Kind_Ascending_Type_Attribute => 2064, - Iir_Kind_Image_Attribute => 2070, - Iir_Kind_Value_Attribute => 2076, - Iir_Kind_Pos_Attribute => 2082, - Iir_Kind_Val_Attribute => 2088, - Iir_Kind_Succ_Attribute => 2094, - Iir_Kind_Pred_Attribute => 2100, - Iir_Kind_Leftof_Attribute => 2106, - Iir_Kind_Rightof_Attribute => 2112, - Iir_Kind_Signal_Slew_Attribute => 2120, - Iir_Kind_Quantity_Slew_Attribute => 2128, - Iir_Kind_Ramp_Attribute => 2136, - Iir_Kind_Zoh_Attribute => 2144, - Iir_Kind_Ltf_Attribute => 2152, - Iir_Kind_Ztf_Attribute => 2162, - Iir_Kind_Dot_Attribute => 2169, - Iir_Kind_Integ_Attribute => 2176, - Iir_Kind_Above_Attribute => 2184, - Iir_Kind_Quantity_Delayed_Attribute => 2192, - Iir_Kind_Delayed_Attribute => 2201, - Iir_Kind_Stable_Attribute => 2210, - Iir_Kind_Quiet_Attribute => 2219, - Iir_Kind_Transaction_Attribute => 2228, - Iir_Kind_Event_Attribute => 2232, - Iir_Kind_Active_Attribute => 2236, - Iir_Kind_Last_Event_Attribute => 2240, - Iir_Kind_Last_Active_Attribute => 2244, - Iir_Kind_Last_Value_Attribute => 2248, - Iir_Kind_Driving_Attribute => 2252, - Iir_Kind_Driving_Value_Attribute => 2256, - Iir_Kind_Behavior_Attribute => 2256, - Iir_Kind_Structure_Attribute => 2256, - Iir_Kind_Simple_Name_Attribute => 2263, - Iir_Kind_Instance_Name_Attribute => 2268, - Iir_Kind_Path_Name_Attribute => 2273, - Iir_Kind_Left_Array_Attribute => 2280, - Iir_Kind_Right_Array_Attribute => 2287, - Iir_Kind_High_Array_Attribute => 2294, - Iir_Kind_Low_Array_Attribute => 2301, - Iir_Kind_Length_Array_Attribute => 2308, - Iir_Kind_Ascending_Array_Attribute => 2315, - Iir_Kind_Range_Array_Attribute => 2322, - Iir_Kind_Reverse_Range_Array_Attribute => 2329, - Iir_Kind_Attribute_Name => 2338 + Iir_Kind_Record_Element_Constraint => 244, + Iir_Kind_Array_Element_Resolution => 246, + Iir_Kind_Record_Resolution => 247, + Iir_Kind_Record_Element_Resolution => 250, + Iir_Kind_Break_Element => 254, + Iir_Kind_Attribute_Specification => 262, + Iir_Kind_Disconnection_Specification => 268, + Iir_Kind_Step_Limit_Specification => 274, + Iir_Kind_Configuration_Specification => 280, + Iir_Kind_Access_Type_Definition => 288, + Iir_Kind_Incomplete_Type_Definition => 296, + Iir_Kind_Interface_Type_Definition => 303, + Iir_Kind_File_Type_Definition => 310, + Iir_Kind_Protected_Type_Declaration => 320, + Iir_Kind_Record_Type_Definition => 331, + Iir_Kind_Array_Type_Definition => 343, + Iir_Kind_Array_Subtype_Definition => 358, + Iir_Kind_Record_Subtype_Definition => 371, + Iir_Kind_Access_Subtype_Definition => 379, + Iir_Kind_Physical_Subtype_Definition => 389, + Iir_Kind_Floating_Subtype_Definition => 400, + Iir_Kind_Integer_Subtype_Definition => 410, + Iir_Kind_Enumeration_Subtype_Definition => 420, + Iir_Kind_Enumeration_Type_Definition => 432, + Iir_Kind_Integer_Type_Definition => 441, + Iir_Kind_Floating_Type_Definition => 450, + Iir_Kind_Physical_Type_Definition => 462, + Iir_Kind_Range_Expression => 470, + Iir_Kind_Protected_Type_Body => 478, + Iir_Kind_Wildcard_Type_Definition => 483, + Iir_Kind_Subtype_Definition => 490, + Iir_Kind_Scalar_Nature_Definition => 498, + Iir_Kind_Record_Nature_Definition => 511, + Iir_Kind_Array_Nature_Definition => 525, + Iir_Kind_Array_Subnature_Definition => 540, + Iir_Kind_Overload_List => 541, + Iir_Kind_Entity_Declaration => 554, + Iir_Kind_Configuration_Declaration => 563, + Iir_Kind_Context_Declaration => 569, + Iir_Kind_Package_Declaration => 584, + Iir_Kind_Package_Instantiation_Declaration => 598, + Iir_Kind_Vmode_Declaration => 610, + Iir_Kind_Vprop_Declaration => 622, + Iir_Kind_Vunit_Declaration => 635, + Iir_Kind_Package_Body => 643, + Iir_Kind_Architecture_Body => 656, + Iir_Kind_Type_Declaration => 663, + Iir_Kind_Anonymous_Type_Declaration => 669, + Iir_Kind_Subtype_Declaration => 677, + Iir_Kind_Nature_Declaration => 683, + Iir_Kind_Subnature_Declaration => 690, + Iir_Kind_Package_Header => 692, + Iir_Kind_Unit_Declaration => 701, + Iir_Kind_Library_Declaration => 709, + Iir_Kind_Component_Declaration => 719, + Iir_Kind_Attribute_Declaration => 726, + Iir_Kind_Group_Template_Declaration => 732, + Iir_Kind_Group_Declaration => 739, + Iir_Kind_Element_Declaration => 747, + Iir_Kind_Nature_Element_Declaration => 754, + Iir_Kind_Non_Object_Alias_Declaration => 762, + Iir_Kind_Psl_Declaration => 770, + Iir_Kind_Psl_Endpoint_Declaration => 784, + Iir_Kind_Enumeration_Literal => 795, + Iir_Kind_Function_Declaration => 820, + Iir_Kind_Procedure_Declaration => 844, + Iir_Kind_Function_Body => 854, + Iir_Kind_Procedure_Body => 865, + Iir_Kind_Terminal_Declaration => 874, + Iir_Kind_Object_Alias_Declaration => 886, + Iir_Kind_Free_Quantity_Declaration => 898, + Iir_Kind_Spectrum_Quantity_Declaration => 911, + Iir_Kind_Noise_Quantity_Declaration => 923, + Iir_Kind_Across_Quantity_Declaration => 939, + Iir_Kind_Through_Quantity_Declaration => 955, + Iir_Kind_File_Declaration => 970, + Iir_Kind_Guard_Signal_Declaration => 983, + Iir_Kind_Signal_Declaration => 1000, + Iir_Kind_Variable_Declaration => 1013, + Iir_Kind_Constant_Declaration => 1027, + Iir_Kind_Iterator_Declaration => 1039, + Iir_Kind_Interface_Constant_Declaration => 1056, + Iir_Kind_Interface_Variable_Declaration => 1072, + Iir_Kind_Interface_Signal_Declaration => 1093, + Iir_Kind_Interface_File_Declaration => 1109, + Iir_Kind_Interface_Quantity_Declaration => 1125, + Iir_Kind_Interface_Terminal_Declaration => 1137, + Iir_Kind_Interface_Type_Declaration => 1148, + Iir_Kind_Interface_Package_Declaration => 1161, + Iir_Kind_Interface_Function_Declaration => 1179, + Iir_Kind_Interface_Procedure_Declaration => 1193, + Iir_Kind_Anonymous_Signal_Declaration => 1202, + Iir_Kind_Signal_Attribute_Declaration => 1205, + Iir_Kind_Identity_Operator => 1209, + Iir_Kind_Negation_Operator => 1213, + Iir_Kind_Absolute_Operator => 1217, + Iir_Kind_Not_Operator => 1221, + Iir_Kind_Implicit_Condition_Operator => 1225, + Iir_Kind_Condition_Operator => 1229, + Iir_Kind_Reduction_And_Operator => 1233, + Iir_Kind_Reduction_Or_Operator => 1237, + Iir_Kind_Reduction_Nand_Operator => 1241, + Iir_Kind_Reduction_Nor_Operator => 1245, + Iir_Kind_Reduction_Xor_Operator => 1249, + Iir_Kind_Reduction_Xnor_Operator => 1253, + Iir_Kind_And_Operator => 1258, + Iir_Kind_Or_Operator => 1263, + Iir_Kind_Nand_Operator => 1268, + Iir_Kind_Nor_Operator => 1273, + Iir_Kind_Xor_Operator => 1278, + Iir_Kind_Xnor_Operator => 1283, + Iir_Kind_Equality_Operator => 1288, + Iir_Kind_Inequality_Operator => 1293, + Iir_Kind_Less_Than_Operator => 1298, + Iir_Kind_Less_Than_Or_Equal_Operator => 1303, + Iir_Kind_Greater_Than_Operator => 1308, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1313, + Iir_Kind_Match_Equality_Operator => 1318, + Iir_Kind_Match_Inequality_Operator => 1323, + Iir_Kind_Match_Less_Than_Operator => 1328, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1333, + Iir_Kind_Match_Greater_Than_Operator => 1338, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1343, + Iir_Kind_Sll_Operator => 1348, + Iir_Kind_Sla_Operator => 1353, + Iir_Kind_Srl_Operator => 1358, + Iir_Kind_Sra_Operator => 1363, + Iir_Kind_Rol_Operator => 1368, + Iir_Kind_Ror_Operator => 1373, + Iir_Kind_Addition_Operator => 1378, + Iir_Kind_Substraction_Operator => 1383, + Iir_Kind_Concatenation_Operator => 1388, + Iir_Kind_Multiplication_Operator => 1393, + Iir_Kind_Division_Operator => 1398, + Iir_Kind_Modulus_Operator => 1403, + Iir_Kind_Remainder_Operator => 1408, + Iir_Kind_Exponentiation_Operator => 1413, + Iir_Kind_Function_Call => 1421, + Iir_Kind_Aggregate => 1428, + Iir_Kind_Parenthesis_Expression => 1431, + Iir_Kind_Qualified_Expression => 1435, + Iir_Kind_Type_Conversion => 1440, + Iir_Kind_Allocator_By_Expression => 1445, + Iir_Kind_Allocator_By_Subtype => 1451, + Iir_Kind_Selected_Element => 1459, + Iir_Kind_Dereference => 1464, + Iir_Kind_Implicit_Dereference => 1469, + Iir_Kind_Slice_Name => 1476, + Iir_Kind_Indexed_Name => 1482, + Iir_Kind_Psl_Prev => 1488, + Iir_Kind_Psl_Stable => 1493, + Iir_Kind_Psl_Rose => 1498, + Iir_Kind_Psl_Fell => 1503, + Iir_Kind_Psl_Expression => 1505, + Iir_Kind_Sensitized_Process_Statement => 1526, + Iir_Kind_Process_Statement => 1546, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1559, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1572, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1586, + Iir_Kind_Concurrent_Assertion_Statement => 1594, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1601, + Iir_Kind_Concurrent_Break_Statement => 1609, + Iir_Kind_Psl_Assert_Directive => 1622, + Iir_Kind_Psl_Assume_Directive => 1633, + Iir_Kind_Psl_Cover_Directive => 1645, + Iir_Kind_Psl_Restrict_Directive => 1656, + Iir_Kind_Block_Statement => 1670, + Iir_Kind_If_Generate_Statement => 1681, + Iir_Kind_Case_Generate_Statement => 1690, + Iir_Kind_For_Generate_Statement => 1699, + Iir_Kind_Component_Instantiation_Statement => 1710, + Iir_Kind_Psl_Default_Clock => 1714, + Iir_Kind_Generate_Statement_Body => 1725, + Iir_Kind_If_Generate_Else_Clause => 1731, + Iir_Kind_Simple_Simultaneous_Statement => 1738, + Iir_Kind_Simultaneous_Null_Statement => 1742, + Iir_Kind_Simultaneous_Procedural_Statement => 1753, + Iir_Kind_Simultaneous_Case_Statement => 1762, + Iir_Kind_Simultaneous_If_Statement => 1771, + Iir_Kind_Simultaneous_Elsif => 1777, + Iir_Kind_Simple_Signal_Assignment_Statement => 1788, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1799, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1811, + Iir_Kind_Null_Statement => 1815, + Iir_Kind_Assertion_Statement => 1822, + Iir_Kind_Report_Statement => 1828, + Iir_Kind_Wait_Statement => 1836, + Iir_Kind_Variable_Assignment_Statement => 1843, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1850, + Iir_Kind_Return_Statement => 1856, + Iir_Kind_For_Loop_Statement => 1867, + Iir_Kind_While_Loop_Statement => 1878, + Iir_Kind_Next_Statement => 1885, + Iir_Kind_Exit_Statement => 1892, + Iir_Kind_Case_Statement => 1900, + Iir_Kind_Procedure_Call_Statement => 1906, + Iir_Kind_Break_Statement => 1913, + Iir_Kind_If_Statement => 1923, + Iir_Kind_Elsif => 1929, + Iir_Kind_Character_Literal => 1937, + Iir_Kind_Simple_Name => 1945, + Iir_Kind_Selected_Name => 1954, + Iir_Kind_Operator_Symbol => 1960, + Iir_Kind_Reference_Name => 1965, + Iir_Kind_External_Constant_Name => 1974, + Iir_Kind_External_Signal_Name => 1983, + Iir_Kind_External_Variable_Name => 1993, + Iir_Kind_Selected_By_All_Name => 1999, + Iir_Kind_Parenthesis_Name => 2004, + Iir_Kind_Package_Pathname => 2008, + Iir_Kind_Absolute_Pathname => 2009, + Iir_Kind_Relative_Pathname => 2010, + Iir_Kind_Pathname_Element => 2015, + Iir_Kind_Base_Attribute => 2017, + Iir_Kind_Subtype_Attribute => 2022, + Iir_Kind_Element_Attribute => 2027, + Iir_Kind_Across_Attribute => 2032, + Iir_Kind_Through_Attribute => 2037, + Iir_Kind_Nature_Reference_Attribute => 2041, + Iir_Kind_Left_Type_Attribute => 2046, + Iir_Kind_Right_Type_Attribute => 2051, + Iir_Kind_High_Type_Attribute => 2056, + Iir_Kind_Low_Type_Attribute => 2061, + Iir_Kind_Ascending_Type_Attribute => 2066, + Iir_Kind_Image_Attribute => 2072, + Iir_Kind_Value_Attribute => 2078, + Iir_Kind_Pos_Attribute => 2084, + Iir_Kind_Val_Attribute => 2090, + Iir_Kind_Succ_Attribute => 2096, + Iir_Kind_Pred_Attribute => 2102, + Iir_Kind_Leftof_Attribute => 2108, + Iir_Kind_Rightof_Attribute => 2114, + Iir_Kind_Signal_Slew_Attribute => 2122, + Iir_Kind_Quantity_Slew_Attribute => 2130, + Iir_Kind_Ramp_Attribute => 2138, + Iir_Kind_Zoh_Attribute => 2146, + Iir_Kind_Ltf_Attribute => 2154, + Iir_Kind_Ztf_Attribute => 2164, + Iir_Kind_Dot_Attribute => 2171, + Iir_Kind_Integ_Attribute => 2178, + Iir_Kind_Above_Attribute => 2186, + Iir_Kind_Quantity_Delayed_Attribute => 2194, + Iir_Kind_Delayed_Attribute => 2203, + Iir_Kind_Stable_Attribute => 2212, + Iir_Kind_Quiet_Attribute => 2221, + Iir_Kind_Transaction_Attribute => 2230, + Iir_Kind_Event_Attribute => 2234, + Iir_Kind_Active_Attribute => 2238, + Iir_Kind_Last_Event_Attribute => 2242, + Iir_Kind_Last_Active_Attribute => 2246, + Iir_Kind_Last_Value_Attribute => 2250, + Iir_Kind_Driving_Attribute => 2254, + Iir_Kind_Driving_Value_Attribute => 2258, + Iir_Kind_Behavior_Attribute => 2258, + Iir_Kind_Structure_Attribute => 2258, + Iir_Kind_Simple_Name_Attribute => 2265, + Iir_Kind_Instance_Name_Attribute => 2270, + Iir_Kind_Path_Name_Attribute => 2275, + Iir_Kind_Left_Array_Attribute => 2282, + Iir_Kind_Right_Array_Attribute => 2289, + Iir_Kind_High_Array_Attribute => 2296, + Iir_Kind_Low_Array_Attribute => 2303, + Iir_Kind_Length_Array_Attribute => 2310, + Iir_Kind_Ascending_Array_Attribute => 2317, + Iir_Kind_Range_Array_Attribute => 2324, + Iir_Kind_Reverse_Range_Array_Attribute => 2331, + Iir_Kind_Attribute_Name => 2340 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -8623,7 +8625,8 @@ package body Vhdl.Nodes_Meta is function Has_Subtype_Indication (K : Iir_Kind) return Boolean is begin case K is - when Iir_Kind_Subtype_Declaration + when Iir_Kind_Record_Element_Constraint + | Iir_Kind_Subtype_Declaration | Iir_Kind_Element_Declaration | Iir_Kind_Object_Alias_Declaration | Iir_Kind_Free_Quantity_Declaration @@ -12222,6 +12225,7 @@ package body Vhdl.Nodes_Meta is when Iir_Kind_Conditional_Waveform | Iir_Kind_Conditional_Expression | Iir_Kind_Component_Configuration + | Iir_Kind_Record_Element_Constraint | Iir_Kind_Disconnection_Specification | Iir_Kind_Step_Limit_Specification | Iir_Kind_Configuration_Specification diff --git a/src/vhdl/vhdl-sem_assocs.adb b/src/vhdl/vhdl-sem_assocs.adb index 25287e076..927877458 100644 --- a/src/vhdl/vhdl-sem_assocs.adb +++ b/src/vhdl/vhdl-sem_assocs.adb @@ -1068,6 +1068,7 @@ package body Vhdl.Sem_Assocs is Assoc_Type : Iir; begin Ntype := Create_Iir (Iir_Kind_Record_Subtype_Definition); + Set_Is_Ref (Ntype, True); Location_Copy (Ntype, Assoc); Set_Base_Type (Ntype, Get_Base_Type (Atype)); if Get_Kind (Atype) = Iir_Kind_Record_Subtype_Definition then @@ -1108,6 +1109,7 @@ package body Vhdl.Sem_Assocs is = Iir_Kind_Association_Element_By_Individual) then Assoc_Type := Get_Actual_Type (Assoc_Expr); + Set_Subtype_Indication (Nrec_El, Assoc_Type); else Assoc_Type := Get_Type (Get_Actual (Assoc_Expr)); end if; @@ -1122,6 +1124,7 @@ package body Vhdl.Sem_Assocs is Set_Constraint_State (Ntype, Fully_Constrained); Set_Actual_Type (Assoc, Ntype); + Set_Actual_Type_Definition (Assoc, Ntype); end; else Set_Actual_Type (Assoc, Atype); diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index 7b2179201..7a59f53b1 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -1995,7 +1995,8 @@ package body Vhdl.Sem_Types is El_List := Null_Iir_Flist; when Iir_Kind_Array_Subtype_Definition => - -- Record constraints are parsed as array constraints. + -- Record constraints were parsed as array constraints. + -- Reparse. pragma Assert (Get_Kind (Def) = Iir_Kind_Array_Subtype_Definition); Index_List := Get_Index_Constraint_List (Def); El_List := Create_Iir_Flist (Get_Nbr_Elements (Index_List)); @@ -2068,6 +2069,7 @@ package body Vhdl.Sem_Types is else Els (Pos) := El; Set_Parent (El, Res); + Append_Owned_Element_Constraint (Res, El); end if; El_Type := Get_Type (El); Tm_El_Type := Get_Type (Tm_El); @@ -2088,6 +2090,7 @@ package body Vhdl.Sem_Types is (+El_Type, "only composite types may be constrained"); end case; + Set_Subtype_Indication (El, El_Type); end if; Set_Type (El, El_Type); end if; @@ -2152,6 +2155,7 @@ package body Vhdl.Sem_Types is Get_Type (Tm_El), Res_Els (I)); Set_Type (El, El_Type); + Set_Subtype_Indication (El, El_Type); Set_Element_Position (El, Get_Element_Position (Tm_El)); end if; Set_Nth_Element (El_List, I, El); |