From 67ec6bde36b1c48d9b226ba93a8552c5ca8830c2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 12 May 2017 05:19:08 +0200 Subject: sem_inst: remove assert that prevented nested instantiation. --- src/vhdl/sem_inst.adb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/vhdl/sem_inst.adb') 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); -- cgit v1.2.3