aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-18 15:04:33 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-18 15:04:33 +0200
commit62652e356f2e91d2317f5305a03f972385ba7ca1 (patch)
tree57cd13d4c1ccaaa78f29d2b304e0090a35d06d29 /src/vhdl/iirs.adb
parent6284c9c6baf057a4421b1163328621c707349080 (diff)
downloadghdl-62652e356f2e91d2317f5305a03f972385ba7ca1.tar.gz
ghdl-62652e356f2e91d2317f5305a03f972385ba7ca1.tar.bz2
ghdl-62652e356f2e91d2317f5305a03f972385ba7ca1.zip
vhdl08: preliminary work for package body instantiation.
Diffstat (limited to 'src/vhdl/iirs.adb')
-rw-r--r--src/vhdl/iirs.adb49
1 files changed, 33 insertions, 16 deletions
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb
index b1d0fb2f4..5524ad66d 100644
--- a/src/vhdl/iirs.adb
+++ b/src/vhdl/iirs.adb
@@ -1717,6 +1717,23 @@ package body Iirs is
Set_Field5 (Pkg, Decl);
end Set_Package_Body;
+ function Get_Package_Instantiation_Bodies_Chain (Pkg : Iir) return Iir is
+ begin
+ pragma Assert (Pkg /= Null_Iir);
+ pragma Assert (Has_Package_Instantiation_Bodies_Chain (Get_Kind (Pkg)),
+ "no field Package_Instantiation_Bodies_Chain");
+ return Get_Field8 (Pkg);
+ end Get_Package_Instantiation_Bodies_Chain;
+
+ procedure Set_Package_Instantiation_Bodies_Chain (Pkg : Iir; Chain : Iir)
+ is
+ begin
+ pragma Assert (Pkg /= Null_Iir);
+ pragma Assert (Has_Package_Instantiation_Bodies_Chain (Get_Kind (Pkg)),
+ "no field Package_Instantiation_Bodies_Chain");
+ Set_Field8 (Pkg, Chain);
+ end Set_Package_Instantiation_Bodies_Chain;
+
function Get_Need_Body (Decl : Iir_Package_Declaration) return Boolean is
begin
pragma Assert (Decl /= Null_Iir);
@@ -1749,6 +1766,22 @@ package body Iirs is
Set_Flag2 (Decl, Flag);
end Set_Macro_Expanded_Flag;
+ function Get_Need_Instance_Bodies (Decl : Iir) return Boolean is
+ begin
+ pragma Assert (Decl /= Null_Iir);
+ pragma Assert (Has_Need_Instance_Bodies (Get_Kind (Decl)),
+ "no field Need_Instance_Bodies");
+ return Get_Flag3 (Decl);
+ end Get_Need_Instance_Bodies;
+
+ procedure Set_Need_Instance_Bodies (Decl : Iir; Flag : Boolean) is
+ begin
+ pragma Assert (Decl /= Null_Iir);
+ pragma Assert (Has_Need_Instance_Bodies (Get_Kind (Decl)),
+ "no field Need_Instance_Bodies");
+ Set_Flag3 (Decl, Flag);
+ end Set_Need_Instance_Bodies;
+
function Get_Block_Configuration (Target : Iir) return Iir is
begin
pragma Assert (Target /= Null_Iir);
@@ -4462,22 +4495,6 @@ package body Iirs is
Set_Field5 (Target, Atype);
end Set_Actual_Type;
- function Get_Associated_Interface (Assoc : Iir) return Iir is
- begin
- pragma Assert (Assoc /= Null_Iir);
- pragma Assert (Has_Associated_Interface (Get_Kind (Assoc)),
- "no field Associated_Interface");
- return Get_Field4 (Assoc);
- end Get_Associated_Interface;
-
- procedure Set_Associated_Interface (Assoc : Iir; Inter : Iir) is
- begin
- pragma Assert (Assoc /= Null_Iir);
- pragma Assert (Has_Associated_Interface (Get_Kind (Assoc)),
- "no field Associated_Interface");
- Set_Field4 (Assoc, Inter);
- end Set_Associated_Interface;
-
function Get_Association_Chain (Target : Iir) return Iir is
begin
pragma Assert (Target /= Null_Iir);