diff options
Diffstat (limited to 'src/vhdl/sem_inst.adb')
-rw-r--r-- | src/vhdl/sem_inst.adb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vhdl/sem_inst.adb b/src/vhdl/sem_inst.adb index 147073063..bbe5ad4d7 100644 --- a/src/vhdl/sem_inst.adb +++ b/src/vhdl/sem_inst.adb @@ -21,6 +21,7 @@ with Types; use Types; with Files_Map; with Iirs_Utils; use Iirs_Utils; with Errorout; use Errorout; +with Sem; package body Sem_Inst is -- Table of origin. This is an extension of vhdl nodes to track the @@ -573,7 +574,7 @@ package body Sem_Inst is when Iir_Kind_Interface_Type_Declaration => Set_Type (Res, Get_Type (Inter)); when Iir_Kinds_Interface_Subprogram_Declaration => - null; + Sem.Compute_Subprogram_Hash (Res); when others => Error_Kind ("instantiate_generic_chain", Res); end case; @@ -740,7 +741,8 @@ package body Sem_Inst is if Is_Valid (Formal) then loop case Get_Kind (Formal) is - when Iir_Kind_Simple_Name => + when Iir_Kind_Simple_Name + | Iir_Kind_Operator_Symbol => Set_Named_Entity (Formal, Get_Instance (Get_Named_Entity (Formal))); exit; @@ -782,7 +784,7 @@ package body Sem_Inst is declare Inter_Type_Def : constant Iir := Get_Type (Get_Association_Interface (Assoc, Inter)); - Actual_Type : constant Iir := Get_Type (Get_Actual (Assoc)); + Actual_Type : constant Iir := Get_Actual_Type (Assoc); begin Set_Instance (Inter_Type_Def, Actual_Type); end; @@ -861,8 +863,7 @@ package body Sem_Inst is function Instantiate_Package_Body (Inst : Iir) return Iir is - Inst_Decl : constant Iir := Get_Package_Origin (Inst); - Pkg : constant Iir := Get_Uninstantiated_Package_Decl (Inst_Decl); + Pkg : constant Iir := Get_Uninstantiated_Package_Decl (Inst); Prev_Instance_File : constant Source_File_Entry := Instance_File; Mark : constant Instance_Index_Type := Prev_Instance_Table.Last; Res : Iir; @@ -877,7 +878,6 @@ package body Sem_Inst is Set_Instance (Pkg, Inst); declare Pkg_Hdr : constant Iir := Get_Package_Header (Pkg); - Inst_Hdr : constant Iir := Get_Package_Header (Inst); Pkg_El : Iir; Inst_El : Iir; Inter_El : Iir; @@ -886,7 +886,7 @@ package body Sem_Inst is -- In the body, references to interface object are redirected to the -- instantiated interface objects. Pkg_El := Get_Generic_Chain (Pkg_Hdr); - Inst_El := Get_Generic_Chain (Inst_Hdr); + Inst_El := Get_Generic_Chain (Inst); while Is_Valid (Pkg_El) loop if Get_Kind (Pkg_El) in Iir_Kinds_Interface_Object_Declaration then Set_Instance (Pkg_El, Inst_El); @@ -897,8 +897,8 @@ package body Sem_Inst is -- In the body, references to interface type are substitued to the -- mapped type. - Inst_El := Get_Generic_Map_Aspect_Chain (Inst_Hdr); - Inter_El := Get_Generic_Chain (Inst_Hdr); + Inst_El := Get_Generic_Map_Aspect_Chain (Inst); + Inter_El := Get_Generic_Chain (Inst); while Is_Valid (Inst_El) loop case Get_Kind (Inst_El) is when Iir_Kind_Association_Element_Type => |