diff options
author | Tristan Gingold | 2014-12-14 19:08:45 +0100 |
---|---|---|
committer | Tristan Gingold | 2014-12-14 19:08:45 +0100 |
commit | 7e756359d5dc492633c0a6a3cf78b10bdb884a53 (patch) | |
tree | 1d4ec23686381b5de83a9f2df2461079cf501dde | |
parent | 51f657fde8d771ca5c4002ca70ad5175c6ef3cdf (diff) | |
download | ghdl-7e756359d5dc492633c0a6a3cf78b10bdb884a53.tar.gz ghdl-7e756359d5dc492633c0a6a3cf78b10bdb884a53.tar.bz2 ghdl-7e756359d5dc492633c0a6a3cf78b10bdb884a53.zip |
iirs: reduce size of interface objects.
-rw-r--r-- | src/vhdl/disp_tree.adb | 20 | ||||
-rw-r--r-- | src/vhdl/disp_vhdl.adb | 7 | ||||
-rw-r--r-- | src/vhdl/iirs.adb | 44 | ||||
-rw-r--r-- | src/vhdl/iirs.ads | 51 | ||||
-rw-r--r-- | src/vhdl/nodes.adb | 20 | ||||
-rw-r--r-- | src/vhdl/nodes.ads | 14 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.adb | 377 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.ads | 10 | ||||
-rw-r--r-- | src/vhdl/parse.adb | 19 | ||||
-rw-r--r-- | src/vhdl/sem.adb | 5 | ||||
-rw-r--r-- | src/vhdl/sem_decls.adb | 15 | ||||
-rw-r--r-- | src/vhdl/sem_inst.adb | 7 | ||||
-rw-r--r-- | src/vhdl/std_package.adb | 3 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap2.adb | 1 |
14 files changed, 287 insertions, 306 deletions
diff --git a/src/vhdl/disp_tree.adb b/src/vhdl/disp_tree.adb index 1fd3bd5..ad3c199 100644 --- a/src/vhdl/disp_tree.adb +++ b/src/vhdl/disp_tree.adb @@ -188,23 +188,6 @@ package body Disp_Tree is end case; end Image_Iir_Delay_Mechanism; - function Image_Iir_Lexical_Layout_Type (V : Iir_Lexical_Layout_Type) - return String is - begin - if (V and Iir_Lexical_Has_Mode) /= 0 then - return " +mode" - & Image_Iir_Lexical_Layout_Type (V and not Iir_Lexical_Has_Mode); - elsif (V and Iir_Lexical_Has_Class) /= 0 then - return " +class" - & Image_Iir_Lexical_Layout_Type (V and not Iir_Lexical_Has_Class); - elsif (V and Iir_Lexical_Has_Type) /= 0 then - return " +type" - & Image_Iir_Lexical_Layout_Type (V and not Iir_Lexical_Has_Type); - else - return ""; - end if; - end Image_Iir_Lexical_Layout_Type; - function Image_Iir_Mode (Mode : Iir_Mode) return String is begin case Mode is @@ -466,9 +449,6 @@ package body Disp_Tree is when Type_Iir_Delay_Mechanism => Put_Line (Image_Iir_Delay_Mechanism (Get_Iir_Delay_Mechanism (N, F))); - when Type_Iir_Lexical_Layout_Type => - Put_Line (Image_Iir_Lexical_Layout_Type - (Get_Iir_Lexical_Layout_Type (N, F))); when Type_Iir_Predefined_Functions => Put_Line (Image_Iir_Predefined_Functions (Get_Iir_Predefined_Functions (N, F))); diff --git a/src/vhdl/disp_vhdl.adb b/src/vhdl/disp_vhdl.adb index f672618..e2f776a 100644 --- a/src/vhdl/disp_vhdl.adb +++ b/src/vhdl/disp_vhdl.adb @@ -1023,7 +1023,7 @@ package body Disp_Vhdl is procedure Disp_Interface_Class (Inter: Iir) is begin - if (Get_Lexical_Layout (Inter) and Iir_Lexical_Has_Class) /= 0 then + if Get_Has_Class (Inter) then case Get_Kind (Inter) is when Iir_Kind_Interface_Signal_Declaration => Put ("signal "); @@ -1045,7 +1045,7 @@ package body Disp_Vhdl is Ind : constant Iir := Get_Subtype_Indication (Inter); begin Put (": "); - if (Get_Lexical_Layout (Inter) and Iir_Lexical_Has_Mode) /= 0 then + if Get_Has_Mode (Inter) then Disp_Mode (Get_Mode (Inter)); end if; if Ind = Null_Iir then @@ -1086,8 +1086,7 @@ package body Disp_Vhdl is when Iir_Kinds_Interface_Object_Declaration => Disp_Interface_Class (Inter); Disp_Name_Of (Inter); - while (Get_Lexical_Layout (Inter) and Iir_Lexical_Has_Type) = 0 - loop + while Get_Has_Identifier_List (Inter) loop Put (", "); Inter := Next_Inter; Next_Inter := Get_Chain (Inter); diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb index 43d7658..9f807b4 100644 --- a/src/vhdl/iirs.adb +++ b/src/vhdl/iirs.adb @@ -306,6 +306,10 @@ package body Iirs is | Iir_Kind_Object_Alias_Declaration | Iir_Kind_Signal_Declaration | Iir_Kind_Variable_Declaration + | Iir_Kind_Interface_Constant_Declaration + | Iir_Kind_Interface_Variable_Declaration + | Iir_Kind_Interface_Signal_Declaration + | Iir_Kind_Interface_File_Declaration | Iir_Kind_Identity_Operator | Iir_Kind_Negation_Operator | Iir_Kind_Absolute_Operator @@ -460,10 +464,6 @@ package body Iirs is | Iir_Kind_Guard_Signal_Declaration | Iir_Kind_Constant_Declaration | Iir_Kind_Iterator_Declaration - | Iir_Kind_Interface_Constant_Declaration - | Iir_Kind_Interface_Variable_Declaration - | Iir_Kind_Interface_Signal_Declaration - | Iir_Kind_Interface_File_Declaration | Iir_Kind_Interface_Package_Declaration | Iir_Kind_Sensitized_Process_Statement | Iir_Kind_Process_Statement @@ -1201,14 +1201,14 @@ package body Iirs is begin pragma Assert (Target /= Null_Iir); pragma Assert (Has_Open_Flag (Get_Kind (Target))); - return Get_Flag3 (Target); + return Get_Flag12 (Target); end Get_Open_Flag; procedure Set_Open_Flag (Target : Iir; Flag : Boolean) is begin pragma Assert (Target /= Null_Iir); pragma Assert (Has_Open_Flag (Get_Kind (Target))); - Set_Flag3 (Target, Flag); + Set_Flag12 (Target, Flag); end Set_Open_Flag; function Get_After_Drivers_Flag (Target : Iir) return Boolean is @@ -4060,20 +4060,6 @@ package body Iirs is Set_Field8 (Target, Mark); end Set_Return_Type_Mark; - function Get_Lexical_Layout (Decl : Iir) return Iir_Lexical_Layout_Type is - begin - pragma Assert (Decl /= Null_Iir); - pragma Assert (Has_Lexical_Layout (Get_Kind (Decl))); - return Iir_Lexical_Layout_Type'Val (Get_Odigit2 (Decl)); - end Get_Lexical_Layout; - - procedure Set_Lexical_Layout (Decl : Iir; Lay : Iir_Lexical_Layout_Type) is - begin - pragma Assert (Decl /= Null_Iir); - pragma Assert (Has_Lexical_Layout (Get_Kind (Decl))); - Set_Odigit2 (Decl, Iir_Lexical_Layout_Type'Pos (Lay)); - end Set_Lexical_Layout; - function Get_Incomplete_Type_List (Target : Iir) return Iir_List is begin pragma Assert (Target /= Null_Iir); @@ -4428,16 +4414,30 @@ package body Iirs is begin pragma Assert (Decl /= Null_Iir); pragma Assert (Has_Has_Mode (Get_Kind (Decl))); - return Get_Flag8 (Decl); + return Get_Flag10 (Decl); end Get_Has_Mode; procedure Set_Has_Mode (Decl : Iir; Flag : Boolean) is begin pragma Assert (Decl /= Null_Iir); pragma Assert (Has_Has_Mode (Get_Kind (Decl))); - Set_Flag8 (Decl, Flag); + Set_Flag10 (Decl, Flag); end Set_Has_Mode; + function Get_Has_Class (Decl : Iir) return Boolean is + begin + pragma Assert (Decl /= Null_Iir); + pragma Assert (Has_Has_Class (Get_Kind (Decl))); + return Get_Flag11 (Decl); + end Get_Has_Class; + + procedure Set_Has_Class (Decl : Iir; Flag : Boolean) is + begin + pragma Assert (Decl /= Null_Iir); + pragma Assert (Has_Has_Class (Get_Kind (Decl))); + Set_Flag11 (Decl, Flag); + end Set_Has_Class; + function Get_Is_Ref (N : Iir) return Boolean is begin pragma Assert (N /= Null_Iir); diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads index 00daef2..c2a76d2 100644 --- a/src/vhdl/iirs.ads +++ b/src/vhdl/iirs.ads @@ -1069,10 +1069,10 @@ package Iirs is -- -- Get/Set_Use_Flag (Flag6) - -- Iir_Kind_Interface_Signal_Declaration (Medium) - -- Iir_Kind_Interface_Constant_Declaration (Medium) - -- Iir_Kind_Interface_Variable_Declaration (Medium) - -- Iir_Kind_Interface_File_Declaration (Medium) + -- Iir_Kind_Interface_Signal_Declaration (Short) + -- Iir_Kind_Interface_Constant_Declaration (Short) + -- Iir_Kind_Interface_Variable_Declaration (Short) + -- Iir_Kind_Interface_File_Declaration (Short) -- -- Get/Set the parent of an interface declaration. -- The parent is an entity declaration, a subprogram specification, a @@ -1095,16 +1095,13 @@ package Iirs is -- -- Get/Set_Mode (Odigit1) -- - -- Get/Set_Lexical_Layout (Odigit2) - -- -- Only for Iir_Kind_Interface_Signal_Declaration: -- Get/Set_Has_Disconnect_Flag (Flag1) -- -- Only for Iir_Kind_Interface_Signal_Declaration: -- Get/Set_Has_Active_Flag (Flag2) -- - -- Only for Iir_Kind_Interface_Signal_Declaration: - -- Get/Set_Open_Flag (Flag3) + -- Get/Set_Has_Identifier_List (Flag3) -- -- Get/Set_Visible_Flag (Flag4) -- @@ -1114,11 +1111,19 @@ package Iirs is -- -- Get/Set_Is_Ref (Flag7) -- + -- Only for Iir_Kind_Interface_Signal_Declaration: -- Get/Set_Guarded_Signal_Flag (Flag8) -- -- Only for Iir_Kind_Interface_Signal_Declaration: -- Get/Set_Signal_Kind (Flag9) -- + -- Get/Set_Has_Mode (Flag10) + -- + -- Get/Set_Has_Class (Flag11) + -- + -- Only for Iir_Kind_Interface_Signal_Declaration: + -- Get/Set_Open_Flag (Flag12) + -- -- Get/Set_Expr_Staticness (State1) -- -- Get/Set_Name_Staticness (State2) @@ -1518,11 +1523,11 @@ package Iirs is -- -- Get/Set_Is_Ref (Flag7) -- + -- Get/Set_Has_Mode (Flag10) + -- -- Get/Set_Expr_Staticness (State1) -- -- Get/Set_Name_Staticness (State2) - -- - -- Get/Set_Has_Mode (Flag8) -- Iir_Kind_Element_Declaration (Short) -- @@ -3678,14 +3683,11 @@ package Iirs is type Iir_Direction is (Iir_To, Iir_Downto); - -- Iir_Lexical_Layout_type describe the lexical token used to describe - -- an interface declaration. This has no semantics meaning, but it is - -- necessary to keep how lexically an interface was declared due to -- LRM93 2.7 (conformance rules). -- To keep this simple, the layout is stored as a bit-string. -- Fields are: - -- Has_type: set if the interface is the last of a list. - -- has_mode: set if mode is explicit + -- Get_Has_type: set if the interface is the last of a list. + -- Get_Has_Mode: set if mode is explicit -- has_class: set if class (constant, signal, variable or file) is explicit -- -- Exemple: @@ -3707,10 +3709,6 @@ package Iirs is -- I: has_class, has_type -- J: has_class, has_mode -- K: has_class, has_mode, has_type - type Iir_Lexical_Layout_Type is mod 2 ** 3; - Iir_Lexical_Has_Mode : constant Iir_Lexical_Layout_Type := 2 ** 0; - Iir_Lexical_Has_Class : constant Iir_Lexical_Layout_Type := 2 ** 1; - Iir_Lexical_Has_Type : constant Iir_Lexical_Layout_Type := 2 ** 2; -- List of predefined operators and functions. type Iir_Predefined_Functions is @@ -5174,7 +5172,7 @@ package Iirs is -- This flag is set for a very short time during the check that no in -- port is unconnected. - -- Field: Flag3 + -- Field: Flag12 function Get_Open_Flag (Target : Iir) return Boolean; procedure Set_Open_Flag (Target : Iir; Flag : Boolean); @@ -6215,11 +6213,6 @@ package Iirs is function Get_Return_Type_Mark (Target : Iir) return Iir; procedure Set_Return_Type_Mark (Target : Iir; Mark : Iir); - -- Get/set the lexical layout of an interface. - -- Field: Odigit2 (pos) - function Get_Lexical_Layout (Decl : Iir) return Iir_Lexical_Layout_Type; - procedure Set_Lexical_Layout (Decl : Iir; Lay : Iir_Lexical_Layout_Type); - -- List of use (designated type of access types) of an incomplete type -- definition. The purpose is to complete the uses with the full type -- definition. @@ -6351,10 +6344,16 @@ package Iirs is procedure Set_Has_Identifier_List (Decl : Iir; Flag : Boolean); -- Layout flag for object declaration. If True, the mode is present. - -- Field: Flag8 + -- Field: Flag10 function Get_Has_Mode (Decl : Iir) return Boolean; procedure Set_Has_Mode (Decl : Iir; Flag : Boolean); + -- Layout flag for object declaration. If True, the object class is + -- present. + -- Field: Flag11 + function Get_Has_Class (Decl : Iir) return Boolean; + procedure Set_Has_Class (Decl : Iir; Flag : Boolean); + -- Set to True if Maybe_Ref fields are references. This cannot be shared -- with Has_Identifier_List as: Is_Ref is set to True on all items but -- the first, while Has_Identifier_List is set to True on all items but diff --git a/src/vhdl/nodes.adb b/src/vhdl/nodes.adb index 2dc7736..2b0997c 100644 --- a/src/vhdl/nodes.adb +++ b/src/vhdl/nodes.adb @@ -375,6 +375,26 @@ package body Nodes is Nodet.Table (N).Flag10 := V; end Set_Flag10; + function Get_Flag11 (N : Node_Type) return Boolean is + begin + return Nodet.Table (N).Flag11; + end Get_Flag11; + + procedure Set_Flag11 (N : Node_Type; V : Boolean) is + begin + Nodet.Table (N).Flag11 := V; + end Set_Flag11; + + function Get_Flag12 (N : Node_Type) return Boolean is + begin + return Nodet.Table (N).Flag12; + end Get_Flag12; + + procedure Set_Flag12 (N : Node_Type; V : Boolean) is + begin + Nodet.Table (N).Flag12 := V; + end Set_Flag12; + function Get_State1 (N : Node_Type) return Bit2_Type is begin diff --git a/src/vhdl/nodes.ads b/src/vhdl/nodes.ads index 6b80703..3c72b18 100644 --- a/src/vhdl/nodes.ads +++ b/src/vhdl/nodes.ads @@ -58,9 +58,12 @@ package Nodes is -- Flag8 : Boolean -- Flag9 : Boolean -- Flag10 : Boolean + -- Flag11 : Boolean + -- Flag12 : Boolean -- Nkind : Kind_Type -- State1 : Bit2_Type -- State2 : Bit2_Type + -- Odigit1 : Bit3_Type -- Location : Location_Type -- Field0 : Iir -- Field1 : Iir @@ -78,7 +81,6 @@ package Nodes is -- Field5 : Iir -- Fields of Format_Medium: - -- Odigit1 : Bit3_Type -- Odigit2 : Bit3_Type (odigit1) -- State3 : Bit2_Type -- State4 : Bit2_Type @@ -223,6 +225,16 @@ package Nodes is procedure Set_Flag10 (N : Node_Type; V : Boolean); pragma Inline (Set_Flag10); + function Get_Flag11 (N : Node_Type) return Boolean; + pragma Inline (Get_Flag11); + procedure Set_Flag11 (N : Node_Type; V : Boolean); + pragma Inline (Set_Flag11); + + function Get_Flag12 (N : Node_Type) return Boolean; + pragma Inline (Get_Flag12); + procedure Set_Flag12 (N : Node_Type; V : Boolean); + pragma Inline (Set_Flag12); + function Get_State1 (N : Node_Type) return Bit2_Type; pragma Inline (Get_State1); diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb index f43c077..3d5fbef 100644 --- a/src/vhdl/nodes_meta.adb +++ b/src/vhdl/nodes_meta.adb @@ -272,7 +272,6 @@ package body Nodes_Meta is Field_Type_Mark => Type_Iir, Field_File_Type_Mark => Type_Iir, Field_Return_Type_Mark => Type_Iir, - Field_Lexical_Layout => Type_Iir_Lexical_Layout_Type, Field_Incomplete_Type_List => Type_Iir_List, Field_Has_Disconnect_Flag => Type_Boolean, Field_Has_Active_Flag => Type_Boolean, @@ -299,6 +298,7 @@ package body Nodes_Meta is Field_Has_Body => Type_Boolean, Field_Has_Identifier_List => Type_Boolean, Field_Has_Mode => Type_Boolean, + Field_Has_Class => Type_Boolean, Field_Is_Ref => Type_Boolean, Field_Psl_Property => Type_PSL_Node, Field_Psl_Declaration => Type_PSL_Node, @@ -822,8 +822,6 @@ package body Nodes_Meta is return "file_type_mark"; when Field_Return_Type_Mark => return "return_type_mark"; - when Field_Lexical_Layout => - return "lexical_layout"; when Field_Incomplete_Type_List => return "incomplete_type_list"; when Field_Has_Disconnect_Flag => @@ -876,6 +874,8 @@ package body Nodes_Meta is return "has_identifier_list"; when Field_Has_Mode => return "has_mode"; + when Field_Has_Class => + return "has_class"; when Field_Is_Ref => return "is_ref"; when Field_Psl_Property => @@ -1888,8 +1888,6 @@ package body Nodes_Meta is return Attr_None; when Field_Return_Type_Mark => return Attr_None; - when Field_Lexical_Layout => - return Attr_None; when Field_Incomplete_Type_List => return Attr_None; when Field_Has_Disconnect_Flag => @@ -1942,6 +1940,8 @@ package body Nodes_Meta is return Attr_None; when Field_Has_Mode => return Attr_None; + when Field_Has_Class => + return Attr_None; when Field_Is_Ref => return Attr_None; when Field_Psl_Property => @@ -2780,11 +2780,11 @@ package body Nodes_Meta is Field_Type, -- Iir_Kind_File_Declaration Field_Identifier, + Field_Has_Mode, Field_Has_Identifier_List, Field_Visible_Flag, Field_Use_Flag, Field_Is_Ref, - Field_Has_Mode, Field_Mode, Field_Expr_Staticness, Field_Name_Staticness, @@ -2870,13 +2870,14 @@ package body Nodes_Meta is Field_Type, -- Iir_Kind_Interface_Constant_Declaration Field_Identifier, + Field_Has_Mode, + Field_Has_Class, + Field_Has_Identifier_List, Field_Visible_Flag, Field_After_Drivers_Flag, Field_Use_Flag, Field_Is_Ref, - Field_Guarded_Signal_Flag, Field_Mode, - Field_Lexical_Layout, Field_Expr_Staticness, Field_Name_Staticness, Field_Chain, @@ -2886,13 +2887,14 @@ package body Nodes_Meta is Field_Type, -- Iir_Kind_Interface_Variable_Declaration Field_Identifier, + Field_Has_Mode, + Field_Has_Class, + Field_Has_Identifier_List, Field_Visible_Flag, Field_After_Drivers_Flag, Field_Use_Flag, Field_Is_Ref, - Field_Guarded_Signal_Flag, Field_Mode, - Field_Lexical_Layout, Field_Expr_Staticness, Field_Name_Staticness, Field_Chain, @@ -2903,8 +2905,11 @@ package body Nodes_Meta is -- Iir_Kind_Interface_Signal_Declaration Field_Identifier, Field_Has_Disconnect_Flag, - Field_Has_Active_Flag, + Field_Has_Mode, + Field_Has_Class, Field_Open_Flag, + Field_Has_Active_Flag, + Field_Has_Identifier_List, Field_Visible_Flag, Field_After_Drivers_Flag, Field_Use_Flag, @@ -2912,7 +2917,6 @@ package body Nodes_Meta is Field_Guarded_Signal_Flag, Field_Signal_Kind, Field_Mode, - Field_Lexical_Layout, Field_Expr_Staticness, Field_Name_Staticness, Field_Chain, @@ -2922,13 +2926,14 @@ package body Nodes_Meta is Field_Type, -- Iir_Kind_Interface_File_Declaration Field_Identifier, + Field_Has_Mode, + Field_Has_Class, + Field_Has_Identifier_List, Field_Visible_Flag, Field_After_Drivers_Flag, Field_Use_Flag, Field_Is_Ref, - Field_Guarded_Signal_Flag, Field_Mode, - Field_Lexical_Layout, Field_Expr_Staticness, Field_Name_Staticness, Field_Chain, @@ -3941,140 +3946,140 @@ package body Nodes_Meta is Iir_Kind_Variable_Declaration => 774, Iir_Kind_Constant_Declaration => 788, Iir_Kind_Iterator_Declaration => 800, - Iir_Kind_Interface_Constant_Declaration => 815, - Iir_Kind_Interface_Variable_Declaration => 830, - Iir_Kind_Interface_Signal_Declaration => 849, - Iir_Kind_Interface_File_Declaration => 864, - Iir_Kind_Interface_Package_Declaration => 873, - Iir_Kind_Identity_Operator => 877, - Iir_Kind_Negation_Operator => 881, - Iir_Kind_Absolute_Operator => 885, - Iir_Kind_Not_Operator => 889, - Iir_Kind_Condition_Operator => 893, - Iir_Kind_Reduction_And_Operator => 897, - Iir_Kind_Reduction_Or_Operator => 901, - Iir_Kind_Reduction_Nand_Operator => 905, - Iir_Kind_Reduction_Nor_Operator => 909, - Iir_Kind_Reduction_Xor_Operator => 913, - Iir_Kind_Reduction_Xnor_Operator => 917, - Iir_Kind_And_Operator => 922, - Iir_Kind_Or_Operator => 927, - Iir_Kind_Nand_Operator => 932, - Iir_Kind_Nor_Operator => 937, - Iir_Kind_Xor_Operator => 942, - Iir_Kind_Xnor_Operator => 947, - Iir_Kind_Equality_Operator => 952, - Iir_Kind_Inequality_Operator => 957, - Iir_Kind_Less_Than_Operator => 962, - Iir_Kind_Less_Than_Or_Equal_Operator => 967, - Iir_Kind_Greater_Than_Operator => 972, - Iir_Kind_Greater_Than_Or_Equal_Operator => 977, - Iir_Kind_Match_Equality_Operator => 982, - Iir_Kind_Match_Inequality_Operator => 987, - Iir_Kind_Match_Less_Than_Operator => 992, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 997, - Iir_Kind_Match_Greater_Than_Operator => 1002, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1007, - Iir_Kind_Sll_Operator => 1012, - Iir_Kind_Sla_Operator => 1017, - Iir_Kind_Srl_Operator => 1022, - Iir_Kind_Sra_Operator => 1027, - Iir_Kind_Rol_Operator => 1032, - Iir_Kind_Ror_Operator => 1037, - Iir_Kind_Addition_Operator => 1042, - Iir_Kind_Substraction_Operator => 1047, - Iir_Kind_Concatenation_Operator => 1052, - Iir_Kind_Multiplication_Operator => 1057, - Iir_Kind_Division_Operator => 1062, - Iir_Kind_Modulus_Operator => 1067, - Iir_Kind_Remainder_Operator => 1072, - Iir_Kind_Exponentiation_Operator => 1077, - Iir_Kind_Function_Call => 1085, - Iir_Kind_Aggregate => 1091, - Iir_Kind_Parenthesis_Expression => 1094, - Iir_Kind_Qualified_Expression => 1098, - Iir_Kind_Type_Conversion => 1103, - Iir_Kind_Allocator_By_Expression => 1107, - Iir_Kind_Allocator_By_Subtype => 1111, - Iir_Kind_Selected_Element => 1117, - Iir_Kind_Dereference => 1122, - Iir_Kind_Implicit_Dereference => 1127, - Iir_Kind_Slice_Name => 1134, - Iir_Kind_Indexed_Name => 1140, - Iir_Kind_Psl_Expression => 1142, - Iir_Kind_Sensitized_Process_Statement => 1161, - Iir_Kind_Process_Statement => 1179, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1190, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1202, - Iir_Kind_Concurrent_Assertion_Statement => 1210, - Iir_Kind_Psl_Default_Clock => 1214, - Iir_Kind_Psl_Assert_Statement => 1223, - Iir_Kind_Psl_Cover_Statement => 1232, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1238, - Iir_Kind_Block_Statement => 1251, - Iir_Kind_Generate_Statement => 1263, - Iir_Kind_Component_Instantiation_Statement => 1273, - Iir_Kind_Simple_Simultaneous_Statement => 1280, - Iir_Kind_Signal_Assignment_Statement => 1289, - Iir_Kind_Null_Statement => 1293, - Iir_Kind_Assertion_Statement => 1300, - Iir_Kind_Report_Statement => 1306, - Iir_Kind_Wait_Statement => 1313, - Iir_Kind_Variable_Assignment_Statement => 1319, - Iir_Kind_Return_Statement => 1325, - Iir_Kind_For_Loop_Statement => 1333, - Iir_Kind_While_Loop_Statement => 1340, - Iir_Kind_Next_Statement => 1346, - Iir_Kind_Exit_Statement => 1352, - Iir_Kind_Case_Statement => 1359, - Iir_Kind_Procedure_Call_Statement => 1364, - Iir_Kind_If_Statement => 1372, - Iir_Kind_Elsif => 1377, - Iir_Kind_Character_Literal => 1384, - Iir_Kind_Simple_Name => 1391, - Iir_Kind_Selected_Name => 1399, - Iir_Kind_Operator_Symbol => 1404, - Iir_Kind_Selected_By_All_Name => 1409, - Iir_Kind_Parenthesis_Name => 1413, - Iir_Kind_Base_Attribute => 1415, - Iir_Kind_Left_Type_Attribute => 1420, - Iir_Kind_Right_Type_Attribute => 1425, - Iir_Kind_High_Type_Attribute => 1430, - Iir_Kind_Low_Type_Attribute => 1435, - Iir_Kind_Ascending_Type_Attribute => 1440, - Iir_Kind_Image_Attribute => 1446, - Iir_Kind_Value_Attribute => 1452, - Iir_Kind_Pos_Attribute => 1458, - Iir_Kind_Val_Attribute => 1464, - Iir_Kind_Succ_Attribute => 1470, - Iir_Kind_Pred_Attribute => 1476, - Iir_Kind_Leftof_Attribute => 1482, - Iir_Kind_Rightof_Attribute => 1488, - Iir_Kind_Delayed_Attribute => 1496, - Iir_Kind_Stable_Attribute => 1504, - Iir_Kind_Quiet_Attribute => 1512, - Iir_Kind_Transaction_Attribute => 1520, - Iir_Kind_Event_Attribute => 1524, - Iir_Kind_Active_Attribute => 1528, - Iir_Kind_Last_Event_Attribute => 1532, - Iir_Kind_Last_Active_Attribute => 1536, - Iir_Kind_Last_Value_Attribute => 1540, - Iir_Kind_Driving_Attribute => 1544, - Iir_Kind_Driving_Value_Attribute => 1548, - Iir_Kind_Behavior_Attribute => 1548, - Iir_Kind_Structure_Attribute => 1548, - Iir_Kind_Simple_Name_Attribute => 1555, - Iir_Kind_Instance_Name_Attribute => 1560, - Iir_Kind_Path_Name_Attribute => 1565, - Iir_Kind_Left_Array_Attribute => 1572, - Iir_Kind_Right_Array_Attribute => 1579, - Iir_Kind_High_Array_Attribute => 1586, - Iir_Kind_Low_Array_Attribute => 1593, - Iir_Kind_Length_Array_Attribute => 1600, - Iir_Kind_Ascending_Array_Attribute => 1607, - Iir_Kind_Range_Array_Attribute => 1614, - Iir_Kind_Reverse_Range_Array_Attribute => 1621, - Iir_Kind_Attribute_Name => 1629 + Iir_Kind_Interface_Constant_Declaration => 816, + Iir_Kind_Interface_Variable_Declaration => 832, + Iir_Kind_Interface_Signal_Declaration => 853, + Iir_Kind_Interface_File_Declaration => 869, + Iir_Kind_Interface_Package_Declaration => 878, + Iir_Kind_Identity_Operator => 882, + Iir_Kind_Negation_Operator => 886, + Iir_Kind_Absolute_Operator => 890, + Iir_Kind_Not_Operator => 894, + Iir_Kind_Condition_Operator => 898, + Iir_Kind_Reduction_And_Operator => 902, + Iir_Kind_Reduction_Or_Operator => 906, + Iir_Kind_Reduction_Nand_Operator => 910, + Iir_Kind_Reduction_Nor_Operator => 914, + Iir_Kind_Reduction_Xor_Operator => 918, + Iir_Kind_Reduction_Xnor_Operator => 922, + Iir_Kind_And_Operator => 927, + Iir_Kind_Or_Operator => 932, + Iir_Kind_Nand_Operator => 937, + Iir_Kind_Nor_Operator => 942, + Iir_Kind_Xor_Operator => 947, + Iir_Kind_Xnor_Operator => 952, + Iir_Kind_Equality_Operator => 957, + Iir_Kind_Inequality_Operator => 962, + Iir_Kind_Less_Than_Operator => 967, + Iir_Kind_Less_Than_Or_Equal_Operator => 972, + Iir_Kind_Greater_Than_Operator => 977, + Iir_Kind_Greater_Than_Or_Equal_Operator => 982, + Iir_Kind_Match_Equality_Operator => 987, + Iir_Kind_Match_Inequality_Operator => 992, + Iir_Kind_Match_Less_Than_Operator => 997, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1002, + Iir_Kind_Match_Greater_Than_Operator => 1007, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1012, + Iir_Kind_Sll_Operator => 1017, + Iir_Kind_Sla_Operator => 1022, + Iir_Kind_Srl_Operator => 1027, + Iir_Kind_Sra_Operator => 1032, + Iir_Kind_Rol_Operator => 1037, + Iir_Kind_Ror_Operator => 1042, + Iir_Kind_Addition_Operator => 1047, + Iir_Kind_Substraction_Operator => 1052, + Iir_Kind_Concatenation_Operator => 1057, + Iir_Kind_Multiplication_Operator => 1062, + Iir_Kind_Division_Operator => 1067, + Iir_Kind_Modulus_Operator => 1072, + Iir_Kind_Remainder_Operator => 1077, + Iir_Kind_Exponentiation_Operator => 1082, + Iir_Kind_Function_Call => 1090, + Iir_Kind_Aggregate => 1096, + Iir_Kind_Parenthesis_Expression => 1099, + Iir_Kind_Qualified_Expression => 1103, + Iir_Kind_Type_Conversion => 1108, + Iir_Kind_Allocator_By_Expression => 1112, + Iir_Kind_Allocator_By_Subtype => 1116, + Iir_Kind_Selected_Element => 1122, + Iir_Kind_Dereference => 1127, + Iir_Kind_Implicit_Dereference => 1132, + Iir_Kind_Slice_Name => 1139, + Iir_Kind_Indexed_Name => 1145, + Iir_Kind_Psl_Expression => 1147, + Iir_Kind_Sensitized_Process_Statement => 1166, + Iir_Kind_Process_Statement => 1184, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1195, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1207, + Iir_Kind_Concurrent_Assertion_Statement => 1215, + Iir_Kind_Psl_Default_Clock => 1219, + Iir_Kind_Psl_Assert_Statement => 1228, + Iir_Kind_Psl_Cover_Statement => 1237, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1243, + Iir_Kind_Block_Statement => 1256, + Iir_Kind_Generate_Statement => 1268, + Iir_Kind_Component_Instantiation_Statement => 1278, + Iir_Kind_Simple_Simultaneous_Statement => 1285, + Iir_Kind_Signal_Assignment_Statement => 1294, + Iir_Kind_Null_Statement => 1298, + Iir_Kind_Assertion_Statement => 1305, + Iir_Kind_Report_Statement => 1311, + Iir_Kind_Wait_Statement => 1318, + Iir_Kind_Variable_Assignment_Statement => 1324, + Iir_Kind_Return_Statement => 1330, + Iir_Kind_For_Loop_Statement => 1338, + Iir_Kind_While_Loop_Statement => 1345, + Iir_Kind_Next_Statement => 1351, + Iir_Kind_Exit_Statement => 1357, + Iir_Kind_Case_Statement => 1364, + Iir_Kind_Procedure_Call_Statement => 1369, + Iir_Kind_If_Statement => 1377, + Iir_Kind_Elsif => 1382, + Iir_Kind_Character_Literal => 1389, + Iir_Kind_Simple_Name => 1396, + Iir_Kind_Selected_Name => 1404, + Iir_Kind_Operator_Symbol => 1409, + Iir_Kind_Selected_By_All_Name => 1414, + Iir_Kind_Parenthesis_Name => 1418, + Iir_Kind_Base_Attribute => 1420, + Iir_Kind_Left_Type_Attribute => 1425, + Iir_Kind_Right_Type_Attribute => 1430, + Iir_Kind_High_Type_Attribute => 1435, + Iir_Kind_Low_Type_Attribute => 1440, + Iir_Kind_Ascending_Type_Attribute => 1445, + Iir_Kind_Image_Attribute => 1451, + Iir_Kind_Value_Attribute => 1457, + Iir_Kind_Pos_Attribute => 1463, + Iir_Kind_Val_Attribute => 1469, + Iir_Kind_Succ_Attribute => 1475, + Iir_Kind_Pred_Attribute => 1481, + Iir_Kind_Leftof_Attribute => 1487, + Iir_Kind_Rightof_Attribute => 1493, + Iir_Kind_Delayed_Attribute => 1501, + Iir_Kind_Stable_Attribute => 1509, + Iir_Kind_Quiet_Attribute => 1517, + Iir_Kind_Transaction_Attribute => 1525, + Iir_Kind_Event_Attribute => 1529, + Iir_Kind_Active_Attribute => 1533, + Iir_Kind_Last_Event_Attribute => 1537, + Iir_Kind_Last_Active_Attribute => 1541, + Iir_Kind_Last_Value_Attribute => 1545, + Iir_Kind_Driving_Attribute => 1549, + Iir_Kind_Driving_Value_Attribute => 1553, + Iir_Kind_Behavior_Attribute => 1553, + Iir_Kind_Structure_Attribute => 1553, + Iir_Kind_Simple_Name_Attribute => 1560, + Iir_Kind_Instance_Name_Attribute => 1565, + Iir_Kind_Path_Name_Attribute => 1570, + Iir_Kind_Left_Array_Attribute => 1577, + Iir_Kind_Right_Array_Attribute => 1584, + Iir_Kind_High_Array_Attribute => 1591, + Iir_Kind_Low_Array_Attribute => 1598, + Iir_Kind_Length_Array_Attribute => 1605, + Iir_Kind_Ascending_Array_Attribute => 1612, + Iir_Kind_Range_Array_Attribute => 1619, + Iir_Kind_Reverse_Range_Array_Attribute => 1626, + Iir_Kind_Attribute_Name => 1634 ); function Get_Fields (K : Iir_Kind) return Fields_Array @@ -4202,6 +4207,8 @@ package body Nodes_Meta is return Get_Has_Identifier_List (N); when Field_Has_Mode => return Get_Has_Mode (N); + when Field_Has_Class => + return Get_Has_Class (N); when Field_Is_Ref => return Get_Is_Ref (N); when others => @@ -4296,6 +4303,8 @@ package body Nodes_Meta is Set_Has_Identifier_List (N, V); when Field_Has_Mode => Set_Has_Mode (N, V); + when Field_Has_Class => + Set_Has_Class (N, V); when Field_Is_Ref => Set_Is_Ref (N, V); when others => @@ -5287,30 +5296,6 @@ package body Nodes_Meta is end case; end Set_Iir_Int64; - function Get_Iir_Lexical_Layout_Type - (N : Iir; F : Fields_Enum) return Iir_Lexical_Layout_Type is - begin - pragma Assert (Fields_Type (F) = Type_Iir_Lexical_Layout_Type); - case F is - when Field_Lexical_Layout => - return Get_Lexical_Layout (N); - when others => - raise Internal_Error; - end case; - end Get_Iir_Lexical_Layout_Type; - - procedure Set_Iir_Lexical_Layout_Type - (N : Iir; F : Fields_Enum; V: Iir_Lexical_Layout_Type) is - begin - pragma Assert (Fields_Type (F) = Type_Iir_Lexical_Layout_Type); - case F is - when Field_Lexical_Layout => - Set_Lexical_Layout (N, V); - when others => - raise Internal_Error; - end case; - end Set_Iir_Lexical_Layout_Type; - function Get_Iir_List (N : Iir; F : Fields_Enum) return Iir_List is begin @@ -6715,10 +6700,7 @@ package body Nodes_Meta is case K is when Iir_Kind_Guard_Signal_Declaration | Iir_Kind_Signal_Declaration - | Iir_Kind_Interface_Constant_Declaration - | Iir_Kind_Interface_Variable_Declaration - | Iir_Kind_Interface_Signal_Declaration - | Iir_Kind_Interface_File_Declaration => + | Iir_Kind_Interface_Signal_Declaration => return True; when others => return False; @@ -8974,19 +8956,6 @@ package body Nodes_Meta is end case; end Has_Return_Type_Mark; - function Has_Lexical_Layout (K : Iir_Kind) return Boolean is - begin - case K is - when Iir_Kind_Interface_Constant_Declaration - | Iir_Kind_Interface_Variable_Declaration - | Iir_Kind_Interface_Signal_Declaration - | Iir_Kind_Interface_File_Declaration => - return True; - when others => - return False; - end case; - end Has_Lexical_Layout; - function Has_Incomplete_Type_List (K : Iir_Kind) return Boolean is begin return K = Iir_Kind_Incomplete_Type_Definition; @@ -9265,7 +9234,11 @@ package body Nodes_Meta is | Iir_Kind_Signal_Declaration | Iir_Kind_Variable_Declaration | Iir_Kind_Constant_Declaration - | Iir_Kind_Iterator_Declaration => + | Iir_Kind_Iterator_Declaration + | Iir_Kind_Interface_Constant_Declaration + | Iir_Kind_Interface_Variable_Declaration + | Iir_Kind_Interface_Signal_Declaration + | Iir_Kind_Interface_File_Declaration => return True; when others => return False; @@ -9274,9 +9247,31 @@ package body Nodes_Meta is function Has_Has_Mode (K : Iir_Kind) return Boolean is begin - return K = Iir_Kind_File_Declaration; + case K is + when Iir_Kind_File_Declaration + | Iir_Kind_Interface_Constant_Declaration + | Iir_Kind_Interface_Variable_Declaration + | Iir_Kind_Interface_Signal_Declaration + | Iir_Kind_Interface_File_Declaration => + return True; + when others => + return False; + end case; end Has_Has_Mode; + function Has_Has_Class (K : Iir_Kind) return Boolean is + begin + case K is + when Iir_Kind_Interface_Constant_Declaration + | Iir_Kind_Interface_Variable_Declaration + | Iir_Kind_Interface_Signal_Declaration + | Iir_Kind_Interface_File_Declaration => + return True; + when others => + return False; + end case; + end Has_Has_Class; + function Has_Is_Ref (K : Iir_Kind) return Boolean is begin case K is diff --git a/src/vhdl/nodes_meta.ads b/src/vhdl/nodes_meta.ads index 4e312e7..b68f365 100644 --- a/src/vhdl/nodes_meta.ads +++ b/src/vhdl/nodes_meta.ads @@ -37,7 +37,6 @@ package Nodes_Meta is Type_Iir_Index32, Type_Iir_Int32, Type_Iir_Int64, - Type_Iir_Lexical_Layout_Type, Type_Iir_List, Type_Iir_Mode, Type_Iir_Predefined_Functions, @@ -312,7 +311,6 @@ package Nodes_Meta is Field_Type_Mark, Field_File_Type_Mark, Field_Return_Type_Mark, - Field_Lexical_Layout, Field_Incomplete_Type_List, Field_Has_Disconnect_Flag, Field_Has_Active_Flag, @@ -339,6 +337,7 @@ package Nodes_Meta is Field_Has_Body, Field_Has_Identifier_List, Field_Has_Mode, + Field_Has_Class, Field_Is_Ref, Field_Psl_Property, Field_Psl_Declaration, @@ -442,11 +441,6 @@ package Nodes_Meta is procedure Set_Iir_Int64 (N : Iir; F : Fields_Enum; V: Iir_Int64); - function Get_Iir_Lexical_Layout_Type - (N : Iir; F : Fields_Enum) return Iir_Lexical_Layout_Type; - procedure Set_Iir_Lexical_Layout_Type - (N : Iir; F : Fields_Enum; V: Iir_Lexical_Layout_Type); - function Get_Iir_List (N : Iir; F : Fields_Enum) return Iir_List; procedure Set_Iir_List @@ -788,7 +782,6 @@ package Nodes_Meta is function Has_Type_Mark (K : Iir_Kind) return Boolean; function Has_File_Type_Mark (K : Iir_Kind) return Boolean; function Has_Return_Type_Mark (K : Iir_Kind) return Boolean; - function Has_Lexical_Layout (K : Iir_Kind) return Boolean; function Has_Incomplete_Type_List (K : Iir_Kind) return Boolean; function Has_Has_Disconnect_Flag (K : Iir_Kind) return Boolean; function Has_Has_Active_Flag (K : Iir_Kind) return Boolean; @@ -815,6 +808,7 @@ package Nodes_Meta is function Has_Has_Body (K : Iir_Kind) return Boolean; function Has_Has_Identifier_List (K : Iir_Kind) return Boolean; function Has_Has_Mode (K : Iir_Kind) return Boolean; + function Has_Has_Class (K : Iir_Kind) return Boolean; function Has_Is_Ref (K : Iir_Kind) return Boolean; function Has_Psl_Property (K : Iir_Kind) return Boolean; function Has_Psl_Declaration (K : Iir_Kind) return Boolean; diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 1b4b410..239a0e6 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -986,7 +986,8 @@ package body Parse is Is_Guarded : Boolean; Signal_Kind: Iir_Signal_Kind; Default_Value: Iir; - Lexical_Layout : Iir_Lexical_Layout_Type; + Has_Mode : Boolean; + Has_Class : Boolean; begin Res := Null_Iir; Last := Null_Iir; @@ -1044,10 +1045,10 @@ package body Parse is if Current_Token = Tok_Identifier then Is_Default := True; - Lexical_Layout := 0; + Has_Class := False; else Is_Default := False; - Lexical_Layout := Iir_Lexical_Has_Class; + Has_Class := True; -- Skip 'signal', 'variable', 'constant' or 'file'. Scan; @@ -1130,8 +1131,9 @@ package body Parse is | Tok_Inout | Tok_Linkage | Tok_Buffer => - Lexical_Layout := Lexical_Layout or Iir_Lexical_Has_Mode; + Has_Mode := True; when others => + Has_Mode := False; null; end case; @@ -1194,12 +1196,9 @@ package body Parse is while Inter /= Null_Iir loop Set_Mode (Inter, Interface_Mode); Set_Is_Ref (Inter, Inter /= First); - if Inter = Last then - Set_Lexical_Layout (Inter, - Lexical_Layout or Iir_Lexical_Has_Type); - else - Set_Lexical_Layout (Inter, Lexical_Layout); - end if; + Set_Has_Mode (Inter, Has_Mode); + Set_Has_Class (Inter, Has_Class); + Set_Has_Identifier_List (Inter, Inter /= Last); if Get_Kind (Inter) = Iir_Kind_Interface_Signal_Declaration then Set_Guarded_Signal_Flag (Inter, Is_Guarded); Set_Signal_Kind (Inter, Signal_Kind); diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb index e82bd72..1410c17 100644 --- a/src/vhdl/sem.adb +++ b/src/vhdl/sem.adb @@ -1187,7 +1187,10 @@ package body Sem is if Get_Identifier (Left) /= Get_Identifier (Right) then return False; end if; - if Get_Lexical_Layout (Left) /= Get_Lexical_Layout (Right) + if Get_Has_Mode (Left) /= Get_Has_Mode (Right) + or else Get_Has_Class (Left) /= Get_Has_Class (Right) + or else (Get_Has_Identifier_List (Left) + /= Get_Has_Identifier_List (Right)) or else Get_Mode (Left) /= Get_Mode (Right) then return False; diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb index d5036c1..a3a1661 100644 --- a/src/vhdl/sem_decls.adb +++ b/src/vhdl/sem_decls.adb @@ -422,7 +422,6 @@ package body Sem_Decls is Set_Type (Inter, Std_Package.File_Open_Status_Type_Definition); Set_Mode (Inter, Iir_Out_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); end case; -- File F : FT @@ -431,7 +430,6 @@ package body Sem_Decls is Set_Identifier (Inter, Std_Names.Name_F); Set_Type (Inter, Type_Definition); Set_Mode (Inter, Iir_Inout_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); -- External_Name : in STRING Inter := Create_Iir (Iir_Kind_Interface_Constant_Declaration); @@ -439,7 +437,6 @@ package body Sem_Decls is Set_Identifier (Inter, Std_Names.Name_External_Name); Set_Type (Inter, Std_Package.String_Type_Definition); Set_Mode (Inter, Iir_In_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); -- Open_Kind : in File_Open_Kind := Read_Mode. Inter := Create_Iir (Iir_Kind_Interface_Constant_Declaration); @@ -449,7 +446,6 @@ package body Sem_Decls is Set_Mode (Inter, Iir_In_Mode); Set_Default_Value (Inter, Std_Package.File_Open_Kind_Read_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Compute_Subprogram_Hash (Proc); -- Add it to the list. @@ -470,7 +466,6 @@ package body Sem_Decls is Set_Location (Inter, Loc); Set_Type (Inter, Type_Definition); Set_Mode (Inter, Iir_Inout_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Compute_Subprogram_Hash (Proc); -- Add it to the list. @@ -496,7 +491,6 @@ package body Sem_Decls is Set_Location (Inter, Loc); Set_Type (Inter, Type_Definition); Set_Mode (Inter, Iir_In_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Inter := Create_Iir (Iir_Kind_Interface_Variable_Declaration); Set_Identifier (Inter, Std_Names.Name_Value); @@ -504,7 +498,6 @@ package body Sem_Decls is Set_Subtype_Indication (Inter, Type_Mark); Set_Type (Inter, Type_Mark_Type); Set_Mode (Inter, Iir_Out_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); if Get_Kind (Type_Mark_Type) in Iir_Kinds_Array_Type_Definition and then Get_Constraint_State (Type_Mark_Type) /= Fully_Constrained @@ -514,7 +507,6 @@ package body Sem_Decls is Set_Location (Inter, Loc); Set_Type (Inter, Std_Package.Natural_Subtype_Definition); Set_Mode (Inter, Iir_Out_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Set_Implicit_Definition (Proc, Iir_Predefined_Read_Length); else @@ -539,7 +531,6 @@ package body Sem_Decls is Set_Mode (Inter, Iir_Out_Mode); Set_Name_Staticness (Inter, Locally); Set_Expr_Staticness (Inter, None); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Inter := Create_Iir (Iir_Kind_Interface_Constant_Declaration); Set_Identifier (Inter, Std_Names.Name_Value); @@ -547,7 +538,6 @@ package body Sem_Decls is Set_Subtype_Indication (Inter, Type_Mark); Set_Type (Inter, Type_Mark_Type); Set_Mode (Inter, Iir_In_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Set_Implicit_Definition (Proc, Iir_Predefined_Write); Compute_Subprogram_Hash (Proc); @@ -569,7 +559,6 @@ package body Sem_Decls is Set_Type (Inter, Type_Definition); Set_Name_Staticness (Inter, Locally); Set_Expr_Staticness (Inter, None); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Proc, Inter); Set_Implicit_Definition (Proc, Iir_Predefined_Flush); Compute_Subprogram_Hash (Proc); @@ -589,7 +578,6 @@ package body Sem_Decls is Set_Location (Inter, Loc); Set_Type (Inter, Type_Definition); Set_Mode (Inter, Iir_In_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Append (Last_Interface, Func, Inter); Set_Return_Type (Func, Std_Package.Boolean_Type_Definition); Set_Implicit_Definition (Func, Iir_Predefined_Endfile); @@ -606,7 +594,6 @@ package body Sem_Decls is Inter := Create_Iir (Iir_Kind_Interface_Constant_Declaration); Location_Copy (Inter, Atype); Set_Identifier (Inter, Null_Identifier); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Set_Mode (Inter, Iir_In_Mode); Set_Type (Inter, Atype); return Inter; @@ -700,7 +687,6 @@ package body Sem_Decls is Set_Identifier (Inter_Int, Null_Identifier); Set_Mode (Inter_Int, Iir_In_Mode); Set_Type (Inter_Int, Std_Package.Integer_Subtype_Definition); - Set_Lexical_Layout (Inter_Int, Iir_Lexical_Has_Type); Set_Chain (Inter_Chain, Inter_Int); @@ -1036,7 +1022,6 @@ package body Sem_Decls is Set_Identifier (Var_Interface, Std_Names.Name_P); Set_Type (Var_Interface, Type_Definition); Set_Mode (Var_Interface, Iir_Inout_Mode); - Set_Lexical_Layout (Var_Interface, Iir_Lexical_Has_Type); --Set_Purity_State (Deallocate_Proc, Impure); Set_Wait_State (Deallocate_Proc, False); Set_Type_Reference (Deallocate_Proc, Decl); diff --git a/src/vhdl/sem_inst.adb b/src/vhdl/sem_inst.adb index a9ba756..3f5891e 100644 --- a/src/vhdl/sem_inst.adb +++ b/src/vhdl/sem_inst.adb @@ -279,9 +279,6 @@ package body Sem_Inst is Set_Iir_Pure_State (Res, F, Get_Iir_Pure_State (N, F)); when Type_Iir_Delay_Mechanism => Set_Iir_Delay_Mechanism (Res, F, Get_Iir_Delay_Mechanism (N, F)); - when Type_Iir_Lexical_Layout_Type => - Set_Iir_Lexical_Layout_Type - (Res, F, Get_Iir_Lexical_Layout_Type (N, F)); when Type_Iir_Predefined_Functions => Set_Iir_Predefined_Functions (Res, F, Get_Iir_Predefined_Functions (N, F)); @@ -433,7 +430,9 @@ package body Sem_Inst is Set_Type (Res, Get_Type (Inter)); Set_Subtype_Indication (Res, Get_Subtype_Indication (Inter)); Set_Mode (Res, Get_Mode (Inter)); - Set_Lexical_Layout (Res, Get_Lexical_Layout (Inter)); + Set_Has_Mode (Res, Get_Has_Mode (Inter)); + Set_Has_Class (Res, Get_Has_Class (Inter)); + Set_Has_Identifier_List (Res, Get_Has_Identifier_List (Inter)); Set_Expr_Staticness (Res, Get_Expr_Staticness (Inter)); Set_Name_Staticness (Res, Get_Name_Staticness (Inter)); when Iir_Kind_Interface_Package_Declaration => diff --git a/src/vhdl/std_package.adb b/src/vhdl/std_package.adb index 1edfb6c..f9e9738 100644 --- a/src/vhdl/std_package.adb +++ b/src/vhdl/std_package.adb @@ -305,7 +305,6 @@ package body Std_Package is Set_Identifier (Inter, Std_Names.Name_Value); Set_Type (Inter, Inter_Type); Set_Mode (Inter, Iir_In_Mode); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Set_Interface_Declaration_Chain (Decl, Inter); if Inter2_Id /= Null_Identifier then @@ -313,7 +312,6 @@ package body Std_Package is Set_Identifier (Inter2, Inter2_Id); Set_Type (Inter2, Inter2_Type); Set_Mode (Inter2, Iir_In_Mode); - Set_Lexical_Layout (Inter2, Iir_Lexical_Has_Type); Set_Chain (Inter, Inter2); end if; @@ -340,7 +338,6 @@ package body Std_Package is Set_Type (Inter, Inter_Type); Set_Mode (Inter, Iir_In_Mode); Set_Interface_Declaration_Chain (Decl, Inter); - Set_Lexical_Layout (Inter, Iir_Lexical_Has_Type); Sem.Compute_Subprogram_Hash (Decl); Add_Decl (Decl); diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb index 1524a08..dc7807f 100644 --- a/src/vhdl/translate/trans-chap2.adb +++ b/src/vhdl/translate/trans-chap2.adb @@ -1032,7 +1032,6 @@ package body Trans.Chap2 is | Type_Tri_State_Type | Type_Iir_Pure_State | Type_Iir_Delay_Mechanism - | Type_Iir_Lexical_Layout_Type | Type_Iir_Predefined_Functions | Type_Iir_Direction | Type_Location_Type |