diff options
-rw-r--r-- | iirs.adb | 55 | ||||
-rw-r--r-- | iirs.ads | 44 |
2 files changed, 36 insertions, 63 deletions
@@ -381,7 +381,6 @@ package body Iirs is | Iir_Kind_Nature_Declaration | Iir_Kind_Subnature_Declaration | Iir_Kind_Configuration_Declaration - | Iir_Kind_Package_Declaration | Iir_Kind_Package_Body | Iir_Kind_Attribute_Declaration | Iir_Kind_Group_Template_Declaration @@ -515,6 +514,7 @@ package body Iirs is | Iir_Kind_Subtype_Definition | Iir_Kind_Scalar_Nature_Definition | Iir_Kind_Entity_Declaration + | Iir_Kind_Package_Declaration | Iir_Kind_Architecture_Declaration | Iir_Kind_Unit_Declaration | Iir_Kind_Library_Declaration @@ -2240,7 +2240,12 @@ package body Iirs is case Get_Kind (Target) is when Iir_Kind_Block_Header | Iir_Kind_Entity_Declaration - | Iir_Kind_Component_Declaration => + | Iir_Kind_Package_Declaration + | Iir_Kind_Component_Declaration + | Iir_Kind_Function_Declaration + | Iir_Kind_Implicit_Function_Declaration + | Iir_Kind_Implicit_Procedure_Declaration + | Iir_Kind_Procedure_Declaration => null; when others => Failed ("Generic_Chain", Target); @@ -2652,13 +2657,13 @@ package body Iirs is function Get_Subprogram_Body (Target : Iir) return Iir is begin Check_Kind_For_Subprogram_Body (Target); - return Get_Field6 (Target); + return Get_Field9 (Target); end Get_Subprogram_Body; procedure Set_Subprogram_Body (Target : Iir; A_Body : Iir) is begin Check_Kind_For_Subprogram_Body (Target); - Set_Field6 (Target, A_Body); + Set_Field9 (Target, A_Body); end Set_Subprogram_Body; procedure Check_Kind_For_Overload_Number (Target : Iir) is @@ -2677,13 +2682,13 @@ package body Iirs is function Get_Overload_Number (Target : Iir) return Iir_Int32 is begin Check_Kind_For_Overload_Number (Target); - return Iir_Int32'Val (Get_Field9 (Target)); + return Iir_Int32'Val (Get_Field12 (Target)); end Get_Overload_Number; procedure Set_Overload_Number (Target : Iir; Val : Iir_Int32) is begin Check_Kind_For_Overload_Number (Target); - Set_Field9 (Target, Iir_Int32'Pos (Val)); + Set_Field12 (Target, Iir_Int32'Pos (Val)); end Set_Overload_Number; procedure Check_Kind_For_Subprogram_Depth (Target : Iir) is @@ -2735,35 +2740,6 @@ package body Iirs is Set_Field11 (Target, Iir_Int32'Pos (Val)); end Set_Subprogram_Hash; - procedure Check_Kind_For_Extra_Info (Target : Iir) is - begin - case Get_Kind (Target) is - when Iir_Kind_Function_Declaration - | Iir_Kind_Implicit_Function_Declaration - | Iir_Kind_Implicit_Procedure_Declaration - | Iir_Kind_Procedure_Declaration - | Iir_Kind_Signal_Declaration - | Iir_Kind_Signal_Interface_Declaration - | Iir_Kind_Sensitized_Process_Statement - | Iir_Kind_Process_Statement => - null; - when others => - Failed ("Extra_Info", Target); - end case; - end Check_Kind_For_Extra_Info; - - function Get_Extra_Info (Target : Iir) return Iir_Int32 is - begin - Check_Kind_For_Extra_Info (Target); - return Iir_Int32'Val (Get_Field8 (Target)); - end Get_Extra_Info; - - procedure Set_Extra_Info (Target : Iir; Info : Iir_Int32) is - begin - Check_Kind_For_Extra_Info (Target); - Set_Field8 (Target, Iir_Int32'Pos (Info)); - end Set_Extra_Info; - procedure Check_Kind_For_Impure_Depth (Target : Iir) is begin case Get_Kind (Target) is @@ -2827,14 +2803,14 @@ package body Iirs is is begin Check_Kind_For_Implicit_Definition (D); - return Iir_Predefined_Functions'Val (Get_Field6 (D)); + return Iir_Predefined_Functions'Val (Get_Field9 (D)); end Get_Implicit_Definition; procedure Set_Implicit_Definition (D : Iir; Def : Iir_Predefined_Functions) is begin Check_Kind_For_Implicit_Definition (D); - Set_Field6 (D, Iir_Predefined_Functions'Pos (Def)); + Set_Field9 (D, Iir_Predefined_Functions'Pos (Def)); end Set_Implicit_Definition; procedure Check_Kind_For_Type_Reference (Target : Iir) is @@ -4910,6 +4886,11 @@ package body Iirs is case Get_Kind (Target) is when Iir_Kind_Block_Header | Iir_Kind_Binding_Indication + | Iir_Kind_Package_Declaration + | Iir_Kind_Function_Declaration + | Iir_Kind_Implicit_Function_Declaration + | Iir_Kind_Implicit_Procedure_Declaration + | Iir_Kind_Procedure_Declaration | Iir_Kind_Component_Instantiation_Statement => null; when others => @@ -654,7 +654,7 @@ package Iirs is -- -- Get/Set_Block_Configuration (Field5) - -- Iir_Kind_Package_Declaration (Short) + -- Iir_Kind_Package_Declaration (Medium) -- -- Get/Set_Parent (Field0) -- Get/Set_Design_Unit (Alias Field0) @@ -665,6 +665,10 @@ package Iirs is -- -- Get/Set_Package_Body (Field4) -- + -- Get/Set_Generic_Chain (Field6) + -- + -- Get/Set_Generic_Map_Aspect_Chain (Field8) + -- -- Get/Set_Need_Body (Flag1) -- Iir_Kind_Package_Body (Short) @@ -867,9 +871,6 @@ package Iirs is -- Must always be null_iir for iir_kind_file_interface_declaration. -- Get/Set_Default_Value (Field6) -- - -- Only for Iir_Kind_Signal_Interface_Declaration: - -- Get/Set_Extra_Info (Field8) - -- -- Get/Set_Mode (Odigit1) -- -- Get/Set_Lexical_Layout (Odigit2) @@ -918,18 +919,20 @@ package Iirs is -- -- Get_Interface_Declaration_Chain (Field5) -- - -- Get/Set_Subprogram_Body (Field6) + -- Get/Set_Generic_Chain (Field6) -- -- Get/Set_Callees_List (Field7) -- - -- Get/Set_Extra_Info (Field8) + -- Get/Set_Generic_Map_Aspect_Chain (Field8) -- - -- Get/Set_Overload_Number (Field9) + -- Get/Set_Subprogram_Body (Field9) -- -- Get/Set_Subprogram_Depth (Field10) -- -- Get/Set_Subprogram_Hash (Field11) -- + -- Get/Set_Overload_Number (Field12) + -- -- Get/Set_Seen_Flag (Flag1) -- -- Only for Iir_Kind_Function_Declaration: @@ -997,18 +1000,20 @@ package Iirs is -- -- Get_Interface_Declaration_Chain (Field5) -- - -- Get/Set_Implicit_Definition (Field6) + -- Get/Set_Generic_Chain (Field6) -- -- Get/Set_Callees_List (Field7) -- - -- Get/Set_Extra_Info (Field8) + -- Get/Set_Generic_Map_Aspect_Chain (Field8) -- - -- Get/Set_Overload_Number (Field9) + -- Get/Set_Implicit_Definition (Field9) -- -- Get/Set_Type_Reference (Field10) -- -- Get/Set_Subprogram_Hash (Field11) -- + -- Get/Set_Overload_Number (Field12) + -- -- Get/Set_Wait_State (State1) -- -- Get/Set_Seen_Flag (Flag1) @@ -1044,8 +1049,6 @@ package Iirs is -- several drivers. -- Get/Set_Signal_Driver (Field7) -- - -- Get/Set_Extra_Info (Field8) - -- -- Get/Set_Has_Disconnect_Flag (Flag1) -- -- Get/Set_Has_Active_Flag (Flag2) @@ -1869,8 +1872,6 @@ package Iirs is -- -- Get/Set_Callees_List (Field7) -- - -- Get/Set_Extra_Info (Field8) - -- -- Get/Set_Wait_State (State1) -- -- Get/Set_Seen_Flag (Flag1) @@ -4542,7 +4543,7 @@ package Iirs is function Get_Sequential_Statement_Chain (Target : Iir) return Iir; procedure Set_Sequential_Statement_Chain (Target : Iir; Chain : Iir); - -- Field: Field6 + -- Field: Field9 function Get_Subprogram_Body (Target : Iir) return Iir; procedure Set_Subprogram_Body (Target : Iir; A_Body : Iir); @@ -4550,7 +4551,7 @@ package Iirs is -- identifier. If the overload number is not 0, it is the rank of the -- subprogram. If the overload number is 0, then the identifier is not -- overloaded in the declarative region. - -- Field: Field9 (pos) + -- Field: Field12 (pos) function Get_Overload_Number (Target : Iir) return Iir_Int32; procedure Set_Overload_Number (Target : Iir; Val : Iir_Int32); @@ -4572,15 +4573,6 @@ package Iirs is procedure Set_Subprogram_Hash (Target : Iir; Val : Iir_Int32); pragma Inline (Get_Subprogram_Hash); - -- Index for extra infos. - -- Subprograms and processes need a lot of field in their nodes. - -- Unfortunatly, the size of the nodes is limited and these infos are - -- only used for optimization. - -- This is an index into a separate table. - -- Field: Field8 (pos) - function Get_Extra_Info (Target : Iir) return Iir_Int32; - procedure Set_Extra_Info (Target : Iir; Info : Iir_Int32); - -- Depth of the deepest impure object. -- Field: Field3 (uc) function Get_Impure_Depth (Target : Iir) return Iir_Int32; @@ -4592,7 +4584,7 @@ package Iirs is pragma Inline (Get_Return_Type); -- Code of an implicit subprogram definition. - -- Field: Field6 (pos) + -- Field: Field9 (pos) function Get_Implicit_Definition (D : Iir) return Iir_Predefined_Functions; procedure Set_Implicit_Definition (D : Iir; Def : Iir_Predefined_Functions); |