diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-11-30 21:25:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-11-30 21:25:51 +0100 |
commit | d74e7a232bb4778ac2da6fbb27735bafe4ca9f81 (patch) | |
tree | f920cf94e7448d68d4541db7b64cc32eb182ab78 /src | |
parent | b89056bf8498b2fb2021f4776d1aa69f10f15e8c (diff) | |
download | ghdl-d74e7a232bb4778ac2da6fbb27735bafe4ca9f81.tar.gz ghdl-d74e7a232bb4778ac2da6fbb27735bafe4ca9f81.tar.bz2 ghdl-d74e7a232bb4778ac2da6fbb27735bafe4ca9f81.zip |
vhdl-nodes: add Get/Set_Associated_Subprogram.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-nodes.adb | 16 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 6 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 388 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.ads | 2 |
4 files changed, 229 insertions, 183 deletions
diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb index 5fac95d66..07ed95bfd 100644 --- a/src/vhdl/vhdl-nodes.adb +++ b/src/vhdl/vhdl-nodes.adb @@ -3182,6 +3182,22 @@ package body Vhdl.Nodes is Set_Field9 (Inter, Subprg); end Set_Default_Subprogram; + function Get_Associated_Subprogram (Inter : Iir) return Iir is + begin + pragma Assert (Inter /= Null_Iir); + pragma Assert (Has_Associated_Subprogram (Get_Kind (Inter)), + "no field Associated_Subprogram"); + return Get_Field6 (Inter); + end Get_Associated_Subprogram; + + procedure Set_Associated_Subprogram (Inter : Iir; Subprg : Iir) is + begin + pragma Assert (Inter /= Null_Iir); + pragma Assert (Has_Associated_Subprogram (Get_Kind (Inter)), + "no field Associated_Subprogram"); + Set_Field6 (Inter, Subprg); + end Set_Associated_Subprogram; + function Get_Subprogram_Specification (Target : Iir) return Iir is begin pragma Assert (Target /= Null_Iir); diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index a82fc46c1..529790b9a 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -1782,6 +1782,8 @@ package Vhdl.Nodes is -- -- Get/Set_Subprogram_Depth (Field10) -- + -- Get/Set_Associated_Subprogram (Field6) + -- -- Get/Set_Seen_Flag (Flag1) -- -- Only for Iir_Kind_Interface_Function_Declaration: @@ -8262,6 +8264,10 @@ package Vhdl.Nodes is procedure Set_Default_Subprogram (Inter : Iir; Subprg : Iir); -- Field: Field6 Ref + function Get_Associated_Subprogram (Inter : Iir) return Iir; + procedure Set_Associated_Subprogram (Inter : Iir; Subprg : Iir); + + -- Field: Field6 Ref function Get_Subprogram_Specification (Target : Iir) return Iir; procedure Set_Subprogram_Specification (Target : Iir; Spec : Iir); diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 20ed0a51f..526b6554b 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -128,6 +128,7 @@ package body Vhdl.Nodes_Meta is Field_Base_Name => Type_Iir, Field_Interface_Declaration_Chain => Type_Iir, Field_Default_Subprogram => Type_Iir, + Field_Associated_Subprogram => Type_Iir, Field_Subprogram_Specification => Type_Iir, Field_Sequential_Statement_Chain => Type_Iir, Field_Simultaneous_Statement_Chain => Type_Iir, @@ -631,6 +632,8 @@ package body Vhdl.Nodes_Meta is return "interface_declaration_chain"; when Field_Default_Subprogram => return "default_subprogram"; + when Field_Associated_Subprogram => + return "associated_subprogram"; when Field_Subprogram_Specification => return "subprogram_specification"; when Field_Sequential_Statement_Chain => @@ -2055,6 +2058,8 @@ package body Vhdl.Nodes_Meta is return Attr_Chain; when Field_Default_Subprogram => return Attr_None; + when Field_Associated_Subprogram => + return Attr_Ref; when Field_Subprogram_Specification => return Attr_Ref; when Field_Sequential_Statement_Chain => @@ -3979,6 +3984,7 @@ package body Vhdl.Nodes_Meta is Field_Interface_Declaration_Chain, Field_Return_Type_Mark, Field_Default_Subprogram, + Field_Associated_Subprogram, -- Iir_Kind_Interface_Procedure_Declaration Field_Subprogram_Depth, Field_Identifier, @@ -3995,6 +4001,7 @@ package body Vhdl.Nodes_Meta is Field_Interface_Declaration_Chain, Field_Return_Type_Mark, Field_Default_Subprogram, + Field_Associated_Subprogram, -- Iir_Kind_Attribute_Implicit_Declaration Field_Parent, Field_Chain, @@ -5493,189 +5500,189 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Interface_Terminal_Declaration => 1190, Iir_Kind_Interface_Type_Declaration => 1202, Iir_Kind_Interface_Package_Declaration => 1215, - Iir_Kind_Interface_Function_Declaration => 1234, - Iir_Kind_Interface_Procedure_Declaration => 1249, - Iir_Kind_Attribute_Implicit_Declaration => 1252, - Iir_Kind_Suspend_State_Declaration => 1255, - Iir_Kind_Identity_Operator => 1259, - Iir_Kind_Negation_Operator => 1263, - Iir_Kind_Absolute_Operator => 1267, - Iir_Kind_Not_Operator => 1271, - Iir_Kind_Implicit_Condition_Operator => 1275, - Iir_Kind_Condition_Operator => 1279, - Iir_Kind_Reduction_And_Operator => 1283, - Iir_Kind_Reduction_Or_Operator => 1287, - Iir_Kind_Reduction_Nand_Operator => 1291, - Iir_Kind_Reduction_Nor_Operator => 1295, - Iir_Kind_Reduction_Xor_Operator => 1299, - Iir_Kind_Reduction_Xnor_Operator => 1303, - Iir_Kind_And_Operator => 1308, - Iir_Kind_Or_Operator => 1313, - Iir_Kind_Nand_Operator => 1318, - Iir_Kind_Nor_Operator => 1323, - Iir_Kind_Xor_Operator => 1328, - Iir_Kind_Xnor_Operator => 1333, - Iir_Kind_Equality_Operator => 1338, - Iir_Kind_Inequality_Operator => 1343, - Iir_Kind_Less_Than_Operator => 1348, - Iir_Kind_Less_Than_Or_Equal_Operator => 1353, - Iir_Kind_Greater_Than_Operator => 1358, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1363, - Iir_Kind_Match_Equality_Operator => 1368, - Iir_Kind_Match_Inequality_Operator => 1373, - Iir_Kind_Match_Less_Than_Operator => 1378, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1383, - Iir_Kind_Match_Greater_Than_Operator => 1388, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1393, - Iir_Kind_Sll_Operator => 1398, - Iir_Kind_Sla_Operator => 1403, - Iir_Kind_Srl_Operator => 1408, - Iir_Kind_Sra_Operator => 1413, - Iir_Kind_Rol_Operator => 1418, - Iir_Kind_Ror_Operator => 1423, - Iir_Kind_Addition_Operator => 1428, - Iir_Kind_Substraction_Operator => 1433, - Iir_Kind_Concatenation_Operator => 1438, - Iir_Kind_Multiplication_Operator => 1443, - Iir_Kind_Division_Operator => 1448, - Iir_Kind_Modulus_Operator => 1453, - Iir_Kind_Remainder_Operator => 1458, - Iir_Kind_Exponentiation_Operator => 1463, - Iir_Kind_Function_Call => 1471, - Iir_Kind_Aggregate => 1479, - Iir_Kind_Parenthesis_Expression => 1482, - Iir_Kind_Qualified_Expression => 1486, - Iir_Kind_Type_Conversion => 1491, - Iir_Kind_Allocator_By_Expression => 1496, - Iir_Kind_Allocator_By_Subtype => 1502, - Iir_Kind_Selected_Element => 1510, - Iir_Kind_Dereference => 1515, - Iir_Kind_Implicit_Dereference => 1520, - Iir_Kind_Slice_Name => 1527, - Iir_Kind_Indexed_Name => 1533, - Iir_Kind_Psl_Prev => 1539, - Iir_Kind_Psl_Stable => 1544, - Iir_Kind_Psl_Rose => 1549, - Iir_Kind_Psl_Fell => 1554, - Iir_Kind_Psl_Onehot => 1557, - Iir_Kind_Psl_Onehot0 => 1560, - Iir_Kind_Psl_Expression => 1562, - Iir_Kind_Sensitized_Process_Statement => 1584, - Iir_Kind_Process_Statement => 1605, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1618, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1631, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1645, - Iir_Kind_Concurrent_Assertion_Statement => 1653, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1660, - Iir_Kind_Concurrent_Break_Statement => 1668, - Iir_Kind_Psl_Assert_Directive => 1682, - Iir_Kind_Psl_Assume_Directive => 1694, - Iir_Kind_Psl_Cover_Directive => 1706, - Iir_Kind_Psl_Restrict_Directive => 1717, - Iir_Kind_Block_Statement => 1731, - Iir_Kind_If_Generate_Statement => 1742, - Iir_Kind_Case_Generate_Statement => 1751, - Iir_Kind_For_Generate_Statement => 1760, - Iir_Kind_Component_Instantiation_Statement => 1771, - Iir_Kind_Psl_Default_Clock => 1774, - Iir_Kind_Generate_Statement_Body => 1785, - Iir_Kind_If_Generate_Else_Clause => 1791, - Iir_Kind_Simple_Simultaneous_Statement => 1798, - Iir_Kind_Simultaneous_Null_Statement => 1802, - Iir_Kind_Simultaneous_Procedural_Statement => 1813, - Iir_Kind_Simultaneous_Case_Statement => 1822, - Iir_Kind_Simultaneous_If_Statement => 1831, - Iir_Kind_Simultaneous_Elsif => 1837, - Iir_Kind_Simple_Signal_Assignment_Statement => 1848, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1859, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1871, - Iir_Kind_Signal_Force_Assignment_Statement => 1881, - Iir_Kind_Signal_Release_Assignment_Statement => 1890, - Iir_Kind_Null_Statement => 1894, - Iir_Kind_Assertion_Statement => 1901, - Iir_Kind_Report_Statement => 1907, - Iir_Kind_Wait_Statement => 1915, - Iir_Kind_Variable_Assignment_Statement => 1922, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1929, - Iir_Kind_Return_Statement => 1935, - Iir_Kind_For_Loop_Statement => 1946, - Iir_Kind_While_Loop_Statement => 1957, - Iir_Kind_Next_Statement => 1964, - Iir_Kind_Exit_Statement => 1971, - Iir_Kind_Case_Statement => 1980, - Iir_Kind_Procedure_Call_Statement => 1986, - Iir_Kind_Break_Statement => 1993, - Iir_Kind_If_Statement => 2003, - Iir_Kind_Suspend_State_Statement => 2007, - Iir_Kind_Elsif => 2013, - Iir_Kind_Character_Literal => 2020, - Iir_Kind_Simple_Name => 2027, - Iir_Kind_Selected_Name => 2035, - Iir_Kind_Operator_Symbol => 2040, - Iir_Kind_Reference_Name => 2045, - Iir_Kind_External_Constant_Name => 2054, - Iir_Kind_External_Signal_Name => 2064, - Iir_Kind_External_Variable_Name => 2074, - Iir_Kind_Selected_By_All_Name => 2080, - Iir_Kind_Parenthesis_Name => 2085, - Iir_Kind_Package_Pathname => 2089, - Iir_Kind_Absolute_Pathname => 2090, - Iir_Kind_Relative_Pathname => 2091, - Iir_Kind_Pathname_Element => 2096, - Iir_Kind_Base_Attribute => 2098, - Iir_Kind_Subtype_Attribute => 2103, - Iir_Kind_Element_Attribute => 2108, - Iir_Kind_Across_Attribute => 2113, - Iir_Kind_Through_Attribute => 2118, - Iir_Kind_Nature_Reference_Attribute => 2122, - Iir_Kind_Left_Type_Attribute => 2127, - Iir_Kind_Right_Type_Attribute => 2132, - Iir_Kind_High_Type_Attribute => 2137, - Iir_Kind_Low_Type_Attribute => 2142, - Iir_Kind_Ascending_Type_Attribute => 2147, - Iir_Kind_Image_Attribute => 2153, - Iir_Kind_Value_Attribute => 2159, - Iir_Kind_Pos_Attribute => 2165, - Iir_Kind_Val_Attribute => 2171, - Iir_Kind_Succ_Attribute => 2177, - Iir_Kind_Pred_Attribute => 2183, - Iir_Kind_Leftof_Attribute => 2189, - Iir_Kind_Rightof_Attribute => 2195, - Iir_Kind_Signal_Slew_Attribute => 2203, - Iir_Kind_Quantity_Slew_Attribute => 2211, - Iir_Kind_Ramp_Attribute => 2219, - Iir_Kind_Zoh_Attribute => 2227, - Iir_Kind_Ltf_Attribute => 2235, - Iir_Kind_Ztf_Attribute => 2245, - Iir_Kind_Dot_Attribute => 2252, - Iir_Kind_Integ_Attribute => 2259, - Iir_Kind_Quantity_Delayed_Attribute => 2267, - Iir_Kind_Above_Attribute => 2275, - Iir_Kind_Delayed_Attribute => 2284, - Iir_Kind_Stable_Attribute => 2293, - Iir_Kind_Quiet_Attribute => 2302, - Iir_Kind_Transaction_Attribute => 2311, - Iir_Kind_Event_Attribute => 2315, - Iir_Kind_Active_Attribute => 2319, - Iir_Kind_Last_Event_Attribute => 2323, - Iir_Kind_Last_Active_Attribute => 2327, - Iir_Kind_Last_Value_Attribute => 2331, - Iir_Kind_Driving_Attribute => 2335, - Iir_Kind_Driving_Value_Attribute => 2339, - Iir_Kind_Behavior_Attribute => 2339, - Iir_Kind_Structure_Attribute => 2339, - Iir_Kind_Simple_Name_Attribute => 2346, - Iir_Kind_Instance_Name_Attribute => 2351, - Iir_Kind_Path_Name_Attribute => 2356, - Iir_Kind_Left_Array_Attribute => 2363, - Iir_Kind_Right_Array_Attribute => 2370, - Iir_Kind_High_Array_Attribute => 2377, - Iir_Kind_Low_Array_Attribute => 2384, - Iir_Kind_Length_Array_Attribute => 2391, - Iir_Kind_Ascending_Array_Attribute => 2398, - Iir_Kind_Range_Array_Attribute => 2405, - Iir_Kind_Reverse_Range_Array_Attribute => 2412, - Iir_Kind_Attribute_Name => 2421 + Iir_Kind_Interface_Function_Declaration => 1235, + Iir_Kind_Interface_Procedure_Declaration => 1251, + Iir_Kind_Attribute_Implicit_Declaration => 1254, + Iir_Kind_Suspend_State_Declaration => 1257, + Iir_Kind_Identity_Operator => 1261, + Iir_Kind_Negation_Operator => 1265, + Iir_Kind_Absolute_Operator => 1269, + Iir_Kind_Not_Operator => 1273, + Iir_Kind_Implicit_Condition_Operator => 1277, + Iir_Kind_Condition_Operator => 1281, + Iir_Kind_Reduction_And_Operator => 1285, + Iir_Kind_Reduction_Or_Operator => 1289, + Iir_Kind_Reduction_Nand_Operator => 1293, + Iir_Kind_Reduction_Nor_Operator => 1297, + Iir_Kind_Reduction_Xor_Operator => 1301, + Iir_Kind_Reduction_Xnor_Operator => 1305, + Iir_Kind_And_Operator => 1310, + Iir_Kind_Or_Operator => 1315, + Iir_Kind_Nand_Operator => 1320, + Iir_Kind_Nor_Operator => 1325, + Iir_Kind_Xor_Operator => 1330, + Iir_Kind_Xnor_Operator => 1335, + Iir_Kind_Equality_Operator => 1340, + Iir_Kind_Inequality_Operator => 1345, + Iir_Kind_Less_Than_Operator => 1350, + Iir_Kind_Less_Than_Or_Equal_Operator => 1355, + Iir_Kind_Greater_Than_Operator => 1360, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1365, + Iir_Kind_Match_Equality_Operator => 1370, + Iir_Kind_Match_Inequality_Operator => 1375, + Iir_Kind_Match_Less_Than_Operator => 1380, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1385, + Iir_Kind_Match_Greater_Than_Operator => 1390, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1395, + Iir_Kind_Sll_Operator => 1400, + Iir_Kind_Sla_Operator => 1405, + Iir_Kind_Srl_Operator => 1410, + Iir_Kind_Sra_Operator => 1415, + Iir_Kind_Rol_Operator => 1420, + Iir_Kind_Ror_Operator => 1425, + Iir_Kind_Addition_Operator => 1430, + Iir_Kind_Substraction_Operator => 1435, + Iir_Kind_Concatenation_Operator => 1440, + Iir_Kind_Multiplication_Operator => 1445, + Iir_Kind_Division_Operator => 1450, + Iir_Kind_Modulus_Operator => 1455, + Iir_Kind_Remainder_Operator => 1460, + Iir_Kind_Exponentiation_Operator => 1465, + Iir_Kind_Function_Call => 1473, + Iir_Kind_Aggregate => 1481, + Iir_Kind_Parenthesis_Expression => 1484, + Iir_Kind_Qualified_Expression => 1488, + Iir_Kind_Type_Conversion => 1493, + Iir_Kind_Allocator_By_Expression => 1498, + Iir_Kind_Allocator_By_Subtype => 1504, + Iir_Kind_Selected_Element => 1512, + Iir_Kind_Dereference => 1517, + Iir_Kind_Implicit_Dereference => 1522, + Iir_Kind_Slice_Name => 1529, + Iir_Kind_Indexed_Name => 1535, + Iir_Kind_Psl_Prev => 1541, + Iir_Kind_Psl_Stable => 1546, + Iir_Kind_Psl_Rose => 1551, + Iir_Kind_Psl_Fell => 1556, + Iir_Kind_Psl_Onehot => 1559, + Iir_Kind_Psl_Onehot0 => 1562, + Iir_Kind_Psl_Expression => 1564, + Iir_Kind_Sensitized_Process_Statement => 1586, + Iir_Kind_Process_Statement => 1607, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1620, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1633, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1647, + Iir_Kind_Concurrent_Assertion_Statement => 1655, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1662, + Iir_Kind_Concurrent_Break_Statement => 1670, + Iir_Kind_Psl_Assert_Directive => 1684, + Iir_Kind_Psl_Assume_Directive => 1696, + Iir_Kind_Psl_Cover_Directive => 1708, + Iir_Kind_Psl_Restrict_Directive => 1719, + Iir_Kind_Block_Statement => 1733, + Iir_Kind_If_Generate_Statement => 1744, + Iir_Kind_Case_Generate_Statement => 1753, + Iir_Kind_For_Generate_Statement => 1762, + Iir_Kind_Component_Instantiation_Statement => 1773, + Iir_Kind_Psl_Default_Clock => 1776, + Iir_Kind_Generate_Statement_Body => 1787, + Iir_Kind_If_Generate_Else_Clause => 1793, + Iir_Kind_Simple_Simultaneous_Statement => 1800, + Iir_Kind_Simultaneous_Null_Statement => 1804, + Iir_Kind_Simultaneous_Procedural_Statement => 1815, + Iir_Kind_Simultaneous_Case_Statement => 1824, + Iir_Kind_Simultaneous_If_Statement => 1833, + Iir_Kind_Simultaneous_Elsif => 1839, + Iir_Kind_Simple_Signal_Assignment_Statement => 1850, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1861, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1873, + Iir_Kind_Signal_Force_Assignment_Statement => 1883, + Iir_Kind_Signal_Release_Assignment_Statement => 1892, + Iir_Kind_Null_Statement => 1896, + Iir_Kind_Assertion_Statement => 1903, + Iir_Kind_Report_Statement => 1909, + Iir_Kind_Wait_Statement => 1917, + Iir_Kind_Variable_Assignment_Statement => 1924, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1931, + Iir_Kind_Return_Statement => 1937, + Iir_Kind_For_Loop_Statement => 1948, + Iir_Kind_While_Loop_Statement => 1959, + Iir_Kind_Next_Statement => 1966, + Iir_Kind_Exit_Statement => 1973, + Iir_Kind_Case_Statement => 1982, + Iir_Kind_Procedure_Call_Statement => 1988, + Iir_Kind_Break_Statement => 1995, + Iir_Kind_If_Statement => 2005, + Iir_Kind_Suspend_State_Statement => 2009, + Iir_Kind_Elsif => 2015, + Iir_Kind_Character_Literal => 2022, + Iir_Kind_Simple_Name => 2029, + Iir_Kind_Selected_Name => 2037, + Iir_Kind_Operator_Symbol => 2042, + Iir_Kind_Reference_Name => 2047, + Iir_Kind_External_Constant_Name => 2056, + Iir_Kind_External_Signal_Name => 2066, + Iir_Kind_External_Variable_Name => 2076, + Iir_Kind_Selected_By_All_Name => 2082, + Iir_Kind_Parenthesis_Name => 2087, + Iir_Kind_Package_Pathname => 2091, + Iir_Kind_Absolute_Pathname => 2092, + Iir_Kind_Relative_Pathname => 2093, + Iir_Kind_Pathname_Element => 2098, + Iir_Kind_Base_Attribute => 2100, + Iir_Kind_Subtype_Attribute => 2105, + Iir_Kind_Element_Attribute => 2110, + Iir_Kind_Across_Attribute => 2115, + Iir_Kind_Through_Attribute => 2120, + Iir_Kind_Nature_Reference_Attribute => 2124, + Iir_Kind_Left_Type_Attribute => 2129, + Iir_Kind_Right_Type_Attribute => 2134, + Iir_Kind_High_Type_Attribute => 2139, + Iir_Kind_Low_Type_Attribute => 2144, + Iir_Kind_Ascending_Type_Attribute => 2149, + Iir_Kind_Image_Attribute => 2155, + Iir_Kind_Value_Attribute => 2161, + Iir_Kind_Pos_Attribute => 2167, + Iir_Kind_Val_Attribute => 2173, + Iir_Kind_Succ_Attribute => 2179, + Iir_Kind_Pred_Attribute => 2185, + Iir_Kind_Leftof_Attribute => 2191, + Iir_Kind_Rightof_Attribute => 2197, + Iir_Kind_Signal_Slew_Attribute => 2205, + Iir_Kind_Quantity_Slew_Attribute => 2213, + Iir_Kind_Ramp_Attribute => 2221, + Iir_Kind_Zoh_Attribute => 2229, + Iir_Kind_Ltf_Attribute => 2237, + Iir_Kind_Ztf_Attribute => 2247, + Iir_Kind_Dot_Attribute => 2254, + Iir_Kind_Integ_Attribute => 2261, + Iir_Kind_Quantity_Delayed_Attribute => 2269, + Iir_Kind_Above_Attribute => 2277, + Iir_Kind_Delayed_Attribute => 2286, + Iir_Kind_Stable_Attribute => 2295, + Iir_Kind_Quiet_Attribute => 2304, + Iir_Kind_Transaction_Attribute => 2313, + Iir_Kind_Event_Attribute => 2317, + Iir_Kind_Active_Attribute => 2321, + Iir_Kind_Last_Event_Attribute => 2325, + Iir_Kind_Last_Active_Attribute => 2329, + Iir_Kind_Last_Value_Attribute => 2333, + Iir_Kind_Driving_Attribute => 2337, + Iir_Kind_Driving_Value_Attribute => 2341, + Iir_Kind_Behavior_Attribute => 2341, + Iir_Kind_Structure_Attribute => 2341, + Iir_Kind_Simple_Name_Attribute => 2348, + Iir_Kind_Instance_Name_Attribute => 2353, + Iir_Kind_Path_Name_Attribute => 2358, + Iir_Kind_Left_Array_Attribute => 2365, + Iir_Kind_Right_Array_Attribute => 2372, + Iir_Kind_High_Array_Attribute => 2379, + Iir_Kind_Low_Array_Attribute => 2386, + Iir_Kind_Length_Array_Attribute => 2393, + Iir_Kind_Ascending_Array_Attribute => 2400, + Iir_Kind_Range_Array_Attribute => 2407, + Iir_Kind_Reverse_Range_Array_Attribute => 2414, + Iir_Kind_Attribute_Name => 2423 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -6286,6 +6293,8 @@ package body Vhdl.Nodes_Meta is return Get_Interface_Declaration_Chain (N); when Field_Default_Subprogram => return Get_Default_Subprogram (N); + when Field_Associated_Subprogram => + return Get_Associated_Subprogram (N); when Field_Subprogram_Specification => return Get_Subprogram_Specification (N); when Field_Sequential_Statement_Chain => @@ -6752,6 +6761,8 @@ package body Vhdl.Nodes_Meta is Set_Interface_Declaration_Chain (N, V); when Field_Default_Subprogram => Set_Default_Subprogram (N, V); + when Field_Associated_Subprogram => + Set_Associated_Subprogram (N, V); when Field_Subprogram_Specification => Set_Subprogram_Specification (N, V); when Field_Sequential_Statement_Chain => @@ -9209,6 +9220,17 @@ package body Vhdl.Nodes_Meta is end case; end Has_Default_Subprogram; + function Has_Associated_Subprogram (K : Iir_Kind) return Boolean is + begin + case K is + when Iir_Kind_Interface_Function_Declaration + | Iir_Kind_Interface_Procedure_Declaration => + return True; + when others => + return False; + end case; + end Has_Associated_Subprogram; + function Has_Subprogram_Specification (K : Iir_Kind) return Boolean is begin case K is diff --git a/src/vhdl/vhdl-nodes_meta.ads b/src/vhdl/vhdl-nodes_meta.ads index 9d18dcb2d..3092597a7 100644 --- a/src/vhdl/vhdl-nodes_meta.ads +++ b/src/vhdl/vhdl-nodes_meta.ads @@ -172,6 +172,7 @@ package Vhdl.Nodes_Meta is Field_Base_Name, Field_Interface_Declaration_Chain, Field_Default_Subprogram, + Field_Associated_Subprogram, Field_Subprogram_Specification, Field_Sequential_Statement_Chain, Field_Simultaneous_Statement_Chain, @@ -767,6 +768,7 @@ package Vhdl.Nodes_Meta is function Has_Base_Name (K : Iir_Kind) return Boolean; function Has_Interface_Declaration_Chain (K : Iir_Kind) return Boolean; function Has_Default_Subprogram (K : Iir_Kind) return Boolean; + function Has_Associated_Subprogram (K : Iir_Kind) return Boolean; function Has_Subprogram_Specification (K : Iir_Kind) return Boolean; function Has_Sequential_Statement_Chain (K : Iir_Kind) return Boolean; function Has_Simultaneous_Statement_Chain (K : Iir_Kind) return Boolean; |