diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-05-12 05:19:08 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-05-12 05:20:51 +0200 |
commit | 67ec6bde36b1c48d9b226ba93a8552c5ca8830c2 (patch) | |
tree | 2e9688291fe38e4c356968ef2d8f722bd19ba4d8 /src/vhdl/sem_inst.adb | |
parent | 6714b56ddc9c5011bf404102e57c702e003a561b (diff) | |
download | ghdl-67ec6bde36b1c48d9b226ba93a8552c5ca8830c2.tar.gz ghdl-67ec6bde36b1c48d9b226ba93a8552c5ca8830c2.tar.bz2 ghdl-67ec6bde36b1c48d9b226ba93a8552c5ca8830c2.zip |
sem_inst: remove assert that prevented nested instantiation.
Diffstat (limited to 'src/vhdl/sem_inst.adb')
-rw-r--r-- | src/vhdl/sem_inst.adb | 12 |
1 files changed, 7 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); |