diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/sem_inst.adb | 12 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap8.adb | 1 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/vhdl/sem_inst.adb b/src/vhdl/sem_inst.adb index a746822ff..2d39396f0 100644 --- a/src/vhdl/sem_inst.adb +++ b/src/vhdl/sem_inst.adb @@ -105,10 +105,10 @@ package body Sem_Inst is -- table is to be able to revert the calls to Set_Instance, so that a unit -- can be instantiated several times. Keeping the nodes that have been -- instantiated is cheaper than walking the tree a second time. - -- The second purpose of this table is not yet implemented: being able to - -- have uninstantiated packages in instantiated packages. In that case, - -- the slot in Origin_Table cannot be the origin and the instance at the - -- same time. + -- The second purpose of this table is to be able to have uninstantiated + -- packages in instantiated packages. In that case, the slot in + -- Origin_Table cannot be the origin and the instance at the same time and + -- has to be saved. package Prev_Instance_Table is new Tables (Table_Component_Type => Instance_Entry_Type, Table_Index_Type => Instance_Index_Type, @@ -368,7 +368,9 @@ package body Sem_Inst is return Res; end if; - pragma Assert (Res = Null_Iir); + -- RES is null_iir unless RES is also an instance (and therefore has + -- an origin). + -- pragma Assert (Res = Null_Iir); -- Create a new node. Res := Create_Iir (Kind); diff --git a/src/vhdl/translate/trans-chap8.adb b/src/vhdl/translate/trans-chap8.adb index d32483348..2da9d8e00 100644 --- a/src/vhdl/translate/trans-chap8.adb +++ b/src/vhdl/translate/trans-chap8.adb @@ -2559,6 +2559,7 @@ package body Trans.Chap8 is if Is_Function and then Info.Res_Interface /= O_Dnode_Null then -- Composite result. -- If we need to allocate, do it before starting the call! + -- TODO: could be eliminated if the value is also returned (RVO). declare Res_Type : constant Iir := Get_Return_Type (Imp); Res_Info : constant Type_Info_Acc := Get_Info (Res_Type); |