diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-09-30 18:53:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-09-30 18:53:25 +0200 |
commit | e842e19ba2cbe1bde377fe41860918435698d069 (patch) | |
tree | 3f21313288fbfbf18d784b1563347d32bf40bb67 /src/vhdl | |
parent | 609ab44c99653762e6d0d26bdec2528aeeb77f0a (diff) | |
download | ghdl-e842e19ba2cbe1bde377fe41860918435698d069.tar.gz ghdl-e842e19ba2cbe1bde377fe41860918435698d069.tar.bz2 ghdl-e842e19ba2cbe1bde377fe41860918435698d069.zip |
iirs: add Forward_Ref links
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/disp_tree.adb | 3 | ||||
-rw-r--r-- | src/vhdl/nodes_gc.adb | 1 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.ads.in | 2 | ||||
-rw-r--r-- | src/vhdl/sem_inst.adb | 14 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap2.adb | 3 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap9.adb | 3 |
6 files changed, 18 insertions, 8 deletions
diff --git a/src/vhdl/disp_tree.adb b/src/vhdl/disp_tree.adb index b840d4603..c408651bc 100644 --- a/src/vhdl/disp_tree.adb +++ b/src/vhdl/disp_tree.adb @@ -400,7 +400,8 @@ package body Disp_Tree is case Get_Field_Attribute (F) is when Attr_None => Disp_Iir (Get_Iir (N, F), Sub_Indent, Depth - 1); - when Attr_Ref => + when Attr_Ref + | Attr_Forward_Ref => Disp_Iir (Get_Iir (N, F), Sub_Indent, 0); when Attr_Maybe_Ref => if Get_Is_Ref (N) then diff --git a/src/vhdl/nodes_gc.adb b/src/vhdl/nodes_gc.adb index 38966f27c..d400d8f50 100644 --- a/src/vhdl/nodes_gc.adb +++ b/src/vhdl/nodes_gc.adb @@ -137,6 +137,7 @@ package body Nodes_GC is F := Fields (I); case Get_Field_Attribute (F) is when Attr_Ref + | Attr_Forward_Ref | Attr_Chain_Next => null; when Attr_Maybe_Ref => diff --git a/src/vhdl/nodes_meta.ads.in b/src/vhdl/nodes_meta.ads.in index 8e1dceca9..8eeaef321 100644 --- a/src/vhdl/nodes_meta.ads.in +++ b/src/vhdl/nodes_meta.ads.in @@ -47,7 +47,7 @@ package Nodes_Meta is type Field_Attribute is ( Attr_None, - Attr_Ref, Attr_Maybe_Ref, Attr_Of_Ref, + Attr_Ref, Attr_Maybe_Ref, Attr_Of_Ref, Attr_Forward_Ref, Attr_Chain, Attr_Chain_Next ); diff --git a/src/vhdl/sem_inst.adb b/src/vhdl/sem_inst.adb index 20841263b..d649c0ab4 100644 --- a/src/vhdl/sem_inst.adb +++ b/src/vhdl/sem_inst.adb @@ -216,6 +216,10 @@ package body Sem_Inst is R := Instantiate_Iir (S, True); when Attr_Maybe_Ref => R := Instantiate_Iir (S, Get_Is_Ref (N)); + when Attr_Forward_Ref => + -- Must be explicitely handled in Instantiate_Iir, as it + -- requires special handling. + raise Internal_Error; when Attr_Chain => R := Instantiate_Iir_Chain (S); when Attr_Chain_Next => @@ -523,7 +527,7 @@ package body Sem_Inst is case Get_Field_Attribute (F) is when Attr_None => Set_Instance_On_Iir (S, S_Inst); - when Attr_Ref => + when Attr_Ref | Attr_Forward_Ref => null; when Attr_Maybe_Ref => if not Get_Is_Ref (N) then @@ -547,7 +551,8 @@ package body Sem_Inst is when Attr_None => Set_Instance_On_Iir_List (S, S_Inst); when Attr_Of_Ref - | Attr_Ref => + | Attr_Ref + | Attr_Forward_Ref => null; when others => -- Ref is specially handled in Instantiate_Iir. @@ -839,7 +844,7 @@ package body Sem_Inst is case Get_Field_Attribute (F) is when Attr_None => Substitute_On_Iir (S, E, Rep); - when Attr_Ref => + when Attr_Ref | Attr_Forward_Ref => null; when Attr_Maybe_Ref => if not Get_Is_Ref (N) then @@ -863,7 +868,8 @@ package body Sem_Inst is when Attr_None => Substitute_On_Iir_List (S, E, Rep); when Attr_Of_Ref - | Attr_Ref => + | Attr_Ref + | Attr_Forward_Ref => null; when others => -- Ref is specially handled in Instantiate_Iir. diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb index eeb657da8..7222f2974 100644 --- a/src/vhdl/translate/trans-chap2.adb +++ b/src/vhdl/translate/trans-chap2.adb @@ -1211,7 +1211,8 @@ package body Trans.Chap2 is case Get_Field_Attribute (F) is when Attr_None => Instantiate_Iir_Info (Get_Iir (N, F)); - when Attr_Ref => + when Attr_Ref + | Attr_Forward_Ref => null; when Attr_Maybe_Ref => if not Get_Is_Ref (N) then diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb index 9b453bf4c..e3aad5f45 100644 --- a/src/vhdl/translate/trans-chap9.adb +++ b/src/vhdl/translate/trans-chap9.adb @@ -1153,7 +1153,8 @@ package body Trans.Chap9 is case Get_Field_Attribute (F) is when Attr_None => Destroy_Types (Get_Iir (N, F)); - when Attr_Ref => + when Attr_Ref + | Attr_Forward_Ref => null; when Attr_Maybe_Ref => if not Get_Is_Ref (N) then |