summaryrefslogtreecommitdiff
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold2014-12-13 17:10:02 +0100
committerTristan Gingold2014-12-13 17:10:02 +0100
commit7b8fae820dc02d90e4739ebaf67754bcbbb4dd9c (patch)
tree8b8cc16649fd4e96e0ff03700fccd2e7f606d9c9 /src/vhdl
parent0c655ec98435f5d9bdfb51cab215002d794c263f (diff)
downloadghdl-7b8fae820dc02d90e4739ebaf67754bcbbb4dd9c.tar.gz
ghdl-7b8fae820dc02d90e4739ebaf67754bcbbb4dd9c.tar.bz2
ghdl-7b8fae820dc02d90e4739ebaf67754bcbbb4dd9c.zip
iirs: move delay_mechanism to flag1; adjust xtools/pnodes.py for new sources.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/iirs.adb9
-rw-r--r--src/vhdl/iirs.adb.in5
-rw-r--r--src/vhdl/iirs.ads6
-rw-r--r--src/vhdl/nodes_meta.adb6
4 files changed, 18 insertions, 8 deletions
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb
index 876d146..7d2eb67 100644
--- a/src/vhdl/iirs.adb
+++ b/src/vhdl/iirs.adb
@@ -203,6 +203,11 @@ package body Iirs is
return Iir (L);
end Location_Type_To_Iir;
+ function Boolean_To_Iir_Delay_Mechanism is new Ada.Unchecked_Conversion
+ (Source => Boolean, Target => Iir_Delay_Mechanism);
+ function Iir_Delay_Mechanism_To_Boolean is new Ada.Unchecked_Conversion
+ (Source => Iir_Delay_Mechanism, Target => Boolean);
+
function Iir_To_String_Id is new Ada.Unchecked_Conversion
(Source => Iir, Target => String_Id);
function String_Id_To_Iir is new Ada.Unchecked_Conversion
@@ -2639,14 +2644,14 @@ package body Iirs is
begin
pragma Assert (Target /= Null_Iir);
pragma Assert (Has_Delay_Mechanism (Get_Kind (Target)));
- return Iir_Delay_Mechanism'Val (Get_Field12 (Target));
+ return Boolean_To_Iir_Delay_Mechanism (Get_Flag1 (Target));
end Get_Delay_Mechanism;
procedure Set_Delay_Mechanism (Target : Iir; Kind : Iir_Delay_Mechanism) is
begin
pragma Assert (Target /= Null_Iir);
pragma Assert (Has_Delay_Mechanism (Get_Kind (Target)));
- Set_Field12 (Target, Iir_Delay_Mechanism'Pos (Kind));
+ Set_Flag1 (Target, Iir_Delay_Mechanism_To_Boolean (Kind));
end Set_Delay_Mechanism;
function Get_Reject_Time_Expression (Target : Iir) return Iir is
diff --git a/src/vhdl/iirs.adb.in b/src/vhdl/iirs.adb.in
index 04511bb..b44eb4f 100644
--- a/src/vhdl/iirs.adb.in
+++ b/src/vhdl/iirs.adb.in
@@ -203,6 +203,11 @@ package body Iirs is
return Iir (L);
end Location_Type_To_Iir;
+ function Boolean_To_Iir_Delay_Mechanism is new Ada.Unchecked_Conversion
+ (Source => Boolean, Target => Iir_Delay_Mechanism);
+ function Iir_Delay_Mechanism_To_Boolean is new Ada.Unchecked_Conversion
+ (Source => Iir_Delay_Mechanism, Target => Boolean);
+
function Iir_To_String_Id is new Ada.Unchecked_Conversion
(Source => Iir, Target => String_Id);
function String_Id_To_Iir is new Ada.Unchecked_Conversion
diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads
index cd58daa..28c1148 100644
--- a/src/vhdl/iirs.ads
+++ b/src/vhdl/iirs.ads
@@ -2387,7 +2387,7 @@ package Iirs is
-- assignment guarded, the guard can be this assignment.
-- Get/Set_Guard (Field8)
--
- -- Get/Set_Delay_Mechanism (Field12)
+ -- Get/Set_Delay_Mechanism (Flag1)
--
-- Get/Set_Postponed_Flag (Flag3)
--
@@ -2767,7 +2767,7 @@ package Iirs is
--
-- Get/Set_Reject_Time_Expression (Field6)
--
- -- Get/Set_Delay_Mechanism (Field12)
+ -- Get/Set_Delay_Mechanism (Flag1)
--
-- Get/Set_Visible_Flag (Flag4)
--
@@ -5747,7 +5747,7 @@ package Iirs is
function Get_Guard (Target : Iir) return Iir;
procedure Set_Guard (Target : Iir; Guard : Iir);
- -- Field: Field12 (pos)
+ -- Field: Flag1 (uc)
function Get_Delay_Mechanism (Target : Iir) return Iir_Delay_Mechanism;
procedure Set_Delay_Mechanism (Target : Iir; Kind : Iir_Delay_Mechanism);
diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb
index 3e038f5..b890c46 100644
--- a/src/vhdl/nodes_meta.adb
+++ b/src/vhdl/nodes_meta.adb
@@ -3323,8 +3323,8 @@ package body Nodes_Meta is
Field_Parent,
Field_Callees_List,
-- Iir_Kind_Concurrent_Conditional_Signal_Assignment
- Field_Delay_Mechanism,
Field_Label,
+ Field_Delay_Mechanism,
Field_Postponed_Flag,
Field_Visible_Flag,
Field_Guarded_Target_State,
@@ -3336,8 +3336,8 @@ package body Nodes_Meta is
Field_Guard,
Field_Parent,
-- Iir_Kind_Concurrent_Selected_Signal_Assignment
- Field_Delay_Mechanism,
Field_Label,
+ Field_Delay_Mechanism,
Field_Postponed_Flag,
Field_Visible_Flag,
Field_Guarded_Target_State,
@@ -3443,8 +3443,8 @@ package body Nodes_Meta is
Field_Tolerance,
Field_Parent,
-- Iir_Kind_Signal_Assignment_Statement
- Field_Delay_Mechanism,
Field_Label,
+ Field_Delay_Mechanism,
Field_Visible_Flag,
Field_Guarded_Target_State,
Field_Target,