aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vhdl/disp_tree.adb3
-rw-r--r--src/vhdl/nodes_gc.adb1
-rw-r--r--src/vhdl/nodes_meta.ads.in2
-rw-r--r--src/vhdl/sem_inst.adb14
-rw-r--r--src/vhdl/translate/trans-chap2.adb3
-rw-r--r--src/vhdl/translate/trans-chap9.adb3
-rwxr-xr-xsrc/xtools/pnodes.py10
7 files changed, 24 insertions, 12 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
diff --git a/src/xtools/pnodes.py b/src/xtools/pnodes.py
index 21d0d511d..fad0922be 100755
--- a/src/xtools/pnodes.py
+++ b/src/xtools/pnodes.py
@@ -20,7 +20,8 @@ class FuncDesc:
self.name = name
self.field = field
self.conv = conv
- self.acc = acc # access: Chain, Chain_Next, Ref, Of_Ref, Maybe_Ref
+ self.acc = acc # access: Chain, Chain_Next, Ref, Of_Ref, Maybe_Ref,
+ # Forward_Ref
self.pname = pname # Parameter mame
self.ptype = ptype # Parameter type
self.rname = rname # value name (for procedure)
@@ -230,7 +231,7 @@ def read_kinds(filename):
funcs = []
pat_field = re.compile(
' -- Field: (\w+)'
- + '( Of_Ref| Ref| Maybe_Ref| Chain_Next| Chain)?( .*)?\n')
+ + '( Of_Ref| Ref| Maybe_Ref| Forward_Ref| Chain_Next| Chain)?( .*)?\n')
pat_conv = re.compile('^ \((\w+)\)$')
pat_func = \
re.compile(' function Get_(\w+) \((\w+) : (\w+)\) return (\w+);\n')
@@ -665,7 +666,7 @@ elif args.action == 'meta_body':
elif l == ' -- FIELDS_ARRAY':
last = None
nodes_types = [node_type, node_type + '_List']
- ref_names = ['Ref', 'Of_Ref', 'Maybe_Ref']
+ ref_names = ['Ref', 'Of_Ref', 'Maybe_Ref', 'Forward_Ref']
for k in kinds:
v = nodes[k]
if last:
@@ -689,7 +690,8 @@ elif args.action == 'meta_body':
and fv.acc in ['Maybe_Ref']])
flds += sorted([fk for fk, fv in v.fields.items() \
if fv and fv.rtype in nodes_types\
- and fv.acc in ['Ref', 'Of_Ref']])
+ and fv.acc in ['Ref', 'Of_Ref',
+ 'Forward_Ref']])
for fk in flds:
if last:
print last + ','